	.file	"16355.c"
	.intel_syntax noprefix
	.text
	.globl	myPrint
	.type	myPrint, @function
myPrint:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	myPrint, .-myPrint
	.globl	print_error
	.type	print_error, @function
print_error:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 8245935278387129921
	movabs	rdx, 7161690017614620704
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 11426315006581
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	WORD PTR -20[rbp], 0
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_error, .-print_error
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"myshell> "
.LC2:
	.string	" \t\n"
.LC3:
	.string	";"
.LC4:
	.string	">+"
.LC5:
	.string	">"
.LC6:
	.string	"exit"
.LC7:
	.string	"pwd"
.LC8:
	.string	"\n"
.LC9:
	.string	"cd"
.LC10:
	.string	"HOME"
.LC11:
	.string	"temp"
.LC12:
	.string	"a"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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, 496
	mov	DWORD PTR -4580[rbp], edi
	mov	QWORD PTR -4592[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4576[rbp], 0
	cmp	DWORD PTR -4580[rbp], 2
	jne	.L5
	mov	rax, QWORD PTR -4592[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4528[rbp], rax
	cmp	QWORD PTR -4528[rbp], 0
	jne	.L6
	mov	eax, 0
	call	print_error
	mov	edi, 0
	call	exit@PLT
.L6:
	mov	DWORD PTR -4576[rbp], 1
.L5:
	cmp	DWORD PTR -4580[rbp], 2
	jle	.L7
	mov	eax, 0
	call	print_error
	mov	edi, 0
	call	exit@PLT
.L7:
	cmp	DWORD PTR -4576[rbp], 0
	jne	.L8
	lea	rdi, .LC1[rip]
	call	myPrint
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1584[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4536[rbp], rax
	jmp	.L9
.L8:
	mov	rdx, QWORD PTR -4528[rbp]
	lea	rax, -1584[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4536[rbp], rax
.L9:
	cmp	QWORD PTR -4536[rbp], 0
	jne	.L10
	mov	edi, 0
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR -4536[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 512
	jbe	.L11
	movzx	eax, BYTE PTR -1072[rbp]
	cmp	al, 10
	je	.L11
	lea	rax, -1584[rbp]
	mov	rdi, rax
	call	myPrint
.L16:
	cmp	DWORD PTR -4576[rbp], 0
	jne	.L12
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1584[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4536[rbp], rax
	jmp	.L13
.L12:
	mov	rdx, QWORD PTR -4528[rbp]
	lea	rax, -1584[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4536[rbp], rax
.L13:
	mov	rax, QWORD PTR -4536[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 513
	setbe	dl
	movzx	eax, BYTE PTR -1072[rbp]
	cmp	al, 10
	sete	al
	or	eax, edx
	test	al, al
	je	.L14
	lea	rax, -1584[rbp]
	mov	rdi, rax
	call	myPrint
	nop
	mov	BYTE PTR -1584[rbp], 0
	mov	eax, 0
	call	print_error
	jmp	.L11
.L14:
	lea	rax, -1584[rbp]
	mov	rdi, rax
	call	myPrint
	jmp	.L16
.L11:
	lea	rdx, -1584[rbp]
	lea	rax, -1056[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -1056[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	test	rax, rax
	je	.L64
	cmp	DWORD PTR -4576[rbp], 0
	je	.L19
	lea	rax, -1584[rbp]
	mov	rdi, rax
	call	myPrint
.L19:
	mov	DWORD PTR -4572[rbp], 0
	lea	rax, -1584[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4520[rbp], rax
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -4572[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4572[rbp], edx
	cdqe
	mov	rdx, QWORD PTR -4520[rbp]
	mov	QWORD PTR -4464[rbp+rax*8], rdx
	lea	rsi, .LC3[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4520[rbp], rax
.L20:
	cmp	QWORD PTR -4520[rbp], 0
	jne	.L21
	mov	DWORD PTR -4568[rbp], 0
	mov	DWORD PTR -4564[rbp], 0
	mov	DWORD PTR -4560[rbp], 0
	jmp	.L22
.L62:
	mov	eax, DWORD PTR -4560[rbp]
	cdqe
	mov	rax, QWORD PTR -4464[rbp+rax*8]
	mov	QWORD PTR -4520[rbp], rax
	mov	rdx, QWORD PTR -4520[rbp]
	lea	rax, -1056[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -1056[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	test	rax, rax
	je	.L65
	mov	DWORD PTR -4556[rbp], 0
	mov	rax, QWORD PTR -4520[rbp]
	mov	esi, 62
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -4512[rbp], rax
	jmp	.L25
.L26:
	add	DWORD PTR -4556[rbp], 1
	mov	rax, QWORD PTR -4512[rbp]
	add	rax, 1
	mov	esi, 62
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -4512[rbp], rax
.L25:
	cmp	QWORD PTR -4512[rbp], 0
	jne	.L26
	cmp	DWORD PTR -4556[rbp], 1
	jle	.L27
	mov	eax, 0
	call	print_error
	jmp	.L24
.L27:
	cmp	DWORD PTR -4556[rbp], 1
	jne	.L28
	mov	rax, QWORD PTR -4520[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L28
	mov	rax, QWORD PTR -4520[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4480[rbp], rax
	lea	rsi, .LC4[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4472[rbp], rax
	mov	rax, QWORD PTR -4472[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4472[rbp], rax
	mov	rax, QWORD PTR -4472[rbp]
	test	rax, rax
	jne	.L29
	mov	eax, 0
	call	print_error
	jmp	.L24
.L29:
	lea	rsi, .LC2[rip]
	mov	edi, 0
	call	strtok@PLT
	test	rax, rax
	je	.L31
	mov	eax, 0
	call	print_error
	jmp	.L24
.L31:
	mov	rdx, QWORD PTR -4480[rbp]
	lea	rax, -528[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -528[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	test	rax, rax
	jne	.L32
	mov	eax, 0
	call	print_error
	jmp	.L24
.L32:
	mov	DWORD PTR -4564[rbp], 2
	mov	rax, QWORD PTR -4472[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	access@PLT
	test	eax, eax
	je	.L66
	mov	DWORD PTR -4564[rbp], 1
	jmp	.L66
.L28:
	cmp	DWORD PTR -4556[rbp], 1
	jne	.L35
	mov	rax, QWORD PTR -4520[rbp]
	mov	esi, 62
	mov	rdi, rax
	call	strchr@PLT
	test	rax, rax
	je	.L35
	mov	rax, QWORD PTR -4520[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4480[rbp], rax
	lea	rsi, .LC5[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4472[rbp], rax
	mov	rax, QWORD PTR -4472[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4472[rbp], rax
	mov	rax, QWORD PTR -4472[rbp]
	test	rax, rax
	jne	.L36
	mov	eax, 0
	call	print_error
	jmp	.L24
.L36:
	lea	rsi, .LC2[rip]
	mov	edi, 0
	call	strtok@PLT
	test	rax, rax
	je	.L38
	mov	eax, 0
	call	print_error
	jmp	.L24
.L38:
	mov	rdx, QWORD PTR -4480[rbp]
	lea	rax, -528[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -528[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	test	rax, rax
	jne	.L39
	mov	eax, 0
	call	print_error
	jmp	.L24
.L39:
	mov	DWORD PTR -4564[rbp], 1
	mov	rax, QWORD PTR -4472[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	access@PLT
	test	eax, eax
	jne	.L67
	mov	eax, 0
	call	print_error
	jmp	.L24
.L35:
	mov	DWORD PTR -4564[rbp], 0
	jmp	.L34
.L66:
	nop
	jmp	.L34
.L67:
	nop
.L34:
	cmp	DWORD PTR -4564[rbp], 0
	je	.L41
	mov	rdx, QWORD PTR -4480[rbp]
	mov	rax, QWORD PTR -4520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L41:
	mov	rax, QWORD PTR -4520[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4520[rbp], rax
	mov	DWORD PTR -4568[rbp], 0
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -4568[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4568[rbp], edx
	cdqe
	mov	rdx, QWORD PTR -4520[rbp]
	mov	QWORD PTR -3024[rbp+rax*8], rdx
	lea	rsi, .LC2[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4520[rbp], rax
.L42:
	cmp	QWORD PTR -4520[rbp], 0
	jne	.L43
	mov	eax, DWORD PTR -4568[rbp]
	cdqe
	mov	QWORD PTR -3024[rbp+rax*8], 0
	mov	rax, QWORD PTR -3024[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L44
	cmp	DWORD PTR -4564[rbp], 0
	je	.L45
	mov	eax, 0
	call	print_error
	jmp	.L24
.L45:
	cmp	DWORD PTR -4568[rbp], 1
	jne	.L46
	mov	edi, 0
	call	exit@PLT
.L46:
	mov	eax, 0
	call	print_error
	jmp	.L24
.L44:
	mov	rax, QWORD PTR -3024[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L47
	cmp	DWORD PTR -4564[rbp], 0
	je	.L48
	mov	eax, 0
	call	print_error
	jmp	.L24
.L48:
	cmp	DWORD PTR -4568[rbp], 1
	jne	.L49
	lea	rax, -528[rbp]
	mov	esi, 500
	mov	rdi, rax
	call	getcwd@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	myPrint
	lea	rdi, .LC8[rip]
	call	myPrint
	jmp	.L24
.L49:
	mov	eax, 0
	call	print_error
	jmp	.L24
.L47:
	mov	rax, QWORD PTR -3024[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L50
	cmp	DWORD PTR -4564[rbp], 0
	je	.L51
	mov	eax, 0
	call	print_error
	jmp	.L24
.L51:
	cmp	DWORD PTR -4568[rbp], 1
	jne	.L52
	lea	rdi, .LC10[rip]
	call	getenv@PLT
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L24
	mov	eax, 0
	call	print_error
	jmp	.L24
.L52:
	cmp	DWORD PTR -4568[rbp], 2
	jne	.L53
	mov	rax, QWORD PTR -3016[rbp]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L24
	mov	eax, 0
	call	print_error
	jmp	.L24
.L53:
	mov	eax, 0
	call	print_error
	jmp	.L24
.L50:
	mov	DWORD PTR -4552[rbp], 420
	call	fork@PLT
	mov	DWORD PTR -4548[rbp], eax
	cmp	DWORD PTR -4548[rbp], 0
	jne	.L54
	cmp	DWORD PTR -4564[rbp], 1
	jne	.L55
	mov	rax, QWORD PTR -4472[rbp]
	mov	edx, DWORD PTR -4552[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -4544[rbp], eax
	cmp	DWORD PTR -4544[rbp], -1
	jne	.L56
	mov	eax, 0
	call	print_error
	mov	edi, 1
	call	exit@PLT
.L56:
	mov	eax, DWORD PTR -4544[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
.L55:
	cmp	DWORD PTR -4564[rbp], 2
	jne	.L57
	mov	eax, DWORD PTR -4552[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	call	creat@PLT
	mov	DWORD PTR -4540[rbp], eax
	cmp	DWORD PTR -4540[rbp], -1
	jne	.L58
	mov	eax, 0
	call	print_error
	mov	edi, 1
	call	exit@PLT
.L58:
	mov	eax, DWORD PTR -4540[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
.L57:
	mov	rax, QWORD PTR -3024[rbp]
	lea	rdx, -3024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L59
	mov	eax, 0
	call	print_error
.L59:
	mov	edi, 0
	call	exit@PLT
.L54:
	mov	edi, 0
	call	wait@PLT
	cmp	DWORD PTR -4564[rbp], 2
	jne	.L24
	lea	rsi, .LC12[rip]
	lea	rdi, .LC11[rip]
	call	fopen@PLT
	mov	QWORD PTR -4496[rbp], rax
	mov	rax, QWORD PTR -4472[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4488[rbp], rax
	mov	rdx, QWORD PTR -4488[rbp]
	lea	rax, -528[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4504[rbp], rax
	jmp	.L60
.L61:
	mov	rax, QWORD PTR -4504[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -4496[rbp]
	mov	rax, QWORD PTR -4504[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -4488[rbp]
	lea	rax, -528[rbp]
	mov	esi, 514
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4504[rbp], rax
.L60:
	cmp	QWORD PTR -4504[rbp], 0
	jne	.L61
	mov	rax, QWORD PTR -4496[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -4488[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -4472[rbp]
	mov	rdi, rax
	call	remove@PLT
	mov	rax, QWORD PTR -4472[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	call	rename@PLT
	jmp	.L24
.L65:
	nop
.L24:
	add	DWORD PTR -4560[rbp], 1
.L22:
	mov	eax, DWORD PTR -4560[rbp]
	cmp	eax, DWORD PTR -4572[rbp]
	jl	.L62
	jmp	.L7
.L64:
	nop
	jmp	.L7
	.cfi_endproc
.LFE8:
	.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	"16355.c"
	.text
	.align	2
	.global	myPrint
	.syntax unified
	.arm
	.fpu softvfp
	.type	myPrint, %function
myPrint:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-8]
	mov	r0, #1
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	myPrint, .-myPrint
	.section	.rodata
	.align	2
.LC0:
	.ascii	"An error has occurred\012\000"
	.space	7
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_error, %function
print_error:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L4+4
	sub	ip, fp, #40
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	str	r0, [ip]
	add	ip, ip, #4
	strh	r1, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r1, #16
	strb	r3, [ip]
	sub	r3, fp, #17
	mov	r2, #0
	mov	r1, r2
	strb	r1, [r3]
	mov	r1, r2
	strb	r1, [r3, #1]
	mov	r1, r2
	strb	r1, [r3, #2]
	mov	r1, r2
	strb	r1, [r3, #3]
	mov	r1, r2
	strb	r1, [r3, #4]
	mov	r1, r2
	strb	r1, [r3, #5]
	strb	r2, [r3, #6]
	sub	r3, fp, #40
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #40
	mov	r1, r3
	mov	r0, #1
	bl	write
	nop
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	.LC0
	.size	print_error, .-print_error
	.section	.rodata
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"myshell> \000"
	.align	2
.LC4:
	.ascii	" \011\012\000"
	.align	2
.LC5:
	.ascii	";\000"
	.align	2
.LC6:
	.ascii	">+\000"
	.align	2
.LC7:
	.ascii	">\000"
	.align	2
.LC8:
	.ascii	"exit\000"
	.align	2
.LC9:
	.ascii	"pwd\000"
	.align	2
.LC10:
	.ascii	"\012\000"
	.align	2
.LC11:
	.ascii	"cd\000"
	.align	2
.LC12:
	.ascii	"HOME\000"
	.align	2
.LC13:
	.ascii	"temp\000"
	.align	2
.LC14:
	.ascii	"a\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 3080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3072
	sub	sp, sp, #8
	str	r0, [fp, #-3080]
	str	r1, [fp, #-3084]
	ldr	r3, .L70
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-3064]
	ldr	r3, [fp, #-3080]
	cmp	r3, #2
	bne	.L7
	ldr	r3, [fp, #-3084]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L70+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-3068]
	ldr	r3, [fp, #-3068]
	cmp	r3, #0
	bne	.L8
	bl	print_error
	mov	r0, #0
	bl	exit
.L8:
	mov	r3, #1
	str	r3, [fp, #-3064]
.L7:
	ldr	r3, [fp, #-3080]
	cmp	r3, #2
	ble	.L9
	bl	print_error
	mov	r0, #0
	bl	exit
.L9:
	ldr	r3, [fp, #-3064]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L70+8
	bl	myPrint
	ldr	r3, .L70+12
	ldr	r2, [r3]
	sub	r3, fp, #1552
	sub	r3, r3, #4
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3072]
	b	.L11
.L10:
	sub	r3, fp, #1552
	sub	r3, r3, #4
	ldr	r2, [fp, #-3068]
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3072]
.L11:
	ldr	r3, [fp, #-3072]
	cmp	r3, #0
	bne	.L12
	mov	r0, #0
	bl	exit
.L12:
	ldr	r0, [fp, #-3072]
	bl	strlen
	mov	r3, r0
	cmp	r3, #512
	bls	.L13
	ldrb	r3, [fp, #-1044]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L13
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r0, r3
	bl	myPrint
.L18:
	ldr	r3, [fp, #-3064]
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L70+12
	ldr	r2, [r3]
	sub	r3, fp, #1552
	sub	r3, r3, #4
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3072]
	b	.L15
.L14:
	sub	r3, fp, #1552
	sub	r3, r3, #4
	ldr	r2, [fp, #-3068]
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3072]
.L15:
	ldr	r0, [fp, #-3072]
	bl	strlen
	mov	r3, r0
	ldr	r2, .L70+20
	cmp	r3, r2
	movls	r3, #1
	movhi	r3, #0
	and	r2, r3, #255
	ldrb	r3, [fp, #-1044]	@ zero_extendqisi2
	cmp	r3, #10
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r0, r3
	bl	myPrint
	nop
	mov	r3, #0
	strb	r3, [fp, #-1556]
	bl	print_error
	b	.L13
.L16:
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r0, r3
	bl	myPrint
	b	.L18
.L13:
	sub	r2, fp, #1552
	sub	r2, r2, #4
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	beq	.L66
	ldr	r3, [fp, #-3064]
	cmp	r3, #0
	beq	.L21
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r0, r3
	bl	myPrint
.L21:
	mov	r3, #0
	str	r3, [fp, #-3060]
	sub	r3, fp, #1552
	sub	r3, r3, #4
	ldr	r1, .L70+28
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-3056]
	b	.L22
.L23:
	ldr	r3, [fp, #-3060]
	add	r2, r3, #1
	str	r2, [fp, #-3060]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-3056]
	str	r2, [r3, #-2992]
	ldr	r1, .L70+28
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-3056]
.L22:
	ldr	r3, [fp, #-3056]
	cmp	r3, #0
	bne	.L23
	mov	r3, #0
	str	r3, [fp, #-3052]
	mov	r3, #0
	str	r3, [fp, #-3048]
	mov	r3, #0
	str	r3, [fp, #-3044]
	b	.L24
.L64:
	ldr	r3, [fp, #-3044]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-2992]
	str	r3, [fp, #-3056]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, [fp, #-3056]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	beq	.L67
	mov	r3, #0
	str	r3, [fp, #-3040]
	mov	r1, #62
	ldr	r0, [fp, #-3056]
	bl	strchr
	str	r0, [fp, #-3036]
	b	.L27
.L28:
	ldr	r3, [fp, #-3040]
	add	r3, r3, #1
	str	r3, [fp, #-3040]
	ldr	r3, [fp, #-3036]
	add	r3, r3, #1
	mov	r1, #62
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-3036]
.L27:
	ldr	r3, [fp, #-3036]
	cmp	r3, #0
	bne	.L28
	ldr	r3, [fp, #-3040]
	cmp	r3, #1
	ble	.L29
	bl	print_error
	b	.L26
.L29:
	ldr	r3, [fp, #-3040]
	cmp	r3, #1
	bne	.L30
	ldr	r1, .L70+32
	ldr	r0, [fp, #-3056]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r1, .L70+32
	ldr	r0, [fp, #-3056]
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3004]
	ldr	r1, .L70+32
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3000]
	ldr	r3, [fp, #-3000]
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3000]
	ldr	r3, [fp, #-3000]
	cmp	r3, #0
	bne	.L31
	bl	print_error
	b	.L26
.L31:
	ldr	r1, .L70+24
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	bl	print_error
	b	.L26
.L33:
	ldr	r2, [fp, #-3004]
	sub	r3, fp, #524
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #524
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	bne	.L34
	bl	print_error
	b	.L26
.L34:
	mov	r3, #2
	str	r3, [fp, #-3048]
	ldr	r3, [fp, #-3000]
	mov	r1, #0
	mov	r0, r3
	bl	access
	mov	r3, r0
	cmp	r3, #0
	beq	.L68
	mov	r3, #1
	str	r3, [fp, #-3048]
	b	.L68
.L30:
	ldr	r3, [fp, #-3040]
	cmp	r3, #1
	bne	.L37
	mov	r1, #62
	ldr	r0, [fp, #-3056]
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L37
	ldr	r1, .L70+36
	ldr	r0, [fp, #-3056]
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3004]
	ldr	r1, .L70+36
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3000]
	ldr	r3, [fp, #-3000]
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	str	r3, [fp, #-3000]
	ldr	r3, [fp, #-3000]
	cmp	r3, #0
	bne	.L38
	bl	print_error
	b	.L26
.L38:
	ldr	r1, .L70+24
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	beq	.L40
	bl	print_error
	b	.L26
.L40:
	ldr	r2, [fp, #-3004]
	sub	r3, fp, #524
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #524
	ldr	r1, .L70+24
	mov	r0, r3
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	bne	.L41
	bl	print_error
	b	.L26
.L41:
	mov	r3, #1
	str	r3, [fp, #-3048]
	ldr	r3, [fp, #-3000]
	mov	r1, #0
	mov	r0, r3
	bl	access
	mov	r3, r0
	cmp	r3, #0
	bne	.L69
	bl	print_error
	b	.L26
.L37:
	mov	r3, #0
	str	r3, [fp, #-3048]
	b	.L36
.L68:
	nop
	b	.L36
.L69:
	nop
.L36:
	ldr	r3, [fp, #-3048]
	cmp	r3, #0
	beq	.L43
	ldr	r3, [fp, #-3004]
	mov	r1, r3
	ldr	r0, [fp, #-3056]
	bl	strcpy
.L43:
	ldr	r1, .L70+24
	ldr	r0, [fp, #-3056]
	bl	strtok
	str	r0, [fp, #-3056]
	mov	r3, #0
	str	r3, [fp, #-3052]
	b	.L44
.L45:
	ldr	r3, [fp, #-3052]
	add	r2, r3, #1
	str	r2, [fp, #-3052]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-3056]
	str	r2, [r3, #-2272]
	ldr	r1, .L70+24
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-3056]
.L44:
	ldr	r3, [fp, #-3056]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-3052]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-2272]
	ldr	r3, [fp, #-2276]
	ldr	r1, .L70+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L46
	ldr	r3, [fp, #-3048]
	cmp	r3, #0
	beq	.L47
	bl	print_error
	b	.L26
.L47:
	ldr	r3, [fp, #-3052]
	cmp	r3, #1
	bne	.L48
	mov	r0, #0
	bl	exit
.L48:
	bl	print_error
	b	.L26
.L46:
	ldr	r3, [fp, #-2276]
	ldr	r1, .L70+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #-3048]
	cmp	r3, #0
	beq	.L50
	bl	print_error
	b	.L26
.L50:
	ldr	r3, [fp, #-3052]
	cmp	r3, #1
	bne	.L51
	sub	r3, fp, #524
	mov	r1, #500
	mov	r0, r3
	bl	getcwd
	sub	r3, fp, #524
	mov	r0, r3
	bl	myPrint
	ldr	r0, .L70+48
	bl	myPrint
	b	.L26
.L51:
	bl	print_error
	b	.L26
.L49:
	ldr	r3, [fp, #-2276]
	ldr	r1, .L70+52
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L52
	ldr	r3, [fp, #-3048]
	cmp	r3, #0
	beq	.L53
	bl	print_error
	b	.L26
.L53:
	ldr	r3, [fp, #-3052]
	cmp	r3, #1
	bne	.L54
	ldr	r0, .L70+56
	bl	getenv
	mov	r3, r0
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	bl	print_error
	b	.L26
.L54:
	ldr	r3, [fp, #-3052]
	cmp	r3, #2
	bne	.L55
	ldr	r3, [fp, #-2272]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	bl	print_error
	b	.L26
.L55:
	bl	print_error
	b	.L26
.L52:
	mov	r3, #420
	str	r3, [fp, #-3028]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-3024]
	ldr	r3, [fp, #-3024]
	cmp	r3, #0
	bne	.L56
	ldr	r3, [fp, #-3048]
	cmp	r3, #1
	bne	.L57
	ldr	r3, [fp, #-3000]
	ldr	r1, [fp, #-3028]
	mov	r0, r3
	bl	creat
	str	r0, [fp, #-3012]
	ldr	r3, [fp, #-3012]
	cmn	r3, #1
	bne	.L58
	bl	print_error
	mov	r0, #1
	bl	exit
.L58:
	mov	r1, #1
	ldr	r0, [fp, #-3012]
	bl	dup2
.L57:
	ldr	r3, [fp, #-3048]
	cmp	r3, #2
	bne	.L59
	ldr	r1, [fp, #-3028]
	ldr	r0, .L70+60
	bl	creat
	str	r0, [fp, #-3008]
	ldr	r3, [fp, #-3008]
	cmn	r3, #1
	bne	.L60
	bl	print_error
	mov	r0, #1
	bl	exit
.L60:
	mov	r1, #1
	ldr	r0, [fp, #-3008]
	bl	dup2
.L59:
	ldr	r3, [fp, #-2276]
	sub	r2, fp, #2272
	sub	r2, r2, #4
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L61
	bl	print_error
.L61:
	mov	r0, #0
	bl	exit
.L56:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-3048]
	cmp	r3, #2
	bne	.L26
	ldr	r1, .L70+64
	ldr	r0, .L70+60
	bl	fopen
	str	r0, [fp, #-3020]
	ldr	r3, [fp, #-3000]
	ldr	r1, .L70+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-3016]
	sub	r3, fp, #524
	ldr	r2, [fp, #-3016]
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3032]
	b	.L62
.L63:
	ldr	r0, [fp, #-3032]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-3020]
	mov	r1, #1
	ldr	r0, [fp, #-3032]
	bl	fwrite
	sub	r3, fp, #524
	ldr	r2, [fp, #-3016]
	ldr	r1, .L70+16
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-3032]
.L62:
	ldr	r3, [fp, #-3032]
	cmp	r3, #0
	bne	.L63
	ldr	r0, [fp, #-3020]
	bl	fclose
	ldr	r0, [fp, #-3016]
	bl	fclose
	ldr	r3, [fp, #-3000]
	mov	r0, r3
	bl	remove
	ldr	r3, [fp, #-3000]
	mov	r1, r3
	ldr	r0, .L70+60
	bl	rename
	b	.L26
.L67:
	nop
.L26:
	ldr	r3, [fp, #-3044]
	add	r3, r3, #1
	str	r3, [fp, #-3044]
.L24:
	ldr	r2, [fp, #-3044]
	ldr	r3, [fp, #-3060]
	cmp	r2, r3
	blt	.L64
	b	.L9
.L66:
	nop
	b	.L9
.L71:
	.align	2
.L70:
	.word	.LC15
	.word	.LC2
	.word	.LC3
	.word	stdin
	.word	514
	.word	513
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
