	.file	"243165.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Error: "
.LC1:
	.string	"%s "
	.text
	.globl	oops
	.type	oops, @function
oops:
.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, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	DWORD PTR -212[rbp], 0
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 47
	ja	.L4
	mov	rax, QWORD PTR -192[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -208[rbp]
	add	edx, 8
	mov	DWORD PTR -208[rbp], edx
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -200[rbp], rdx
.L5:
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -212[rbp], 1
.L3:
	mov	eax, DWORD PTR -228[rbp]
	sub	eax, 1
	cmp	DWORD PTR -212[rbp], eax
	jl	.L6
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 47
	ja	.L7
	mov	rax, QWORD PTR -192[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -208[rbp]
	add	edx, 8
	mov	DWORD PTR -208[rbp], edx
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -200[rbp], rdx
.L8:
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	oops, .-oops
	.section	.rodata
	.align 8
.LC2:
	.string	"This command has incorrect number of arguments.\n"
.LC3:
	.string	"Cannot open file"
.LC4:
	.string	"Cannot create file "
.LC5:
	.string	"Write error to file "
.LC6:
	.string	"Error close file "
	.text
	.globl	main
	.type	main, @function
main:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -4132[rbp], 3
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 48
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	DWORD PTR -4124[rbp], -1
	mov	DWORD PTR -4128[rbp], -1
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4124[rbp], eax
	cmp	DWORD PTR -4124[rbp], -1
	jne	.L12
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	edi, 2
	mov	eax, 0
	call	oops
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 420
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -4128[rbp], eax
	cmp	DWORD PTR -4128[rbp], -1
	jne	.L14
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	mov	edi, 2
	mov	eax, 0
	call	oops
	jmp	.L13
.L14:
	mov	DWORD PTR -4120[rbp], 0
	mov	DWORD PTR -4116[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -4120[rbp]
	movsx	rdx, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4128[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edx, DWORD PTR -4120[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	setne	al
	movzx	eax, al
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 2
	mov	eax, 0
	call	oops
.L15:
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4124[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4120[rbp], eax
	cmp	DWORD PTR -4120[rbp], 0
	jg	.L16
	nop
.L13:
	cmp	DWORD PTR -4124[rbp], -1
	je	.L17
	mov	eax, DWORD PTR -4124[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L17
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC6[rip]
	mov	edi, 2
	mov	eax, 0
	call	oops
.L17:
	cmp	DWORD PTR -4128[rbp], -1
	je	.L18
	mov	eax, DWORD PTR -4128[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L18
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC6[rip]
	mov	edi, 2
	mov	eax, 0
	call	oops
.L18:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"243165.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error: \000"
	.align	2
.LC1:
	.ascii	"%s \000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	oops
	.syntax unified
	.arm
	.fpu softvfp
	.type	oops, %function
oops:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-16]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L5+8
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r3, .L5+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	str	r2, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L5+12
	bl	fprintf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #4]
	sub	r3, r3, #1
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	str	r2, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L6:
	.align	2
.L5:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	oops, .-oops
	.section	.rodata
	.align	2
.LC3:
	.ascii	"This command has incorrect number of arguments.\012"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"Cannot open file\000"
	.align	2
.LC5:
	.ascii	"Cannot create file \000"
	.align	2
.LC6:
	.ascii	"Write error to file \000"
	.align	2
.LC7:
	.ascii	"Error close file \000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #3
	beq	.L8
	ldr	r3, .L18+4
	ldr	r3, [r3]
	mov	r2, #48
	mov	r1, #1
	ldr	r0, .L18+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmn	r3, #1
	bne	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+12
	mov	r0, #2
	bl	oops
	b	.L10
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #420
	mov	r0, r3
	bl	creat
	str	r0, [r4, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmn	r3, #1
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+16
	mov	r0, #2
	bl	oops
	b	.L10
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-8]
	b	.L12
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-20]
	bl	write
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, r2
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+20
	mov	r0, #2
	bl	oops
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-16]
	bl	read
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bgt	.L13
	nop
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmn	r3, #1
	beq	.L14
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+24
	mov	r0, #2
	bl	oops
.L14:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmn	r3, #1
	beq	.L15
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+24
	mov	r0, #2
	bl	oops
.L15:
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC8
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
