	.file	"865781.c"
	.intel_syntax noprefix
	.text
	.local	MAX_ITEMS_ALLOWED
	.comm	MAX_ITEMS_ALLOWED,8,8
	.local	CWD
	.comm	CWD,8,8
	.local	BACKGROUND_PROCESS
	.comm	BACKGROUND_PROCESS,1,1
	.local	REDIRECT_IN_DETECTED
	.comm	REDIRECT_IN_DETECTED,1,1
	.local	REDIRECT_OUT_TRUNC_DETECTED
	.comm	REDIRECT_OUT_TRUNC_DETECTED,1,1
	.local	REDIRECT_OUT_APPEND_DETECTED
	.comm	REDIRECT_OUT_APPEND_DETECTED,1,1
	.local	INFILE_PATH
	.comm	INFILE_PATH,8,8
	.local	OUTFILE_PATH
	.comm	OUTFILE_PATH,8,8
	.local	PATH_TO_FILE
	.comm	PATH_TO_FILE,8,8
	.local	IN_FD
	.comm	IN_FD,4,4
	.local	OUT_FD
	.comm	OUT_FD,4,4
	.local	HOME_PATH
	.comm	HOME_PATH,8,8
	.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	call	repl
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"HOME"
.LC1:
	.string	" \t"
.LC2:
	.string	"Read error..."
	.text
	.globl	repl
	.type	repl, @function
repl:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	mov	QWORD PTR HOME_PATH[rip], rax
	mov	QWORD PTR CWD[rip], 0
	mov	DWORD PTR IN_FD[rip], 0
	mov	DWORD PTR OUT_FD[rip], 1
	mov	BYTE PTR BACKGROUND_PROCESS[rip], 0
	lea	rax, .LC1[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -16[rbp], 0
.L10:
	mov	QWORD PTR -40[rbp], 0
	mov	esi, 1
	mov	edi, 256
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	verify_memory_allocation
	lea	rdx, -48[rbp]
	lea	rax, -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	callocate_myargv
	mov	eax, 0
	call	display_prompt
	jmp	.L4
.L6:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	strip
	mov	QWORD PTR -40[rbp], rax
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	tokenize_input
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -16[rbp], 255
	jle	.L5
	cmp	QWORD PTR -40[rbp], 0
	jns	.L5
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_user_input
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	check_for_errors_and_terminate
	cmp	QWORD PTR -40[rbp], 0
	je	.L13
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -48[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	is_background_process
	mov	BYTE PTR BACKGROUND_PROCESS[rip], al
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	expand_home_directory_in_path
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	builtin_found_and_executed
	test	al, al
	jne	.L14
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execute_process
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	jmp	.L8
.L13:
	nop
	jmp	.L8
.L14:
	nop
.L8:
	cmp	QWORD PTR -16[rbp], 0
	jg	.L10
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	repl, .-repl
	.section	.rodata
	.align 8
.LC3:
	.string	"Failed to open a file to read from "
	.text
	.globl	open_to_read
	.type	open_to_read, @function
open_to_read:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	open_to_read, .-open_to_read
	.section	.rodata
	.align 8
.LC4:
	.string	"Failed to open a file to write to (APPEND) "
	.text
	.globl	open_to_append_write
	.type	open_to_append_write, @function
open_to_append_write:
.LFB9:
	.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 -24[rbp]
	mov	edx, 420
	mov	esi, 1089
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	open_to_append_write, .-open_to_append_write
	.section	.rodata
	.align 8
.LC5:
	.string	"Failed to open a file to write to (TRUNCATE) "
	.text
	.globl	open_to_trunc_write
	.type	open_to_trunc_write, @function
open_to_trunc_write:
.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	rax, QWORD PTR -24[rbp]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	open_to_trunc_write, .-open_to_trunc_write
	.section	.rodata
	.align 8
.LC6:
	.string	"Failed to close the file descriptor..."
	.text
	.globl	close_fd
	.type	close_fd, @function
close_fd:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
	cdqe
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	close_fd, .-close_fd
	.section	.rodata
.LC7:
	.string	"exit"
.LC8:
	.string	"cd"
.LC9:
	.string	"pwd"
	.text
	.globl	builtin_found_and_executed
	.type	builtin_found_and_executed, @function
builtin_found_and_executed:
.LFB12:
	.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	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 1
	jne	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L23
	mov	edi, 0
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L24
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	builtin_cd
	mov	eax, 1
	jmp	.L25
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L26
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 1
	jne	.L26
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 1
	jne	.L27
	mov	eax, 0
	call	builtin_pwd
	jmp	.L28
.L27:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 2
	jbe	.L28
	mov	edi, 0
	call	dup@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	edi, 1
	call	dup@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_redirects
	test	al, al
	je	.L28
	mov	eax, 0
	call	enable_output_redirects
	mov	eax, 0
	call	builtin_pwd
	lea	rdx, -12[rbp]
	lea	rax, -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	disable_redirects
.L28:
	mov	eax, 1
	jmp	.L25
.L26:
	mov	eax, 0
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	builtin_found_and_executed, .-builtin_found_and_executed
	.section	.rodata
.LC10:
	.string	"Pipe failed to create"
.LC11:
	.string	"Fork failed..."
	.align 8
.LC12:
	.string	"Execvp of first child failed..."
	.align 8
.LC13:
	.string	"Execvp of second child failed..."
	.text
	.globl	execute_process
	.type	execute_process, @function
execute_process:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -60[rbp], 0
	mov	edi, 0
	call	dup@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	edi, 1
	call	dup@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	lea	rcx, -32[rbp]
	lea	rdx, -40[rbp]
	mov	rsi, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	strip_pipes_myargv
	test	rax, rax
	je	.L32
	mov	QWORD PTR -24[rbp], 1
.L32:
	cmp	QWORD PTR -24[rbp], 0
	je	.L33
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	pipe@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
.L33:
	call	fork@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	cmp	DWORD PTR -48[rbp], 0
	jne	.L34
	cmp	QWORD PTR -24[rbp], 0
	je	.L35
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
.L35:
	mov	rdx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_redirects
	test	al, al
	je	.L36
	cmp	QWORD PTR -24[rbp], 0
	je	.L37
	mov	eax, 0
	call	enable_input_redirect
	jmp	.L36
.L37:
	mov	eax, 0
	call	enable_any_redirects
.L36:
	movzx	eax, BYTE PTR BACKGROUND_PROCESS[rip]
	test	al, al
	je	.L38
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, 0
	mov	edi, eax
	call	setpgid@PLT
.L38:
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC12[rip]
	call	err_exit
	jmp	.L39
.L34:
	cmp	DWORD PTR -48[rbp], 0
	jle	.L39
	cmp	QWORD PTR -24[rbp], 0
	je	.L40
	call	fork@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	cmp	DWORD PTR -44[rbp], 0
	jne	.L41
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_redirects
	test	al, al
	je	.L42
	mov	eax, 0
	call	enable_output_redirects
.L42:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC13[rip]
	call	perror@PLT
	jmp	.L40
.L41:
	cmp	DWORD PTR -44[rbp], 0
	jle	.L40
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	nop
.L43:
	lea	rax, -60[rbp]
	mov	rdi, rax
	call	wait@PLT
	test	eax, eax
	je	.L43
	nop
.L44:
	lea	rax, -60[rbp]
	mov	rdi, rax
	call	wait@PLT
	test	eax, eax
	je	.L44
.L40:
	movzx	eax, BYTE PTR BACKGROUND_PROCESS[rip]
	test	al, al
	jne	.L45
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	getpgid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, edx
	mov	edi, eax
	call	setpgid@PLT
	lea	rax, -60[rbp]
	mov	edx, 2
	mov	rsi, rax
	mov	edi, 0
	call	waitpid@PLT
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -48[rbp], 0
.L45:
	lea	rax, -60[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, -1
	call	waitpid@PLT
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -48[rbp], 0
.L39:
	lea	rdx, -52[rbp]
	lea	rax, -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	disable_redirects
	nop
	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
.LFE13:
	.size	execute_process, .-execute_process
	.globl	expand_home_directory_in_path
	.type	expand_home_directory_in_path, @function
expand_home_directory_in_path:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 1
	jmp	.L48
.L50:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	mov	edx, 126
	cmp	al, dl
	jne	.L49
	mov	esi, 1
	mov	edi, 4096
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR HOME_PATH[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR HOME_PATH[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
.L49:
	add	DWORD PTR -12[rbp], 1
.L48:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rdx, rax
	jb	.L50
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	expand_home_directory_in_path, .-expand_home_directory_in_path
	.globl	collapse_home_path
	.type	collapse_home_path, @function
collapse_home_path:
.LFB15:
	.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 HOME_PATH[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR HOME_PATH[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L52
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, 1
	add	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 126
.L52:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	collapse_home_path, .-collapse_home_path
	.section	.rodata
.LC14:
	.string	"msh "
.LC15:
	.string	" $ "
	.string	""
	.text
	.globl	generate_prompt
	.type	generate_prompt, @function
generate_prompt:
.LFB16:
	.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	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	collapse_home_path
	mov	QWORD PTR -40[rbp], rax
	mov	esi, 1
	mov	edi, 4096
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	lea	rax, .LC14[rip]
	mov	QWORD PTR -16[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	generate_prompt, .-generate_prompt
	.section	.rodata
.LC16:
	.string	"|"
	.text
	.globl	strip_pipes_myargv
	.type	strip_pipes_myargv, @function
strip_pipes_myargv:
.LFB17:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -8[rbp], 0
	jmp	.L57
.L60:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	mov	QWORD PTR -8[rbp], rax
	jmp	.L58
.L59:
	add	QWORD PTR -8[rbp], 1
.L58:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L59
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, rdx
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
.L57:
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC16[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	strip_myargv
	test	rax, rax
	jne	.L60
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	strip_pipes_myargv, .-strip_pipes_myargv
	.globl	strip_myargv
	.type	strip_myargv, @function
strip_myargv:
.LFB18:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	sub	rax, 1
	mov	QWORD PTR -8[rbp], rax
	jmp	.L63
.L67:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L64
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	sub	rax, QWORD PTR -8[rbp]
	cmp	rax, 1
	jbe	.L65
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR PATH_TO_FILE[rip], rax
.L65:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L66
.L64:
	sub	QWORD PTR -8[rbp], 1
.L63:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L67
	mov	eax, 0
.L66:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	strip_myargv, .-strip_myargv
	.section	.rodata
.LC17:
	.string	"&"
	.text
	.globl	is_background_process
	.type	is_background_process, @function
is_background_process:
.LFB19:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L69
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, 1
	jmp	.L70
.L69:
	mov	eax, 0
.L70:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	is_background_process, .-is_background_process
	.section	.rodata
.LC18:
	.string	">"
.LC19:
	.string	">>"
.LC20:
	.string	"<"
	.text
	.globl	parse_redirects
	.type	parse_redirects, @function
parse_redirects:
.LFB20:
	.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	BYTE PTR -1[rbp], 0
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC18[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	strip_myargv
	test	rax, rax
	je	.L72
	mov	BYTE PTR REDIRECT_OUT_TRUNC_DETECTED[rip], 1
	mov	rax, QWORD PTR PATH_TO_FILE[rip]
	mov	QWORD PTR OUTFILE_PATH[rip], rax
	mov	QWORD PTR PATH_TO_FILE[rip], 0
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L72:
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC19[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	strip_myargv
	test	rax, rax
	je	.L73
	mov	BYTE PTR REDIRECT_OUT_APPEND_DETECTED[rip], 1
	mov	rax, QWORD PTR PATH_TO_FILE[rip]
	mov	QWORD PTR OUTFILE_PATH[rip], rax
	mov	QWORD PTR PATH_TO_FILE[rip], 0
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L73:
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC20[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	strip_myargv
	test	rax, rax
	je	.L74
	mov	BYTE PTR REDIRECT_IN_DETECTED[rip], 1
	mov	rax, QWORD PTR PATH_TO_FILE[rip]
	mov	QWORD PTR INFILE_PATH[rip], rax
	mov	QWORD PTR PATH_TO_FILE[rip], 0
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L74:
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	parse_redirects, .-parse_redirects
	.globl	enable_any_redirects
	.type	enable_any_redirects, @function
enable_any_redirects:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	enable_input_redirect
	mov	eax, 0
	call	enable_output_redirects
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	enable_any_redirects, .-enable_any_redirects
	.globl	enable_input_redirect
	.type	enable_input_redirect, @function
enable_input_redirect:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR REDIRECT_IN_DETECTED[rip]
	test	al, al
	je	.L79
	mov	rax, QWORD PTR INFILE_PATH[rip]
	mov	rdi, rax
	call	open_to_read
	mov	DWORD PTR IN_FD[rip], eax
	mov	eax, DWORD PTR IN_FD[rip]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
.L79:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	enable_input_redirect, .-enable_input_redirect
	.globl	enable_output_redirects
	.type	enable_output_redirects, @function
enable_output_redirects:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR REDIRECT_OUT_TRUNC_DETECTED[rip]
	test	al, al
	je	.L81
	mov	rax, QWORD PTR OUTFILE_PATH[rip]
	mov	rdi, rax
	call	open_to_trunc_write
	mov	DWORD PTR OUT_FD[rip], eax
	mov	eax, DWORD PTR OUT_FD[rip]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
.L81:
	movzx	eax, BYTE PTR REDIRECT_OUT_APPEND_DETECTED[rip]
	test	al, al
	je	.L83
	mov	rax, QWORD PTR OUTFILE_PATH[rip]
	mov	rdi, rax
	call	open_to_append_write
	mov	DWORD PTR OUT_FD[rip], eax
	mov	eax, DWORD PTR OUT_FD[rip]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
.L83:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	enable_output_redirects, .-enable_output_redirects
	.globl	disable_redirects
	.type	disable_redirects, @function
disable_redirects:
.LFB24:
	.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	QWORD PTR -16[rbp], rsi
	movzx	eax, BYTE PTR REDIRECT_IN_DETECTED[rip]
	test	al, al
	je	.L85
	lea	rdi, IN_FD[rip]
	call	close_fd
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	BYTE PTR REDIRECT_IN_DETECTED[rip], 0
.L85:
	movzx	eax, BYTE PTR REDIRECT_OUT_TRUNC_DETECTED[rip]
	test	al, al
	je	.L86
	lea	rdi, OUT_FD[rip]
	call	close_fd
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	BYTE PTR REDIRECT_OUT_TRUNC_DETECTED[rip], 0
.L86:
	movzx	eax, BYTE PTR REDIRECT_OUT_APPEND_DETECTED[rip]
	test	al, al
	je	.L88
	lea	rdi, OUT_FD[rip]
	call	close_fd
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	BYTE PTR REDIRECT_OUT_APPEND_DETECTED[rip], 0
.L88:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	disable_redirects, .-disable_redirects
	.section	.rodata
.LC21:
	.string	"~"
.LC22:
	.string	"-"
.LC23:
	.string	"OLDPWD"
	.text
	.globl	builtin_cd
	.type	builtin_cd, @function
builtin_cd:
.LFB25:
	.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 CWD[rip]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR CWD[rip], rax
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L90
	mov	rax, QWORD PTR HOME_PATH[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L91
.L90:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 2
	jbe	.L92
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L93
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L93
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L92
.L93:
	mov	rax, QWORD PTR HOME_PATH[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L91
.L92:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L94
	lea	rdi, .LC23[rip]
	call	getenv@PLT
	mov	QWORD PTR -16[rbp], rax
	jmp	.L91
.L94:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 36
	jne	.L95
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	mov	rdi, rax
	call	getenv@PLT
	mov	QWORD PTR -16[rbp], rax
	jmp	.L91
.L95:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
.L91:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	check_for_errors_gracefully
	cmp	QWORD PTR -8[rbp], 0
	js	.L97
	mov	rax, QWORD PTR CWD[rip]
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	call	setenv@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	check_for_errors_gracefully
.L97:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	builtin_cd, .-builtin_cd
	.section	.rodata
.LC24:
	.string	"Write error..."
.LC25:
	.string	"\n"
	.text
	.globl	builtin_pwd
	.type	builtin_pwd, @function
builtin_pwd:
.LFB26:
	.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	rax, QWORD PTR CWD[rip]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR CWD[rip], rax
	mov	rax, QWORD PTR CWD[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR CWD[rip]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	mov	edx, 1
	lea	rsi, .LC25[rip]
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	call	check_for_errors_gracefully
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	builtin_pwd, .-builtin_pwd
	.globl	tokenize_input
	.type	tokenize_input, @function
tokenize_input:
.LFB27:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
	jmp	.L100
.L102:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR MAX_ITEMS_ALLOWED[rip]
	cmp	rdx, rax
	jb	.L101
	mov	rax, QWORD PTR MAX_ITEMS_ALLOWED[rip]
	add	rax, rax
	mov	QWORD PTR MAX_ITEMS_ALLOWED[rip], rax
	mov	rdx, QWORD PTR MAX_ITEMS_ALLOWED[rip]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	reallocate
.L101:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
.L100:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L102
	mov	rax, QWORD PTR -48[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	tokenize_input, .-tokenize_input
	.globl	strip
	.type	strip, @function
strip:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	QWORD PTR -40[rbp], rdx
	mov	BYTE PTR -28[rbp], al
	mov	QWORD PTR -8[rbp], -1
	mov	DWORD PTR -12[rbp], 0
	jmp	.L105
.L107:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -28[rbp], al
	jne	.L106
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	QWORD PTR -8[rbp], rax
.L106:
	add	DWORD PTR -12[rbp], 1
.L105:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	cmp	QWORD PTR -40[rbp], rax
	jg	.L107
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	strip, .-strip
	.globl	callocate_myargv
	.type	callocate_myargv, @function
callocate_myargv:
.LFB29:
	.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	QWORD PTR -16[rbp], rsi
	mov	esi, 8
	mov	edi, 32
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	verify_memory_allocation
	mov	QWORD PTR MAX_ITEMS_ALLOWED[rip], 32
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	callocate_myargv, .-callocate_myargv
	.globl	reallocate
	.type	reallocate, @function
reallocate:
.LFB30:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	reallocate, .-reallocate
	.globl	display_prompt
	.type	display_prompt, @function
display_prompt:
.LFB31:
	.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	rax, QWORD PTR CWD[rip]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR CWD[rip], rax
	mov	rax, QWORD PTR CWD[rip]
	mov	rdi, rax
	call	generate_prompt
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	call	check_for_errors_and_terminate
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	display_prompt, .-display_prompt
	.globl	get_user_input
	.type	get_user_input, @function
get_user_input:
.LFB32:
	.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	edx, 256
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	get_user_input, .-get_user_input
	.globl	err_exit
	.type	err_exit, @function
err_exit:
.LFB33:
	.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	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE33:
	.size	err_exit, .-err_exit
	.globl	check_for_errors_and_terminate
	.type	check_for_errors_and_terminate, @function
check_for_errors_and_terminate:
.LFB34:
	.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	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -8[rbp], 0
	jns	.L117
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	err_exit
.L117:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE34:
	.size	check_for_errors_and_terminate, .-check_for_errors_and_terminate
	.globl	check_for_errors_gracefully
	.type	check_for_errors_gracefully, @function
check_for_errors_gracefully:
.LFB35:
	.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	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -8[rbp], 0
	jns	.L120
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	perror@PLT
.L120:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE35:
	.size	check_for_errors_gracefully, .-check_for_errors_gracefully
	.section	.rodata
	.align 8
.LC26:
	.string	"Unable to allocate dynamic memory..."
	.text
	.globl	verify_memory_allocation
	.type	verify_memory_allocation, @function
verify_memory_allocation:
.LFB36:
	.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
	cmp	QWORD PTR -8[rbp], 0
	jne	.L123
	lea	rdi, .LC26[rip]
	call	err_exit
.L123:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.size	verify_memory_allocation, .-verify_memory_allocation
	.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	"865781.c"
	.text
	.local	MAX_ITEMS_ALLOWED
	.comm	MAX_ITEMS_ALLOWED,4,4
	.local	CWD
	.comm	CWD,4,4
	.local	BACKGROUND_PROCESS
	.comm	BACKGROUND_PROCESS,1,1
	.local	REDIRECT_IN_DETECTED
	.comm	REDIRECT_IN_DETECTED,1,1
	.local	REDIRECT_OUT_TRUNC_DETECTED
	.comm	REDIRECT_OUT_TRUNC_DETECTED,1,1
	.local	REDIRECT_OUT_APPEND_DETECTED
	.comm	REDIRECT_OUT_APPEND_DETECTED,1,1
	.local	INFILE_PATH
	.comm	INFILE_PATH,4,4
	.local	OUTFILE_PATH
	.comm	OUTFILE_PATH,4,4
	.local	PATH_TO_FILE
	.comm	PATH_TO_FILE,4,4
	.local	IN_FD
	.comm	IN_FD,4,4
	.local	OUT_FD
	.comm	OUT_FD,4,4
	.local	HOME_PATH
	.comm	HOME_PATH,4,4
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-12]
	bl	repl
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"HOME\000"
	.align	2
.LC1:
	.ascii	" \011\000"
	.align	2
.LC2:
	.ascii	"Read error...\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	repl
	.syntax unified
	.arm
	.fpu softvfp
	.type	repl, %function
repl:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L15+4
	bl	getenv
	mov	r3, r0
	ldr	r2, .L15+8
	str	r3, [r2]
	ldr	r3, .L15+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L15+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L15+20
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L15+24
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L15+28
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
.L10:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r1, #1
	mov	r0, #256
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	verify_memory_allocation
	sub	r2, fp, #28
	sub	r3, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	callocate_myargv
	bl	display_prompt
	b	.L4
.L6:
	ldr	r2, [fp, #-12]
	mov	r1, #10
	ldr	r0, [fp, #-16]
	bl	strip
	str	r0, [fp, #-24]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	tokenize_input
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	cmp	r3, #255
	ble	.L5
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L5
.L4:
	ldr	r0, [fp, #-16]
	bl	get_user_input
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L6
.L5:
	ldr	r1, .L15+32
	ldr	r0, [fp, #-12]
	bl	check_for_errors_and_terminate
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L13
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	is_background_process
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L15+24
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	expand_home_directory_in_path
	ldr	r3, [fp, #-32]
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	builtin_found_and_executed
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-32]
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	execute_process
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	free
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L8
.L13:
	nop
	b	.L8
.L14:
	nop
.L8:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L10
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC0
	.word	HOME_PATH
	.word	CWD
	.word	IN_FD
	.word	OUT_FD
	.word	BACKGROUND_PROCESS
	.word	.LC1
	.word	.LC2
	.size	repl, .-repl
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Failed to open a file to read from \000"
	.text
	.align	2
	.global	open_to_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_to_read, %function
open_to_read:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r1, .L19
	ldr	r0, [fp, #-8]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC4
	.size	open_to_read, .-open_to_read
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Failed to open a file to write to (APPEND) \000"
	.text
	.align	2
	.global	open_to_append_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_to_append_write, %function
open_to_append_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r2, #420
	ldr	r1, .L23
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r1, .L23+4
	ldr	r0, [fp, #-8]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	1089
	.word	.LC5
	.size	open_to_append_write, .-open_to_append_write
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Failed to open a file to write to (TRUNCATE) \000"
	.text
	.align	2
	.global	open_to_trunc_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_to_trunc_write, %function
open_to_trunc_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r2, #420
	ldr	r1, .L27
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r1, .L27+4
	ldr	r0, [fp, #-8]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	577
	.word	.LC6
	.size	open_to_trunc_write, .-open_to_trunc_write
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Failed to close the file descriptor...\000"
	.text
	.align	2
	.global	close_fd
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_fd, %function
close_fd:
	@ 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	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, r0
	ldr	r1, .L30
	mov	r0, r3
	bl	check_for_errors_gracefully
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC7
	.size	close_fd, .-close_fd
	.section	.rodata
	.align	2
.LC8:
	.ascii	"exit\000"
	.align	2
.LC9:
	.ascii	"cd\000"
	.align	2
.LC10:
	.ascii	"pwd\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	builtin_found_and_executed
	.syntax unified
	.arm
	.fpu softvfp
	.type	builtin_found_and_executed, %function
builtin_found_and_executed:
	@ 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, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L33
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, .L41+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L33
	mov	r0, #0
	bl	exit
.L33:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, .L41+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L34
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	builtin_cd
	mov	r3, #1
	b	.L35
.L34:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, .L41+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L36
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L37
	bl	builtin_pwd
	b	.L38
.L37:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #2
	bls	.L38
	mov	r0, #0
	bl	dup
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r0, #1
	bl	dup
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	parse_redirects
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	bl	enable_output_redirects
	bl	builtin_pwd
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	disable_redirects
.L38:
	mov	r3, #1
	b	.L35
.L36:
	mov	r3, #0
.L35:
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC11
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	builtin_found_and_executed, .-builtin_found_and_executed
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Pipe failed to create\000"
	.align	2
.LC13:
	.ascii	"Fork failed...\000"
	.align	2
.LC14:
	.ascii	"Execvp of first child failed...\000"
	.align	2
.LC15:
	.ascii	"Execvp of second child failed...\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	execute_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_process, %function
execute_process:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L59
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r0, #0
	bl	dup
	mov	r3, r0
	str	r3, [fp, #-44]
	mov	r0, #1
	bl	dup
	mov	r3, r0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r3, fp, #32
	sub	r2, fp, #36
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-56]
	bl	strip_pipes_myargv
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	mov	r3, #1
	str	r3, [fp, #-28]
.L44:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L45
	sub	r3, fp, #16
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	ldr	r1, .L59+4
	mov	r0, r3
	bl	check_for_errors_gracefully
.L45:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r1, .L59+8
	ldr	r0, [fp, #-24]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L46
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L47
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-12]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
.L47:
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-56]
	bl	parse_redirects
	mov	r3, r0
	cmp	r3, #0
	beq	.L48
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L49
	bl	enable_input_redirect
	b	.L48
.L49:
	bl	enable_any_redirects
.L48:
	ldr	r3, .L59+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L50
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	setpgid
.L50:
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	ldr	r1, [fp, #-56]
	mov	r0, r3
	bl	execvp
	ldr	r0, .L59+16
	bl	err_exit
	b	.L51
.L46:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L51
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L52
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r1, .L59+8
	ldr	r0, [fp, #-20]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L53
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	ldr	r3, [fp, #-36]
	sub	r2, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	parse_redirects
	mov	r3, r0
	cmp	r3, #0
	beq	.L54
	bl	enable_output_redirects
.L54:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	ldr	r0, .L59+20
	bl	perror
	b	.L52
.L53:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L52
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	nop
.L55:
	sub	r3, fp, #48
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmp	r3, #0
	beq	.L55
	nop
.L56:
	sub	r3, fp, #48
	mov	r0, r3
	bl	wait
	mov	r3, r0
	cmp	r3, #0
	beq	.L56
.L52:
	ldr	r3, .L59+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L57
	ldr	r0, [fp, #-24]
	bl	getpgid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	setpgid
	sub	r3, fp, #48
	mov	r2, #2
	mov	r1, r3
	mov	r0, #0
	bl	waitpid
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
.L57:
	sub	r3, fp, #48
	mov	r2, #1
	mov	r1, r3
	mvn	r0, #0
	bl	waitpid
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
.L51:
	sub	r2, fp, #40
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	disable_redirects
	nop
	ldr	r3, .L59
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L58
	bl	__stack_chk_fail
.L58:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC16
	.word	.LC12
	.word	.LC13
	.word	BACKGROUND_PROCESS
	.word	.LC14
	.word	.LC15
	.size	execute_process, .-execute_process
	.align	2
	.global	expand_home_directory_in_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	expand_home_directory_in_path, %function
expand_home_directory_in_path:
	@ 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, #1
	str	r3, [fp, #-20]
	b	.L62
.L64:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #126
	cmp	r3, r2
	bne	.L63
	mov	r1, #1
	mov	r0, #4096
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, .L65
	ldr	r4, [r3]
	ldr	r3, .L65
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-16]
	bl	memcpy
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	strcat
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
.L63:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L62:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bhi	.L64
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L66:
	.align	2
.L65:
	.word	HOME_PATH
	.size	expand_home_directory_in_path, .-expand_home_directory_in_path
	.align	2
	.global	collapse_home_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	collapse_home_path, %function
collapse_home_path:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	str	r0, [fp, #-12]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L68
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #126
	strb	r2, [r3]
.L68:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	HOME_PATH
	.size	collapse_home_path, .-collapse_home_path
	.section	.rodata
	.align	2
.LC17:
	.ascii	"msh \000"
	.align	2
.LC18:
	.ascii	" $ \000\000"
	.text
	.align	2
	.global	generate_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_prompt, %function
generate_prompt:
	@ 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	r0, [fp, #-24]
	bl	collapse_home_path
	str	r0, [fp, #-24]
	mov	r1, #1
	mov	r0, #4096
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, .L74
	str	r3, [fp, #-12]
	ldr	r3, .L74+4
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	memcpy
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	strcat
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	strcat
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC17
	.word	.LC18
	.size	generate_prompt, .-generate_prompt
	.section	.rodata
	.align	2
.LC19:
	.ascii	"|\000"
	.text
	.align	2
	.global	strip_pipes_myargv
	.syntax unified
	.arm
	.fpu softvfp
	.type	strip_pipes_myargv, %function
strip_pipes_myargv:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L77
.L80:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L78
.L79:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L78:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L79
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	sub	r3, r2, r3
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
.L77:
	ldr	r2, .L82
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strip_myargv
	mov	r3, r0
	cmp	r3, #0
	bne	.L80
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC19
	.size	strip_pipes_myargv, .-strip_pipes_myargv
	.align	2
	.global	strip_myargv
	.syntax unified
	.arm
	.fpu softvfp
	.type	strip_myargv, %function
strip_myargv:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L85
.L89:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L86
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	cmp	r3, #1
	bls	.L87
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L90
	str	r3, [r2]
.L87:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	b	.L88
.L86:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L85:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L89
	mov	r3, #0
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	PATH_TO_FILE
	.size	strip_myargv, .-strip_myargv
	.section	.rodata
	.align	2
.LC20:
	.ascii	"&\000"
	.text
	.align	2
	.global	is_background_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_background_process, %function
is_background_process:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L95
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L93
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	mov	r3, #1
	b	.L94
.L93:
	mov	r3, #0
.L94:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L96:
	.align	2
.L95:
	.word	.LC20
	.size	is_background_process, .-is_background_process
	.section	.rodata
	.align	2
.LC21:
	.ascii	">\000"
	.align	2
.LC22:
	.ascii	">>\000"
	.align	2
.LC23:
	.ascii	"<\000"
	.text
	.align	2
	.global	parse_redirects
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_redirects, %function
parse_redirects:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	strb	r3, [fp, #-5]
	ldr	r2, .L102
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strip_myargv
	mov	r3, r0
	cmp	r3, #0
	beq	.L98
	ldr	r3, .L102+4
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, .L102+8
	ldr	r3, [r3]
	ldr	r2, .L102+12
	str	r3, [r2]
	ldr	r3, .L102+8
	mov	r2, #0
	str	r2, [r3]
	ldrb	r3, [fp, #-5]
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L98:
	ldr	r2, .L102+16
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strip_myargv
	mov	r3, r0
	cmp	r3, #0
	beq	.L99
	ldr	r3, .L102+20
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, .L102+8
	ldr	r3, [r3]
	ldr	r2, .L102+12
	str	r3, [r2]
	ldr	r3, .L102+8
	mov	r2, #0
	str	r2, [r3]
	ldrb	r3, [fp, #-5]
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L99:
	ldr	r2, .L102+24
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strip_myargv
	mov	r3, r0
	cmp	r3, #0
	beq	.L100
	ldr	r3, .L102+28
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, .L102+8
	ldr	r3, [r3]
	ldr	r2, .L102+32
	str	r3, [r2]
	ldr	r3, .L102+8
	mov	r2, #0
	str	r2, [r3]
	ldrb	r3, [fp, #-5]
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L100:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L103:
	.align	2
.L102:
	.word	.LC21
	.word	REDIRECT_OUT_TRUNC_DETECTED
	.word	PATH_TO_FILE
	.word	OUTFILE_PATH
	.word	.LC22
	.word	REDIRECT_OUT_APPEND_DETECTED
	.word	.LC23
	.word	REDIRECT_IN_DETECTED
	.word	INFILE_PATH
	.size	parse_redirects, .-parse_redirects
	.align	2
	.global	enable_any_redirects
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_any_redirects, %function
enable_any_redirects:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	enable_input_redirect
	bl	enable_output_redirects
	nop
	pop	{fp, pc}
	.size	enable_any_redirects, .-enable_any_redirects
	.align	2
	.global	enable_input_redirect
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_input_redirect, %function
enable_input_redirect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L108
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L107
	ldr	r3, .L108+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	open_to_read
	mov	r3, r0
	ldr	r2, .L108+8
	str	r3, [r2]
	ldr	r3, .L108+8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
.L107:
	nop
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	REDIRECT_IN_DETECTED
	.word	INFILE_PATH
	.word	IN_FD
	.size	enable_input_redirect, .-enable_input_redirect
	.align	2
	.global	enable_output_redirects
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_output_redirects, %function
enable_output_redirects:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L114
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L111
	ldr	r3, .L114+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	open_to_trunc_write
	mov	r3, r0
	ldr	r2, .L114+8
	str	r3, [r2]
	ldr	r3, .L114+8
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
.L111:
	ldr	r3, .L114+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L113
	ldr	r3, .L114+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	open_to_append_write
	mov	r3, r0
	ldr	r2, .L114+8
	str	r3, [r2]
	ldr	r3, .L114+8
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
.L113:
	nop
	pop	{fp, pc}
.L115:
	.align	2
.L114:
	.word	REDIRECT_OUT_TRUNC_DETECTED
	.word	OUTFILE_PATH
	.word	OUT_FD
	.word	REDIRECT_OUT_APPEND_DETECTED
	.size	enable_output_redirects, .-enable_output_redirects
	.align	2
	.global	disable_redirects
	.syntax unified
	.arm
	.fpu softvfp
	.type	disable_redirects, %function
disable_redirects:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, .L121
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L117
	ldr	r0, .L121+4
	bl	close_fd
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	ldr	r3, .L121
	mov	r2, #0
	strb	r2, [r3]
.L117:
	ldr	r3, .L121+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L118
	ldr	r0, .L121+12
	bl	close_fd
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	ldr	r3, .L121+8
	mov	r2, #0
	strb	r2, [r3]
.L118:
	ldr	r3, .L121+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L120
	ldr	r0, .L121+12
	bl	close_fd
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	ldr	r3, .L121+16
	mov	r2, #0
	strb	r2, [r3]
.L120:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L122:
	.align	2
.L121:
	.word	REDIRECT_IN_DETECTED
	.word	IN_FD
	.word	REDIRECT_OUT_TRUNC_DETECTED
	.word	OUT_FD
	.word	REDIRECT_OUT_APPEND_DETECTED
	.size	disable_redirects, .-disable_redirects
	.section	.rodata
	.align	2
.LC24:
	.ascii	"~\000"
	.align	2
.LC25:
	.ascii	"-\000"
	.align	2
.LC26:
	.ascii	"OLDPWD\000"
	.text
	.align	2
	.global	builtin_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	builtin_cd, %function
builtin_cd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L132
	ldr	r3, [r3]
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	ldr	r2, .L132
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L132+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L124
	ldr	r3, .L132+8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L125
.L124:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #2
	bls	.L126
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L132+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L127
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L132+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L127
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L132+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L126
.L127:
	ldr	r3, .L132+8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L125
.L126:
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L132+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L128
	ldr	r0, .L132+28
	bl	getenv
	str	r0, [fp, #-12]
	b	.L125
.L128:
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #36
	bne	.L129
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r0, r3
	bl	getenv
	str	r0, [fp, #-12]
	b	.L125
.L129:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
.L125:
	ldr	r0, [fp, #-12]
	bl	chdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	check_for_errors_gracefully
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L131
	ldr	r3, .L132
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, r3
	ldr	r0, .L132+28
	bl	setenv
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	check_for_errors_gracefully
.L131:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L133:
	.align	2
.L132:
	.word	CWD
	.word	.LC24
	.word	HOME_PATH
	.word	.LC23
	.word	.LC21
	.word	.LC22
	.word	.LC25
	.word	.LC26
	.size	builtin_cd, .-builtin_cd
	.section	.rodata
	.align	2
.LC27:
	.ascii	"Write error...\000"
	.align	2
.LC28:
	.ascii	"\012\000"
	.text
	.align	2
	.global	builtin_pwd
	.syntax unified
	.arm
	.fpu softvfp
	.type	builtin_pwd, %function
builtin_pwd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	ldr	r3, .L135
	ldr	r3, [r3]
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	ldr	r2, .L135
	str	r3, [r2]
	ldr	r3, .L135
	ldr	r4, [r3]
	ldr	r3, .L135
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	mov	r0, #1
	bl	write
	str	r0, [fp, #-16]
	ldr	r1, .L135+4
	ldr	r0, [fp, #-16]
	bl	check_for_errors_gracefully
	mov	r2, #1
	ldr	r1, .L135+8
	mov	r0, #1
	bl	write
	str	r0, [fp, #-16]
	ldr	r1, .L135+4
	ldr	r0, [fp, #-16]
	bl	check_for_errors_gracefully
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L136:
	.align	2
.L135:
	.word	CWD
	.word	.LC27
	.word	.LC28
	.size	builtin_pwd, .-builtin_pwd
	.align	2
	.global	tokenize_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	tokenize_input, %function
tokenize_input:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strtok
	str	r0, [fp, #-8]
	b	.L138
.L140:
	ldr	r3, [fp, #-28]
	sub	r2, r3, #1
	ldr	r3, .L142
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L139
	ldr	r3, .L142
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, .L142
	str	r3, [r2]
	ldr	r3, .L142
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	reallocate
.L139:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-8]
.L138:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L140
	ldr	r3, [fp, #-28]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L143:
	.align	2
.L142:
	.word	MAX_ITEMS_ALLOWED
	.size	tokenize_input, .-tokenize_input
	.align	2
	.global	strip
	.syntax unified
	.arm
	.fpu softvfp
	.type	strip, %function
strip:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	mov	r3, r1
	str	r2, [fp, #-24]
	strb	r3, [fp, #-17]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L145
.L147:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L146
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L146:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L145:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L147
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	strip, .-strip
	.align	2
	.global	callocate_myargv
	.syntax unified
	.arm
	.fpu softvfp
	.type	callocate_myargv, %function
callocate_myargv:
	@ 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]
	str	r1, [fp, #-12]
	mov	r1, #4
	mov	r0, #32
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	verify_memory_allocation
	ldr	r3, .L150
	mov	r2, #32
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	MAX_ITEMS_ALLOWED
	.size	callocate_myargv, .-callocate_myargv
	.align	2
	.global	reallocate
	.syntax unified
	.arm
	.fpu softvfp
	.type	reallocate, %function
reallocate:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	reallocate, .-reallocate
	.align	2
	.global	display_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_prompt, %function
display_prompt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L154
	ldr	r3, [r3]
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	ldr	r2, .L154
	str	r3, [r2]
	ldr	r3, .L154
	ldr	r3, [r3]
	mov	r0, r3
	bl	generate_prompt
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-12]
	mov	r0, #1
	bl	write
	str	r0, [fp, #-8]
	ldr	r1, .L154+4
	ldr	r0, [fp, #-8]
	bl	check_for_errors_and_terminate
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L155:
	.align	2
.L154:
	.word	CWD
	.word	.LC27
	.size	display_prompt, .-display_prompt
	.align	2
	.global	get_user_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_user_input, %function
get_user_input:
	@ 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]
	mov	r2, #256
	ldr	r1, [fp, #-8]
	mov	r0, #0
	bl	read
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_user_input, .-get_user_input
	.align	2
	.global	err_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	err_exit, %function
err_exit:
	@ 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	perror
	mov	r0, #1
	bl	exit
	.size	err_exit, .-err_exit
	.align	2
	.global	check_for_errors_and_terminate
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_for_errors_and_terminate, %function
check_for_errors_and_terminate:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L161
	ldr	r0, [fp, #-12]
	bl	err_exit
.L161:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_for_errors_and_terminate, .-check_for_errors_and_terminate
	.align	2
	.global	check_for_errors_gracefully
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_for_errors_gracefully, %function
check_for_errors_gracefully:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L164
	ldr	r0, [fp, #-12]
	bl	perror
.L164:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_for_errors_gracefully, .-check_for_errors_gracefully
	.section	.rodata
	.align	2
.LC29:
	.ascii	"Unable to allocate dynamic memory...\000"
	.text
	.align	2
	.global	verify_memory_allocation
	.syntax unified
	.arm
	.fpu softvfp
	.type	verify_memory_allocation, %function
verify_memory_allocation:
	@ 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	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L167
	ldr	r0, .L168
	bl	err_exit
.L167:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L169:
	.align	2
.L168:
	.word	.LC29
	.size	verify_memory_allocation, .-verify_memory_allocation
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
