	.file	"150144245.c"
	.intel_syntax noprefix
	.text
	.globl	arg_count
	.bss
	.align 4
	.type	arg_count, @object
	.size	arg_count, 4
arg_count:
	.zero	4
	.globl	path_output
	.align 8
	.type	path_output, @object
	.size	path_output, 8
path_output:
	.zero	8
	.globl	path_error
	.align 8
	.type	path_error, @object
	.size	path_error, 8
path_error:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%s: %s\n"
	.text
	.globl	print_error
	.type	print_error, @function
print_error:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	print_error, .-print_error
	.section	.rodata
.LC1:
	.string	"calloc"
	.text
	.globl	Calloc
	.type	Calloc, @function
Calloc:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L3
	lea	rdi, .LC1[rip]
	call	print_error
.L3:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Calloc, .-Calloc
	.section	.rodata
.LC2:
	.string	"malloc"
	.text
	.globl	Malloc
	.type	Malloc, @function
Malloc:
.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	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	lea	rdi, .LC2[rip]
	call	print_error
.L6:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Malloc, .-Malloc
	.section	.rodata
.LC3:
	.string	"shit"
	.text
	.globl	parse_line
	.type	parse_line, @function
parse_line:
.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
	mov	DWORD PTR arg_count[rip], 0
	jmp	.L9
.L17:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	BYTE PTR [rax], 0
.L10:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L11
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L11
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L11
	jmp	.L12
.L14:
	add	DWORD PTR -24[rbp], 1
	add	QWORD PTR -40[rbp], 1
.L12:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L13
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L13
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L13
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L14
.L13:
	cmp	DWORD PTR -20[rbp], 20
	jle	.L15
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	Calloc
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	neg	rax
	add	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	QWORD PTR -40[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L9:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L17
.L16:
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR arg_count[rip], eax
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	parse_line, .-parse_line
	.section	.rodata
.LC4:
	.string	"cd"
	.text
	.globl	execute_cd
	.type	execute_cd, @function
execute_cd:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L20
	lea	rdi, .LC4[rip]
	call	print_error
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	execute_cd, .-execute_cd
	.section	.rodata
.LC5:
	.string	"path done"
	.text
	.globl	execute_path
	.type	execute_path, @function
execute_path:
.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
	lea	rdi, .LC5[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	execute_path, .-execute_path
	.section	.rodata
.LC6:
	.string	"exit"
.LC7:
	.string	"path"
	.text
	.globl	is_built_in
	.type	is_built_in, @function
is_built_in:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	rax, QWORD PTR -32[rbp+rax*8]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	rcx, QWORD PTR -32[rbp+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L24
	mov	eax, 1
	jmp	.L27
.L24:
	add	DWORD PTR -36[rbp], 1
.L23:
	cmp	DWORD PTR -36[rbp], 2
	jle	.L26
	mov	eax, 0
.L27:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	is_built_in, .-is_built_in
	.section	.rodata
.LC8:
	.string	"%s\t"
.LC9:
	.string	"arg_count: %d\n"
	.text
	.globl	print_arg
	.type	print_arg, @function
print_arg:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L30:
	mov	eax, DWORD PTR arg_count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L31
	mov	eax, DWORD PTR arg_count[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	print_arg, .-print_arg
	.section	.rodata
.LC10:
	.string	"fork"
.LC11:
	.string	"open"
.LC12:
	.string	"dup2"
.LC13:
	.string	"execvp"
.LC14:
	.string	"%u \357\240\220 \n"
	.text
	.globl	execute_cmd
	.type	execute_cmd, @function
execute_cmd:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L33
	lea	rdi, .LC10[rip]
	call	print_error
.L33:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L34
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	check_redirection
	test	eax, eax
	je	.L35
	mov	rax, QWORD PTR path_error[rip]
	test	rax, rax
	je	.L36
	mov	rax, QWORD PTR path_error[rip]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L37
	lea	rdi, .LC11[rip]
	call	print_error
.L37:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, 2
	mov	edi, eax
	call	dup2@PLT
	cmp	eax, -1
	jne	.L38
	lea	rdi, .LC12[rip]
	call	print_error
.L38:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
.L36:
	mov	rax, QWORD PTR path_output[rip]
	test	rax, rax
	je	.L39
	mov	rax, QWORD PTR path_output[rip]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L40
	lea	rdi, .LC11[rip]
	call	print_error
.L40:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	cmp	eax, -1
	jne	.L41
	lea	rdi, .LC12[rip]
	call	print_error
.L41:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
.L39:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	reduce_arg
.L35:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L42
	lea	rdi, .LC13[rip]
	call	print_error
.L42:
	mov	edi, 0
	call	exit@PLT
.L34:
	lea	rcx, -28[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	and	eax, 255
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L45
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L45:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	execute_cmd, .-execute_cmd
	.globl	reduce_arg
	.type	reduce_arg, @function
reduce_arg:
.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	eax, DWORD PTR arg_count[rip]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L47
.L48:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L47:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, 7
	jbe	.L48
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	reduce_arg, .-reduce_arg
	.section	.rodata
.LC15:
	.string	"$ "
	.text
	.globl	print_prompt
	.type	print_prompt, @function
print_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, 16
	call	get_current_dir_name@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	print_prompt, .-print_prompt
	.globl	check_redirection
	.type	check_redirection, @function
check_redirection:
.LFB17:
	.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	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	jmp	.L51
.L59:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L52
.L58:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 34
	jne	.L53
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
.L53:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 62
	jne	.L54
	cmp	DWORD PTR -20[rbp], 0
	jne	.L54
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sub	rax, 1
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 50
	jne	.L55
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR path_error[rip], rax
	jmp	.L56
.L55:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR path_output[rip], rax
.L56:
	add	DWORD PTR -24[rbp], 1
	add	DWORD PTR -32[rbp], 1
	jmp	.L57
.L54:
	add	DWORD PTR -28[rbp], 1
.L52:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rbx, eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L58
.L57:
	add	DWORD PTR -32[rbp], 1
.L51:
	mov	eax, DWORD PTR arg_count[rip]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L59
	mov	eax, DWORD PTR arg_count[rip]
	mov	edx, DWORD PTR -24[rbp]
	add	edx, edx
	sub	eax, edx
	mov	DWORD PTR arg_count[rip], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	check_redirection, .-check_redirection
	.globl	del
	.type	del, @function
del:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L62
.L63:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L62:
	mov	eax, DWORD PTR arg_count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L63
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -24[rbp], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	del, .-del
	.section	.rodata
.LC16:
	.string	"usage: %s [batch-file]\n"
.LC17:
	.string	"r"
.LC18:
	.string	"fopen"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	cmp	DWORD PTR -52[rbp], 2
	jle	.L65
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L65:
	cmp	DWORD PTR -52[rbp], 2
	jne	.L74
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L74
	lea	rdi, .LC18[rip]
	call	print_error
.L74:
	mov	QWORD PTR path_output[rip], 0
	mov	QWORD PTR path_error[rip], 0
	mov	eax, 0
	call	print_prompt
	mov	rdx, QWORD PTR -32[rbp]
	lea	rcx, -40[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	je	.L77
	mov	edi, 20
	call	Calloc
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_line
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	is_built_in
	test	eax, eax
	jne	.L68
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	execute_cmd
	jmp	.L69
.L68:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L70
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	execute_cd
.L70:
	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	.L71
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	execute_path
.L71:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L69
	mov	edi, 0
	call	exit@PLT
.L69:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	del
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -48[rbp], 0
	jmp	.L74
.L77:
	nop
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.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	"150144245.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cd\000"
	.align	2
.LC1:
	.ascii	"exit\000"
	.align	2
.LC2:
	.ascii	"path\000"
	.text
	.global	arg_count
	.bss
	.align	2
	.type	arg_count, %object
	.size	arg_count, 4
arg_count:
	.space	4
	.global	path_output
	.align	2
	.type	path_output, %object
	.size	path_output, 4
path_output:
	.space	4
	.global	path_error
	.align	2
	.type	path_error, %object
	.size	path_error, 4
path_error:
	.space	4
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%s: %s\012\000"
	.text
	.align	2
	.global	print_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_error, %function
print_error:
	@ 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
	str	r0, [fp, #-16]
	ldr	r3, .L2
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-16]
	ldr	r1, .L2+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC4
	.size	print_error, .-print_error
	.section	.rodata
	.align	2
.LC5:
	.ascii	"calloc\000"
	.text
	.align	2
	.global	Calloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	Calloc, %function
Calloc:
	@ 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, #4
	ldr	r0, [fp, #-16]
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L7
	bl	print_error
.L5:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC5
	.size	Calloc, .-Calloc
	.section	.rodata
	.align	2
.LC6:
	.ascii	"malloc\000"
	.text
	.align	2
	.global	Malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	Malloc, %function
Malloc:
	@ 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	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L12
	bl	print_error
.L10:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.size	Malloc, .-Malloc
	.section	.rodata
	.align	2
.LC7:
	.ascii	"shit\000"
	.text
	.align	2
	.global	parse_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_line, %function
parse_line:
	@ 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]
	ldr	r3, .L24
	mov	r2, #0
	str	r2, [r3]
	b	.L15
.L23:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L16
.L17:
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	mov	r2, #0
	strb	r2, [r3]
.L16:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L17
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L17
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L17
	b	.L18
.L20:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L18:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L19
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L19
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L19
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L20
.L19:
	ldr	r3, [fp, #-16]
	cmp	r3, #20
	ble	.L21
	ldr	r0, .L24+4
	bl	puts
	mov	r0, #1
	bl	exit
.L21:
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r4, r2, r3
	mov	r0, r1
	bl	Calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	rsb	r3, r3, #0
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L15:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L23
.L22:
	ldr	r2, .L24
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	arg_count
	.word	.LC7
	.size	parse_line, .-parse_line
	.align	2
	.global	execute_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_cd, %function
execute_cd:
	@ 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]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L28
	ldr	r0, .L29
	bl	print_error
.L28:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC0
	.size	execute_cd, .-execute_cd
	.section	.rodata
	.align	2
.LC8:
	.ascii	"path done\000"
	.text
	.align	2
	.global	execute_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_path, %function
execute_path:
	@ 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, .L32
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC8
	.size	execute_path, .-execute_path
	.section	.rodata
	.align	2
.LC9:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	is_built_in
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_built_in, %function
is_built_in:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L41+4
	sub	r3, fp, #28
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L35
.L38:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r4, [r3, #-16]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-16]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-40]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
	mov	r3, #1
	b	.L39
.L36:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L35:
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	ble	.L38
	mov	r3, #0
.L39:
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC10
	.word	.LC9
	.size	is_built_in, .-is_built_in
	.section	.rodata
	.align	2
.LC11:
	.ascii	"%s\011\000"
	.align	2
.LC12:
	.ascii	"arg_count: %d\012\000"
	.text
	.align	2
	.global	print_arg
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_arg, %function
print_arg:
	@ 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	r3, #0
	str	r3, [fp, #-8]
	b	.L44
.L45:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L46
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L44:
	ldr	r3, .L46+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L45
	ldr	r3, .L46+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L46+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC11
	.word	arg_count
	.word	.LC12
	.size	print_arg, .-print_arg
	.section	.rodata
	.align	2
.LC13:
	.ascii	"fork\000"
	.align	2
.LC14:
	.ascii	"open\000"
	.align	2
.LC15:
	.ascii	"dup2\000"
	.align	2
.LC16:
	.ascii	"execvp\000"
	.align	2
.LC17:
	.ascii	"%u \357\240\220 \012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	execute_cmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_cmd, %function
execute_cmd:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L62
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L49
	ldr	r0, .L62+4
	bl	print_error
.L49:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L50
	ldr	r0, [fp, #-32]
	bl	check_redirection
	mov	r3, r0
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L62+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L52
	ldr	r3, .L62+8
	ldr	r3, [r3]
	mov	r2, #420
	ldr	r1, .L62+12
	mov	r0, r3
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L53
	ldr	r0, .L62+16
	bl	print_error
.L53:
	mov	r1, #2
	ldr	r0, [fp, #-16]
	bl	dup2
	mov	r3, r0
	cmn	r3, #1
	bne	.L54
	ldr	r0, .L62+20
	bl	print_error
.L54:
	ldr	r0, [fp, #-16]
	bl	close
.L52:
	ldr	r3, .L62+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L55
	ldr	r3, .L62+24
	ldr	r3, [r3]
	mov	r2, #420
	ldr	r1, .L62+12
	mov	r0, r3
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L56
	ldr	r0, .L62+16
	bl	print_error
.L56:
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	dup2
	mov	r3, r0
	cmn	r3, #1
	bne	.L57
	ldr	r0, .L62+20
	bl	print_error
.L57:
	ldr	r0, [fp, #-12]
	bl	close
.L55:
	ldr	r0, [fp, #-32]
	bl	reduce_arg
.L51:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L58
	ldr	r0, .L62+28
	bl	print_error
.L58:
	mov	r0, #0
	bl	exit
.L50:
	sub	r3, fp, #28
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	waitpid
	ldr	r3, [fp, #-28]
	asr	r3, r3, #8
	and	r3, r3, #255
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L61
	ldr	r1, [fp, #-20]
	ldr	r0, .L62+32
	bl	printf
.L61:
	nop
	ldr	r3, .L62
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L63:
	.align	2
.L62:
	.word	.LC18
	.word	.LC13
	.word	path_error
	.word	577
	.word	.LC14
	.word	.LC15
	.word	path_output
	.word	.LC16
	.word	.LC17
	.size	execute_cmd, .-execute_cmd
	.align	2
	.global	reduce_arg
	.syntax unified
	.arm
	.fpu softvfp
	.type	reduce_arg, %function
reduce_arg:
	@ 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, .L67
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L65
.L66:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	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, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L65:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	bls	.L66
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	arg_count
	.size	reduce_arg, .-reduce_arg
	.section	.rodata
	.align	2
.LC19:
	.ascii	"$ \000"
	.text
	.align	2
	.global	print_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_prompt, %function
print_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
	bl	get_current_dir_name
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	puts
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r0, .L70
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	.LC19
	.size	print_prompt, .-print_prompt
	.align	2
	.global	check_redirection
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_redirection, %function
check_redirection:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L73
.L81:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L74
.L80:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #34
	bne	.L75
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [fp, #-8]
.L75:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #62
	bne	.L76
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L77
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L83
	str	r3, [r2]
	b	.L78
.L77:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L83+4
	str	r3, [r2]
.L78:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L79
.L76:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L74:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L80
.L79:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L73:
	ldr	r3, .L83+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L81
	ldr	r3, .L83+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	sub	r3, r2, r3
	ldr	r2, .L83+8
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L84:
	.align	2
.L83:
	.word	path_error
	.word	path_output
	.word	arg_count
	.size	check_redirection, .-check_redirection
	.align	2
	.global	del
	.syntax unified
	.arm
	.fpu softvfp
	.type	del, %function
del:
	@ 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	r3, #0
	str	r3, [fp, #-8]
	b	.L86
.L87:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	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, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L86:
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L87
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-16]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	arg_count
	.size	del, .-del
	.section	.rodata
	.align	2
.LC20:
	.ascii	"usage: %s [batch-file]\012\000"
	.align	2
.LC21:
	.ascii	"r\000"
	.align	2
.LC22:
	.ascii	"fopen\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L104
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L104+4
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	ble	.L91
	ldr	r3, .L104+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L104+12
	bl	fprintf
	mov	r0, #2
	bl	exit
.L91:
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	bne	.L100
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L104+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L100
	ldr	r0, .L104+20
	bl	print_error
.L100:
	ldr	r3, .L104+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L104+28
	mov	r2, #0
	str	r2, [r3]
	bl	print_prompt
	sub	r1, fp, #24
	sub	r3, fp, #28
	ldr	r2, [fp, #-20]
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L103
	mov	r0, #20
	bl	Calloc
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	parse_line
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	is_built_in
	mov	r3, r0
	cmp	r3, #0
	bne	.L94
	ldr	r0, [fp, #-16]
	bl	execute_cmd
	b	.L95
.L94:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, .L104+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L96
	ldr	r0, [fp, #-16]
	bl	execute_cd
.L96:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, .L104+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L97
	ldr	r0, [fp, #-16]
	bl	execute_path
.L97:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, .L104+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L95
	mov	r0, #0
	bl	exit
.L95:
	ldr	r0, [fp, #-16]
	bl	del
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	free
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L100
.L103:
	nop
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L104
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L102
	bl	__stack_chk_fail
.L102:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L105:
	.align	2
.L104:
	.word	.LC23
	.word	stdin
	.word	stderr
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	path_output
	.word	path_error
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
