	.file	"247613.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"&&"
	.text
	.globl	parseParallel
	.type	parseParallel, @function
parseParallel:
.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -40[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L8
	add	DWORD PTR -20[rbp], 1
.L2:
	cmp	DWORD PTR -20[rbp], 99
	jle	.L5
	jmp	.L4
.L8:
	nop
.L4:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	eax, 1
.L7:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parseParallel, .-parseParallel
	.section	.rodata
.LC1:
	.string	"##"
	.text
	.globl	parseSequential
	.type	parseSequential, @function
parseSequential:
.LFB7:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -40[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L16
	add	DWORD PTR -20[rbp], 1
.L10:
	cmp	DWORD PTR -20[rbp], 99
	jle	.L13
	jmp	.L12
.L16:
	nop
.L12:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L14
	mov	eax, 0
	jmp	.L15
.L14:
	mov	eax, 1
.L15:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parseSequential, .-parseSequential
	.section	.rodata
.LC2:
	.string	">"
	.text
	.globl	parseCommandRedirection
	.type	parseCommandRedirection, @function
parseCommandRedirection:
.LFB8:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -40[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L24
	add	DWORD PTR -20[rbp], 1
.L18:
	cmp	DWORD PTR -20[rbp], 99
	jle	.L21
	jmp	.L20
.L24:
	nop
.L20:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L22
	mov	eax, 0
	jmp	.L23
.L22:
	mov	eax, 1
.L23:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parseCommandRedirection, .-parseCommandRedirection
	.section	.rodata
.LC3:
	.string	" "
	.text
	.globl	parseSpace
	.type	parseSpace, @function
parseSpace:
.LFB9:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L26
.L30:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -40[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L31
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L29
	sub	DWORD PTR -20[rbp], 1
.L29:
	add	DWORD PTR -20[rbp], 1
.L26:
	cmp	DWORD PTR -20[rbp], 99
	jle	.L30
	jmp	.L32
.L31:
	nop
.L32:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	parseSpace, .-parseSpace
	.globl	parseInput
	.type	parseInput, @function
parseInput:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -13[rbp], 1953069157
	mov	BYTE PTR -9[rbp], 0
	lea	rdx, -13[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L34
	mov	eax, 0
	jmp	.L39
.L34:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseParallel
	test	eax, eax
	je	.L36
	mov	eax, 1
	jmp	.L39
.L36:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSequential
	test	eax, eax
	je	.L37
	mov	eax, 2
	jmp	.L39
.L37:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseCommandRedirection
	test	eax, eax
	je	.L38
	mov	eax, 3
	jmp	.L39
.L38:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSpace
	mov	eax, 4
.L39:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	parseInput, .-parseInput
	.section	.rodata
.LC4:
	.string	"Process Creation Failed!"
.LC5:
	.string	"cd"
.LC6:
	.string	"Shell: Incorrect command"
	.text
	.globl	executeCommand
	.type	executeCommand, @function
executeCommand:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L47
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L44
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L44:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L45
	mov	esi, 0
	mov	edi, 2
	call	signal@PLT
	mov	esi, 0
	mov	edi, 20
	call	signal@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L41
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L41
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L45:
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	jmp	.L41
.L47:
	nop
.L41:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	executeCommand, .-executeCommand
	.section	.rodata
.LC7:
	.string	"Error"
.LC8:
	.string	"Process Creation Failed"
	.text
	.globl	executeParallelCommands
	.type	executeParallelCommands, @function
executeParallelCommands:
.LFB12:
	.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, 1272
	.cfi_offset 3, -24
	mov	QWORD PTR -1272[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1252[rbp], 0
	mov	DWORD PTR -1256[rbp], 0
	jmp	.L49
.L54:
	mov	eax, DWORD PTR -1256[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1272[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	QWORD PTR -1240[rbp], rax
	je	.L50
	mov	eax, DWORD PTR -1256[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1272[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -832[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSpace
	mov	rax, QWORD PTR -832[rbp]
	test	rax, rax
	je	.L51
	mov	rax, QWORD PTR -832[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L51
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L50
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L50
.L51:
	mov	rax, QWORD PTR -832[rbp]
	test	rax, rax
	je	.L50
	call	fork@PLT
	mov	DWORD PTR -1244[rbp], eax
	cmp	DWORD PTR -1244[rbp], 0
	jns	.L53
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L53:
	cmp	DWORD PTR -1244[rbp], 0
	jne	.L50
	mov	ebx, DWORD PTR -1252[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -1252[rbp], eax
	call	getpid@PLT
	movsx	rdx, ebx
	mov	DWORD PTR -1232[rbp+rdx*4], eax
	mov	esi, 0
	mov	edi, 2
	call	signal@PLT
	mov	esi, 0
	mov	edi, 20
	call	signal@PLT
	mov	rax, QWORD PTR -832[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L50
	mov	rax, QWORD PTR -832[rbp]
	lea	rdx, -832[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L50
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L50:
	add	DWORD PTR -1256[rbp], 1
.L49:
	mov	eax, DWORD PTR -1256[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1272[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L54
	mov	DWORD PTR -1248[rbp], 0
	jmp	.L55
.L57:
	mov	eax, DWORD PTR -1248[rbp]
	cdqe
	mov	eax, DWORD PTR -1232[rbp+rax*4]
	lea	rcx, -1260[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -1260[rbp]
	and	eax, 127
	test	eax, eax
	je	.L56
	mov	eax, DWORD PTR -1248[rbp]
	cdqe
	mov	eax, DWORD PTR -1232[rbp+rax*4]
	mov	esi, 2
	mov	edi, eax
	call	kill@PLT
.L56:
	add	DWORD PTR -1248[rbp], 1
.L55:
	mov	eax, DWORD PTR -1248[rbp]
	cmp	eax, DWORD PTR -1256[rbp]
	jl	.L57
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	executeParallelCommands, .-executeParallelCommands
	.globl	executeSequentialCommands
	.type	executeSequentialCommands, @function
executeSequentialCommands:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 864
	mov	QWORD PTR -856[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -824[rbp], 0
	mov	DWORD PTR -832[rbp], 0
	jmp	.L60
.L66:
	mov	eax, DWORD PTR -832[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -856[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	QWORD PTR -824[rbp], rax
	je	.L61
	mov	eax, DWORD PTR -832[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -856[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -816[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSpace
	mov	rax, QWORD PTR -816[rbp]
	test	rax, rax
	je	.L62
	mov	rax, QWORD PTR -816[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L62
	mov	rax, QWORD PTR -808[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L61
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L61
.L62:
	mov	rax, QWORD PTR -816[rbp]
	test	rax, rax
	je	.L61
	call	fork@PLT
	mov	DWORD PTR -828[rbp], eax
	cmp	DWORD PTR -828[rbp], 0
	jns	.L64
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L64:
	cmp	DWORD PTR -828[rbp], 0
	jne	.L65
	mov	esi, 0
	mov	edi, 2
	call	signal@PLT
	mov	esi, 0
	mov	edi, 20
	call	signal@PLT
	mov	rax, QWORD PTR -816[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L61
	mov	rax, QWORD PTR -816[rbp]
	lea	rdx, -816[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L61
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L65:
	lea	rcx, -836[rbp]
	mov	eax, DWORD PTR -828[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
.L61:
	add	DWORD PTR -832[rbp], 1
.L60:
	mov	eax, DWORD PTR -832[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -856[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L66
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	executeSequentialCommands, .-executeSequentialCommands
	.section	.rodata
.LC9:
	.string	"Creation of file failed"
	.text
	.globl	executeCommandRedirection
	.type	executeCommandRedirection, @function
executeCommandRedirection:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1648
	mov	QWORD PTR -1640[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1640[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -816[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSpace
	mov	rax, QWORD PTR -1640[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1616[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseSpace
	call	fork@PLT
	mov	DWORD PTR -1624[rbp], eax
	cmp	DWORD PTR -1624[rbp], 0
	jns	.L69
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L69:
	cmp	DWORD PTR -1624[rbp], 0
	jne	.L70
	mov	esi, 0
	mov	edi, 2
	call	signal@PLT
	mov	esi, 0
	mov	edi, 20
	call	signal@PLT
	mov	rax, QWORD PTR -816[rbp]
	mov	edx, 448
	mov	esi, 1089
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1620[rbp], eax
	cmp	DWORD PTR -1620[rbp], -1
	jne	.L71
	lea	rdi, .LC9[rip]
	call	perror@PLT
.L71:
	mov	eax, DWORD PTR -1620[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -1620[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -1616[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L75
	mov	rax, QWORD PTR -1616[rbp]
	lea	rdx, -1616[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L73
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L73:
	mov	edi, 0
	call	exit@PLT
.L70:
	lea	rcx, -1628[rbp]
	mov	eax, DWORD PTR -1624[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
.L75:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L74
	call	__stack_chk_fail@PLT
.L74:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	executeCommandRedirection, .-executeCommandRedirection
	.section	.rodata
.LC10:
	.string	"%s$"
.LC11:
	.string	"Unable to allocate buffer"
.LC12:
	.string	"Exiting shell..."
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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, 1880
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	esi, 1
	mov	edi, 2
	call	signal@PLT
	mov	esi, 1
	mov	edi, 20
	call	signal@PLT
.L87:
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	getcwd@PLT
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -1864[rbp], 32
	mov	rax, QWORD PTR -1864[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -1872[rbp], rax
	mov	rax, QWORD PTR -1872[rbp]
	test	rax, rax
	jne	.L77
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L77:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rcx, -1864[rbp]
	lea	rax, -1872[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	DWORD PTR -1880[rbp], eax
	mov	rbx, QWORD PTR -1872[rbp]
	mov	rax, QWORD PTR -1872[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	add	rax, rbx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -1872[rbp]
	lea	rdx, -1856[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseInput
	mov	DWORD PTR -1876[rbp], eax
	mov	rax, QWORD PTR -1856[rbp]
	test	rax, rax
	je	.L90
	cmp	DWORD PTR -1876[rbp], 0
	jne	.L80
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L88
	jmp	.L89
.L80:
	cmp	DWORD PTR -1876[rbp], 1
	jne	.L82
	lea	rax, -1856[rbp]
	mov	rdi, rax
	call	executeParallelCommands
	jmp	.L87
.L82:
	cmp	DWORD PTR -1876[rbp], 2
	jne	.L84
	lea	rax, -1856[rbp]
	mov	rdi, rax
	call	executeSequentialCommands
	jmp	.L87
.L84:
	cmp	DWORD PTR -1876[rbp], 3
	jne	.L85
	lea	rax, -1856[rbp]
	mov	rdi, rax
	call	executeCommandRedirection
	jmp	.L87
.L85:
	mov	rax, QWORD PTR -1856[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L86
	mov	rax, QWORD PTR -1848[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L87
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L87
.L86:
	lea	rax, -1856[rbp]
	mov	rdi, rax
	call	executeCommand
	jmp	.L87
.L90:
	nop
	jmp	.L87
.L89:
	call	__stack_chk_fail@PLT
.L88:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"247613.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"&&\000"
	.text
	.align	2
	.global	parseParallel
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseParallel, %function
parseParallel:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L5:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r4, r2, r3
	sub	r3, fp, #24
	ldr	r1, .L9
	mov	r0, r3
	bl	strsep
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	ble	.L5
	b	.L4
.L8:
	nop
.L4:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L6
	mov	r3, #0
	b	.L7
.L6:
	mov	r3, #1
.L7:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.size	parseParallel, .-parseParallel
	.section	.rodata
	.align	2
.LC1:
	.ascii	"##\000"
	.text
	.align	2
	.global	parseSequential
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseSequential, %function
parseSequential:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L15:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r4, r2, r3
	sub	r3, fp, #24
	ldr	r1, .L19
	mov	r0, r3
	bl	strsep
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	ble	.L15
	b	.L14
.L18:
	nop
.L14:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L16
	mov	r3, #0
	b	.L17
.L16:
	mov	r3, #1
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC1
	.size	parseSequential, .-parseSequential
	.section	.rodata
	.align	2
.LC2:
	.ascii	">\000"
	.text
	.align	2
	.global	parseCommandRedirection
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseCommandRedirection, %function
parseCommandRedirection:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L25:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r4, r2, r3
	sub	r3, fp, #24
	ldr	r1, .L29
	mov	r0, r3
	bl	strsep
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	ble	.L25
	b	.L24
.L28:
	nop
.L24:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	b	.L27
.L26:
	mov	r3, #1
.L27:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC2
	.size	parseCommandRedirection, .-parseCommandRedirection
	.section	.rodata
	.align	2
.LC3:
	.ascii	" \000"
	.text
	.align	2
	.global	parseSpace
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseSpace, %function
parseSpace:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L32
.L36:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r4, r2, r3
	sub	r3, fp, #24
	ldr	r1, .L39
	mov	r0, r3
	bl	strsep
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L35:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L32:
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	ble	.L36
	b	.L38
.L37:
	nop
.L38:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC3
	.size	parseSpace, .-parseSpace
	.section	.rodata
	.align	2
.LC4:
	.ascii	"exit\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parseInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseInput, %function
parseInput:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L49
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L49+4
	sub	r3, fp, #16
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L42
	mov	r3, #0
	b	.L47
.L42:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	parseParallel
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	mov	r3, #1
	b	.L47
.L44:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	parseSequential
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
	mov	r3, #2
	b	.L47
.L45:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	parseCommandRedirection
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	mov	r3, #3
	b	.L47
.L46:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	parseSpace
	mov	r3, #4
.L47:
	ldr	r2, .L49
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L48
	bl	__stack_chk_fail
.L48:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC5
	.word	.LC4
	.size	parseInput, .-parseInput
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Process Creation Failed!\000"
	.align	2
.LC7:
	.ascii	"cd\000"
	.align	2
.LC8:
	.ascii	"Shell: Incorrect command\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	executeCommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	executeCommand, %function
executeCommand:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L57
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L54
	ldr	r0, .L58+4
	bl	puts
	mov	r0, #0
	bl	exit
.L54:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L55
	mov	r1, #0
	mov	r0, #2
	bl	signal
	mov	r1, #0
	mov	r0, #20
	bl	signal
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, .L58+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L51
	ldr	r0, .L58+12
	bl	puts
	mov	r0, #1
	bl	exit
.L55:
	sub	r3, fp, #16
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	waitpid
	b	.L51
.L57:
	nop
.L51:
	ldr	r3, .L58
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC9
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	executeCommand, .-executeCommand
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Error\000"
	.align	2
.LC11:
	.ascii	"Process Creation Failed\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	executeParallelCommands
	.syntax unified
	.arm
	.fpu softvfp
	.type	executeParallelCommands, %function
executeParallelCommands:
	@ args = 0, pretend = 0, frame = 840
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #844
	str	r0, [fp, #-848]
	ldr	r3, .L71
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-832]
	mov	r3, #0
	str	r3, [fp, #-836]
	b	.L61
.L66:
	ldr	r3, [fp, #-836]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-848]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-824]
	cmp	r3, r2
	beq	.L62
	ldr	r3, [fp, #-836]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-848]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #816
	mov	r1, r2
	mov	r0, r3
	bl	parseSpace
	ldr	r3, [fp, #-816]
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-816]
	ldr	r1, .L71+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L63
	ldr	r3, [fp, #-812]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L62
	ldr	r0, .L71+8
	bl	perror
	b	.L62
.L63:
	ldr	r3, [fp, #-816]
	cmp	r3, #0
	beq	.L62
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-820]
	ldr	r3, [fp, #-820]
	cmp	r3, #0
	bge	.L65
	ldr	r0, .L71+12
	bl	puts
	mov	r0, #0
	bl	exit
.L65:
	ldr	r3, [fp, #-820]
	cmp	r3, #0
	bne	.L62
	ldr	r4, [fp, #-832]
	add	r3, r4, #1
	str	r3, [fp, #-832]
	bl	getpid
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-404]
	mov	r1, #0
	mov	r0, #2
	bl	signal
	mov	r1, #0
	mov	r0, #20
	bl	signal
	ldr	r3, [fp, #-816]
	ldr	r1, .L71+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L62
	ldr	r3, [fp, #-816]
	sub	r2, fp, #816
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L62
	ldr	r0, .L71+16
	bl	puts
	mov	r0, #1
	bl	exit
.L62:
	ldr	r3, [fp, #-836]
	add	r3, r3, #1
	str	r3, [fp, #-836]
.L61:
	ldr	r3, [fp, #-836]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-848]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L66
	mov	r3, #0
	str	r3, [fp, #-828]
	b	.L67
.L69:
	ldr	r3, [fp, #-828]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	sub	r1, fp, #840
	mov	r2, #2
	mov	r0, r3
	bl	waitpid
	ldr	r3, [fp, #-840]
	and	r3, r3, #127
	cmp	r3, #0
	beq	.L68
	ldr	r3, [fp, #-828]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	mov	r1, #2
	mov	r0, r3
	bl	kill
.L68:
	ldr	r3, [fp, #-828]
	add	r3, r3, #1
	str	r3, [fp, #-828]
.L67:
	ldr	r2, [fp, #-828]
	ldr	r3, [fp, #-836]
	cmp	r2, r3
	blt	.L69
	nop
	ldr	r3, .L71
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L70
	bl	__stack_chk_fail
.L70:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L72:
	.align	2
.L71:
	.word	.LC12
	.word	.LC7
	.word	.LC10
	.word	.LC11
	.word	.LC8
	.size	executeParallelCommands, .-executeParallelCommands
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	executeSequentialCommands
	.syntax unified
	.arm
	.fpu softvfp
	.type	executeSequentialCommands, %function
executeSequentialCommands:
	@ args = 0, pretend = 0, frame = 432
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #432
	str	r0, [fp, #-432]
	ldr	r3, .L82
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-416]
	mov	r3, #0
	str	r3, [fp, #-420]
	b	.L74
.L80:
	ldr	r3, [fp, #-420]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-432]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-416]
	cmp	r3, r2
	beq	.L75
	ldr	r3, [fp, #-420]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-432]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #408
	mov	r1, r2
	mov	r0, r3
	bl	parseSpace
	ldr	r3, [fp, #-408]
	cmp	r3, #0
	beq	.L76
	ldr	r3, [fp, #-408]
	ldr	r1, .L82+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-404]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L75
	ldr	r0, .L82+8
	bl	perror
	b	.L75
.L76:
	ldr	r3, [fp, #-408]
	cmp	r3, #0
	beq	.L75
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-412]
	ldr	r3, [fp, #-412]
	cmp	r3, #0
	bge	.L78
	ldr	r0, .L82+12
	bl	puts
	mov	r0, #0
	bl	exit
.L78:
	ldr	r3, [fp, #-412]
	cmp	r3, #0
	bne	.L79
	mov	r1, #0
	mov	r0, #2
	bl	signal
	mov	r1, #0
	mov	r0, #20
	bl	signal
	ldr	r3, [fp, #-408]
	ldr	r1, .L82+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L75
	ldr	r3, [fp, #-408]
	sub	r2, fp, #408
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L75
	ldr	r0, .L82+16
	bl	puts
	mov	r0, #1
	bl	exit
.L79:
	sub	r3, fp, #424
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-412]
	bl	waitpid
.L75:
	ldr	r3, [fp, #-420]
	add	r3, r3, #1
	str	r3, [fp, #-420]
.L74:
	ldr	r3, [fp, #-420]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-432]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L80
	nop
	ldr	r3, .L82
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L81
	bl	__stack_chk_fail
.L81:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC13
	.word	.LC7
	.word	.LC10
	.word	.LC11
	.word	.LC8
	.size	executeSequentialCommands, .-executeSequentialCommands
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Creation of file failed\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	executeCommandRedirection
	.syntax unified
	.arm
	.fpu softvfp
	.type	executeCommandRedirection, %function
executeCommandRedirection:
	@ args = 0, pretend = 0, frame = 824
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #824
	str	r0, [fp, #-824]
	ldr	r3, .L92
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-824]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #408
	mov	r1, r2
	mov	r0, r3
	bl	parseSpace
	ldr	r3, [fp, #-824]
	ldr	r3, [r3]
	sub	r2, fp, #808
	mov	r1, r2
	mov	r0, r3
	bl	parseSpace
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-816]
	ldr	r3, [fp, #-816]
	cmp	r3, #0
	bge	.L85
	ldr	r0, .L92+4
	bl	puts
	mov	r0, #0
	bl	exit
.L85:
	ldr	r3, [fp, #-816]
	cmp	r3, #0
	bne	.L86
	mov	r1, #0
	mov	r0, #2
	bl	signal
	mov	r1, #0
	mov	r0, #20
	bl	signal
	ldr	r3, [fp, #-408]
	mov	r2, #448
	ldr	r1, .L92+8
	mov	r0, r3
	bl	open
	str	r0, [fp, #-812]
	ldr	r3, [fp, #-812]
	cmn	r3, #1
	bne	.L87
	ldr	r0, .L92+12
	bl	perror
.L87:
	mov	r1, #1
	ldr	r0, [fp, #-812]
	bl	dup2
	ldr	r0, [fp, #-812]
	bl	close
	ldr	r3, [fp, #-808]
	ldr	r1, .L92+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L91
	ldr	r3, [fp, #-808]
	sub	r2, fp, #808
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L89
	ldr	r0, .L92+20
	bl	puts
.L89:
	mov	r0, #0
	bl	exit
.L86:
	sub	r3, fp, #820
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-816]
	bl	waitpid
.L91:
	nop
	ldr	r3, .L92
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L90
	bl	__stack_chk_fail
.L90:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC15
	.word	.LC6
	.word	1089
	.word	.LC14
	.word	.LC7
	.word	.LC8
	.size	executeCommandRedirection, .-executeCommandRedirection
	.section	.rodata
	.align	2
.LC16:
	.ascii	"%s$\000"
	.align	2
.LC17:
	.ascii	"Unable to allocate buffer\000"
	.align	2
.LC18:
	.ascii	"Exiting shell...\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1448
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1440
	sub	sp, sp, #12
	ldr	r3, .L109
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #1
	mov	r0, #2
	bl	signal
	mov	r1, #1
	mov	r0, #20
	bl	signal
.L105:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	getcwd
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L109+4
	bl	printf
	mov	r3, #32
	str	r3, [fp, #-1452]
	ldr	r3, [fp, #-1452]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-1456]
	ldr	r3, [fp, #-1456]
	cmp	r3, #0
	bne	.L95
	ldr	r0, .L109+8
	bl	perror
	mov	r0, #1
	bl	exit
.L95:
	ldr	r3, .L109+12
	ldr	r2, [r3]
	sub	r1, fp, #1440
	sub	r1, r1, #12
	sub	r3, fp, #1440
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-1448]
	ldr	r4, [fp, #-1456]
	ldr	r3, [fp, #-1456]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	add	r3, r4, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-1456]
	sub	r3, fp, #1424
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	parseInput
	str	r0, [fp, #-1444]
	ldr	r3, [fp, #-1440]
	cmp	r3, #0
	beq	.L108
	ldr	r3, [fp, #-1444]
	cmp	r3, #0
	bne	.L98
	ldr	r0, .L109+16
	bl	puts
	mov	r3, #0
	ldr	r2, .L109
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L106
	b	.L107
.L98:
	ldr	r3, [fp, #-1444]
	cmp	r3, #1
	bne	.L100
	sub	r3, fp, #1424
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	executeParallelCommands
	b	.L105
.L100:
	ldr	r3, [fp, #-1444]
	cmp	r3, #2
	bne	.L102
	sub	r3, fp, #1424
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	executeSequentialCommands
	b	.L105
.L102:
	ldr	r3, [fp, #-1444]
	cmp	r3, #3
	bne	.L103
	sub	r3, fp, #1424
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	executeCommandRedirection
	b	.L105
.L103:
	ldr	r3, [fp, #-1440]
	ldr	r1, .L109+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L104
	ldr	r3, [fp, #-1436]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L105
	ldr	r0, .L109+24
	bl	puts
	b	.L105
.L104:
	sub	r3, fp, #1424
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	executeCommand
	b	.L105
.L108:
	nop
	b	.L105
.L107:
	bl	__stack_chk_fail
.L106:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L110:
	.align	2
.L109:
	.word	.LC19
	.word	.LC16
	.word	.LC17
	.word	stdin
	.word	.LC18
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
