LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_exit.c
// Function: ms_exit
void						ms_exit(t_minishell_meta *ms, char *line, int i)
{
	int stat;
	int len_args;

	len_args = ft_tablen(ms->piped_cmds->args1[i]);
	write(STDOUT_FILENO, EXIT_MSG, 5);
	if (len_args == 0)
		stat = 0;
	else if (len_args > 1)
	{
		errno = 1;
		too_many_args("exit");
		return ;
	}
	else if (check_numeric_arg(ms->piped_cmds->args1[i][0]))
		stat = ft_atoi(ms->piped_cmds->args1[i][0]);
	else
	{
		numeric_arg_required(ms->piped_cmds->args1[i][0]);
		stat = 255;
	}
	free_before_exit(ms, line);
	exit(stat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rax
movq 0x8(%rax), %rax
movslq %edx, %r12
movq (%rax,%r12,8), %rdi
callq 0x1d66
movl %eax, %r15d
leaq 0x2f6b(%rip), %rsi      # 0x5084
pushq $0x1
popq %rdi
pushq $0x5
popq %rdx
callq 0x1050
testl %r15d, %r15d
je 0x214e
cmpl $0x2, %r15d
jl 0x2156
callq 0x1040
movl $0x1, (%rax)
leaq 0x2ec9(%rip), %rdi      # 0x500a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x44c9
xorl %r15d, %r15d
jmp 0x21ed
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x219c
cmpb $0x2d, (%r15)
jne 0x2183
movsbl 0x1(%r15), %edi
callq 0x4884
testl %eax, %eax
je 0x219c
pushq $0x1
popq %rax
jmp 0x2185
xorl %eax, %eax
addq %rax, %r15
movsbl (%r15), %edi
testl %edi, %edi
je 0x2200
callq 0x4884
incq %r15
testl %eax, %eax
jne 0x2188
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %r15
leaq 0x2e77(%rip), %rdi      # 0x5029
pushq $0x2
popq %r12
movl %r12d, %esi
callq 0x4a3c
leaq 0x2ec5(%rip), %rdi      # 0x508a
movl %r12d, %esi
callq 0x4a3c
movq %r15, %rdi
movl %r12d, %esi
callq 0x4a3c
leaq 0x2eb4(%rip), %rdi      # 0x5093
movl %r12d, %esi
callq 0x4a3c
movl $0xff, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20bc
movl %r15d, %edi
callq 0x1140
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rdi
callq 0x47d0
movl %eax, %r15d
jmp 0x21ed
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_export.c
// Function: check_var
int				check_var(char *var, char *cmd)
{
	int		i;

	i = 0;
	while ((var[i] != '=' && var[i] != '\0') ||\
	(!ft_isalpha(var[0]) && var[0] != '_'))
	{
		if (!ft_isalnum(var[i]) && var[i] != '_')
		{
			print_invalid(var, cmd);
			return (0);
		}
		i++;
	}
	if (var[i] != '\0' && (ft_strcmp(cmd, "unset") == 0))
	{
		print_invalid(var, cmd);
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r12
movzbl (%r12), %eax
cmpl $0x3d, %eax
je 0x223e
testl %eax, %eax
jne 0x2255
movsbl (%r14), %edi
callq 0x4870
testl %eax, %eax
jne 0x226d
cmpb $0x5f, (%r14)
je 0x226d
movb (%r12), %al
movsbl %al, %edi
callq 0x4850
testl %eax, %eax
jne 0x2268
cmpb $0x5f, (%r12)
jne 0x228b
incq %r12
jmp 0x2230
pushq $0x1
popq %r15
cmpb $0x0, (%r12)
je 0x2299
leaq 0x2e31(%rip), %rsi      # 0x50b0
movq %rbx, %rdi
callq 0x4c74
testl %eax, %eax
jne 0x2299
movq %r14, %rdi
movq %rbx, %rsi
callq 0x456c
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_export.c
// Function: not_in_env
int				not_in_env(char **env, char *var)
{
	int		env_len;
	int		var_len;
	int		i;

	i = -1;
	var_len = ft_strlen(var);
	while (env[++i] != 0)
	{
		env_len = 0;
		while (env[i][env_len] != '=' && env[i][env_len] != '\0')
			env_len++;
		if (var_len != env_len)
			continue;
		if (ft_strncmp(var, env[i], var_len) != 0)
			continue;
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x17b9
movslq %eax, %r12
movl %r12d, %r13d
pushq $-0x1
popq %r15
movq 0x8(%r14,%r15,8), %rsi
testq %rsi, %rsi
je 0x2304
incq %r15
xorl %eax, %eax
movzbl (%rsi,%rax), %ecx
testl %ecx, %ecx
je 0x22ec
cmpl $0x3d, %ecx
je 0x22ec
incq %rax
jmp 0x22da
cmpl %eax, %r13d
jne 0x22cb
movq %rbx, %rdi
movq %r12, %rdx
callq 0x4c98
testl %eax, %eax
jne 0x22cb
xorl %eax, %eax
jmp 0x2307
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_export.c
// Function: add_to_tables
void			add_to_tables(t_minishell_meta *ms, int i, int k)
{
	int j;

	j = 0;
	if (check_var(ms->piped_cmds->args1[i][k], "export"))
	{
		if (ft_strchr(ms->piped_cmds->args1[i][k], '=') != NULL)
		{
			unset_var(ms->piped_cmds->args1[i][k], ms);
			while (ms->env[j] != 0)
				j++;
			ms->env[j] = ft_strdup(ms->piped_cmds->args1[i][k]);
			ms->env[++j] = 0;
			j = 0;
		}
		else if (not_in_env(ms->env, ms->piped_cmds->args1[i][k]))
		{
			ms_unset_single(ms->export,\
			ms->piped_cmds->args1[i][k], ms->path);
			while (ms->export[j] != 0)
				j++;
			ms->export[j] = ft_strdup(ms->piped_cmds->args1[i][k]);
			ms->export[++j] = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movq 0x8(%rax), %rax
movslq %esi, %r14
movq (%rax,%r14,8), %rax
movslq %edx, %r15
movq (%rax,%r15,8), %rdi
leaq 0x2d72(%rip), %rsi      # 0x50b6
callq 0x221c
testl %eax, %eax
je 0x2419
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
pushq $0x3d
popq %rsi
callq 0x4c2c
testq %rax, %rax
je 0x23a0
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x3d48
leaq 0x20(%rbx), %r12
movq 0x20(%rbx), %rax
pushq $-0x1
popq %r13
cmpq $0x0, 0x8(%rax,%r13,8)
leaq 0x1(%r13), %r13
jne 0x2392
jmp 0x23f2
movq 0x20(%rbx), %rdi
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rsi
callq 0x22a5
testl %eax, %eax
je 0x2419
leaq 0x28(%rbx), %r12
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rsi
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
callq 0x3daf
movq 0x28(%rbx), %rax
pushq $-0x1
popq %r13
cmpq $0x0, 0x8(%rax,%r13,8)
leaq 0x1(%r13), %r13
jne 0x23e6
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x17cf
movq (%r12), %rcx
movq %rax, (%rcx,%r13,8)
movq (%r12), %rax
andq $0x0, 0x8(%rax,%r13,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_export.c
// Function: ms_export
void			ms_export(t_minishell_meta *ms, int i)
{
	int		k;

	k = 0;
	errno = 0;
	if (ms->piped_cmds->args1[i][0] == NULL && ms->no_args)
	{
		print_export_env(ms->env);
		print_export_env(ms->export);
		return ;
	}
	while (ms->piped_cmds->args1[i][k] != 0)
	{
		add_to_tables(ms, i, k);
		if (ft_strncmp(ms->piped_cmds->args1[i][k], "PATH=", 5) == 0)
			set_path(ms);
		k++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x1040
andl $0x0, (%rax)
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movslq %r14d, %r14
movq (%rax,%r14,8), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x24c8
xorl %r15d, %r15d
leaq 0x2c58(%rip), %r12      # 0x50bd
pushq $0x5
popq %r13
testq %rax, %rax
je 0x24b9
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x2316
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4c98
testl %eax, %eax
jne 0x24a3
movq %rbx, %rdi
callq 0x46d1
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax,%r15,8), %rax
incq %r15
jmp 0x2469
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x4c(%rbx)
je 0x245b
movq 0x20(%rbx), %rdi
callq 0x24eb
movq 0x28(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24eb
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_export.c
// Function: print_export_env
static void		print_export_env(char **env)
{
	int i;
	int j;

	i = 0;
	j = 0;
	while (env[i] != 0)
	{
		ft_putstr_fd("declare -x ", STDOUT_FILENO);
		j = 0;
		while (env[i][j] != '\0')
		{
			ft_putchar_fd(env[i][j], STDOUT_FILENO);
			if (env[i][j] == '=')
				ft_putchar_fd('\"', STDOUT_FILENO);
			j++;
		}
		if (ft_strchr(env[i], '=') != NULL)
			ft_putstr_fd("\"", STDOUT_FILENO);
		ft_putstr_fd("\n", STDOUT_FILENO);
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
pushq $0x1
popq %r15
pushq $0x22
popq %r14
cmpq $0x0, (%rbx,%r12,8)
je 0x2582
leaq 0x2bae(%rip), %rdi      # 0x50c3
movl %r15d, %esi
callq 0x4a3c
xorl %r13d, %r13d
movq (%rbx,%r12,8), %rdi
movb (%rdi,%r13), %al
testb %al, %al
je 0x2552
movsbl %al, %edi
movl %r15d, %esi
callq 0x49a4
movq (%rbx,%r12,8), %rax
cmpb $0x3d, (%rax,%r13)
jne 0x254d
movl %r14d, %edi
movl %r15d, %esi
callq 0x49a4
incq %r13
jmp 0x2520
pushq $0x3d
popq %rsi
callq 0x4c2c
testq %rax, %rax
je 0x256e
leaq 0x2b69(%rip), %rdi      # 0x50cf
movl %r15d, %esi
callq 0x4a3c
leaq 0x2c1a(%rip), %rdi      # 0x518f
movl %r15d, %esi
callq 0x4a3c
incq %r12
jmp 0x2507
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_file_descriptor.c
// Function: set_in_fd
void					set_in_fd(t_minishell_meta *ms, char *filename)
{
	if (ms->file_fd == 1 || ms->file_fd == -1)
	{
		ms->in_fd = dup(STDIN_FILENO);
		close(STDIN_FILENO);
	}
	else
		close(ms->file_fd);
	ms->file_fd = open(filename, O_RDONLY);
	if (ms->file_fd < 0 && (ms->process_bit = -1))
	{
		close(ms->file_fd);
		ms->file_fd = -1;
		dup2(ms->in_fd, 0);
		no_file_or_directory(NULL, filename);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x40(%rdi), %r15d
cmpl $0x1, %r15d
je 0x25b4
cmpl $-0x1, %r15d
jne 0x25c2
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x1080
movl %eax, 0x38(%r14)
movl %r15d, %edi
callq 0x10a0
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1130
movl %eax, 0x40(%r14)
testl %eax, %eax
js 0x25e9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
orl $-0x1, 0x18(%r14)
movl %eax, %edi
callq 0x10a0
orl $-0x1, 0x40(%r14)
movl 0x38(%r14), %edi
xorl %esi, %esi
callq 0x1070
xorl %edi, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x443c
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_file_descriptor.c
// Function: handle_in_out_redir
void					handle_in_out_redir(t_minishell_meta *ms,\
char *filename, int i)
{
	set_out_fd(ms, filename, 0);
	set_in_fd(ms, filename);
	if ((ms->piped_cmds->pipe[i] != '|') && (ms->multiline = -99))
		unset_fd(ms);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
xorl %edx, %edx
callq 0x2619
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2594
movq 0x58(%rbx), %rax
movq 0x20(%rax), %rax
movslq %r14d, %rcx
cmpb $0x7c, (%rax,%rcx)
jne 0x26b5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffff9d, 0x44(%rbx) # imm = 0xFFFFFF9D
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x386c
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_file_descriptor.c
// Function: call_actual_handle
void					call_actual_handle(char *filename, char *redir,\
t_minishell_meta *ms, int i)
{
	int j;

	j = 0;
	if (filename[0] == '\0' && redir[0] == '\0')
		return ;
	if (redir[0] == '\0')
	{
		while (ms->piped_cmds->args1[i][j] != 0)
			j++;
		ms->piped_cmds->args1[i][j] = ft_strdup(filename);
		j++;
		ms->piped_cmds->args1[i][j] = 0;
	}
	if (ft_strcmp(redir, ">>") == 0)
		set_out_fd(ms, filename, 1);
	else if ((ft_strcmp(redir, "><") == 0)\
	&& syntax_error("<") && (ms->process_bit = -1))
		return ;
	else if ((ft_strcmp(redir, "<>") == 0))
		handle_in_out_redir(ms, filename, i);
	else if (redir[0] == '>')
		set_out_fd(ms, filename, 0);
	else if (redir[0] == '<')
		set_in_fd(ms, filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpb $0x0, (%rdi)
movb (%rsi), %al
je 0x2744
testb %al, %al
jne 0x274c
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movl %r15d, -0x2c(%rbp)
movslq %r15d, %r13
movq (%rax,%r13,8), %rax
xorl %r15d, %r15d
cmpq $0x0, (%rax,%r15)
leaq 0x8(%r15), %r15
jne 0x2709
movq %rbx, %rdi
callq 0x17cf
movq 0x58(%r14), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, -0x8(%rcx,%r15)
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
andq $0x0, (%rax,%r15)
movl -0x2c(%rbp), %r15d
jmp 0x274c
testb %al, %al
je 0x27cf
leaq 0x297e(%rip), %rsi      # 0x50d1
movq %r12, %rdi
callq 0x4c74
testl %eax, %eax
je 0x279e
leaq 0x296e(%rip), %rsi      # 0x50d4
movq %r12, %rdi
callq 0x4c74
testl %eax, %eax
je 0x27ba
leaq 0x295e(%rip), %rsi      # 0x50d7
movq %r12, %rdi
callq 0x4c74
testl %eax, %eax
je 0x27de
movzbl (%r12), %eax
cmpl $0x3c, %eax
je 0x27fa
cmpl $0x3e, %eax
jne 0x27cf
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
jmp 0x27a7
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2619
leaq 0x2914(%rip), %rdi      # 0x50d5
callq 0x4513
testl %eax, %eax
je 0x2772
orl $-0x1, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2674
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2594
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_file_descriptor.c
// Function: handle_fd
void					handle_fd(t_minishell_meta *ms, int index)
{
	int i;

	i = 0;
	while (ms->piped_cmds->files1[index][i])
	{
		call_actual_handle(ms->piped_cmds->files1[index][i],\
		ms->piped_cmds->redir[index][i], ms, index);
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
xorl %r15d, %r15d
movq 0x58(%rbx), %rax
movq 0x10(%rax), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%r15), %rdi
testq %rdi, %rdi
je 0x2858
movq 0x18(%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15), %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x26ce
addq $0x8, %r15
jmp 0x2826
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_free.c
// Function: free_tab1
void					free_tab1(char **args, int length)
{
	int i;

	i = 0;
	while (i <= length + 1)
	{
		free(args[i]);
		args[i] = 0;
		i++;
	}
	if (args)
	{
		free(args);
		args = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl %esi
movslq %esi, %r14
xorl %r15d, %r15d
cmpq %r14, %r15
jg 0x2891
movq (%rbx,%r15,8), %rdi
callq 0x1030
andq $0x0, (%rbx,%r15,8)
incq %r15
jmp 0x2879
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_free.c
// Function: free_tab_tab_v1
void					free_tab_tab_v1(char ***args, int len)
{
	int i;

	i = 0;
	while (i < len)
	{
		if (args[i][0] != 0)
			free_tab(args[i]);
		else
			free(args[i]);
		i++;
	}
	free(args);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x28dc
movq (%rbx,%r15,8), %rdi
cmpq $0x0, (%rdi)
je 0x28d2
callq 0x28ee
jmp 0x28d7
callq 0x1030
incq %r15
jmp 0x28bc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_free.c
// Function: free_tab
void					free_tab(char **args)
{
	int i;

	i = 0;
	while (args && args[i])
	{
		ft_free(&args[i]);
		args[i] = 0;
		i++;
	}
	if (args)
	{
		free(args);
		args = 0;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2924
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, %r14
cmpq $0x0, (%r14)
je 0x2918
movq %r14, %rdi
callq 0x1790
andq $0x0, (%r14)
addq $0x8, %r14
jmp 0x2900
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_free.c
// Function: free_tab_tab
void					free_tab_tab(char ***args, int len)
{
	int i;

	i = 0;
	while (args[i] != 0)
	{
		free_tab(args[i]);
		i++;
	}
	while (i < (len))
	{
		free(args[i]);
		args[i] = 0;
		i++;
	}
	if (args)
	{
		free(args);
		args = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x294b
callq 0x28ee
incq %r15
jmp 0x2938
cmpl %r15d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x296a
movq (%rbx,%r15,8), %rdi
callq 0x1030
andq $0x0, (%rbx,%r15,8)
incq %r15
jmp 0x2952
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_free.c
// Function: free_all
void					free_all(t_minishell_meta *ms, char *line)
{
	free_tab(ms->path);
	if (ms->piped_cmds != 0)
	{
		free_tab(ms->piped_cmds->cmds);
		free_tab_tab_v1(ms->piped_cmds->args1, ms->piped_cmds->length);
		free_tab_tab_v1(ms->piped_cmds->files1, ms->piped_cmds->length);
		free_tab_tab_v1(ms->piped_cmds->redir, ms->piped_cmds->length);
		ft_free(&ms->piped_cmds->pipe);
		free(ms->piped_cmds);
		ms->piped_cmds = 0;
	}
	ft_free(&line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, -0x10(%rbp)
movq 0x30(%rdi), %rdi
callq 0x28ee
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x29ee
movq (%rax), %rdi
callq 0x28ee
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x28a3
movq 0x58(%rbx), %rax
movq 0x10(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x28a3
movq 0x58(%rbx), %rax
movq 0x18(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x28a3
movq 0x58(%rbx), %rdi
addq $0x20, %rdi
callq 0x1790
movq 0x58(%rbx), %rdi
callq 0x1030
andq $0x0, 0x58(%rbx)
leaq -0x10(%rbp), %rdi
callq 0x1790
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse.c
// Function: parse_piped_commands
int						parse_piped_commands(t_minishell_meta *ms,
char *line, int j)
{
	int	freq;
	int	start;
	int	arg_end;

	start = 0;
	freq = get_frequency(line, 26);
	while (freq-- >= 0 && ft_free(&ms->arg))
	{
		ms->piped_cmds->cmds[j] = get_command(&line[start], ms);
		arg_end = get_args(ms, &line[start + ms->arg_start], j) - 1
		+ start + ms->arg_start;
		get_files(&line[arg_end], ms, j);
		ms->piped_cmds->pipe[j++] = '|';
		while (line[arg_end] != '\0' && line[arg_end] != 26)
			arg_end++;
		start = arg_end + 1;
	}
	return (j);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r12d
movq %rsi, %rax
movq %rdi, %rbx
pushq $0x1a
popq %rsi
movq %rax, -0x40(%rbp)
movq %rax, %rdi
callq 0x45d8
movl %eax, %r15d
movq %rbx, -0x48(%rbp)
leaq 0x10(%rbx), %rax
movq %rax, -0x50(%rbp)
movslq %r12d, %rax
movq %rax, -0x38(%rbp)
xorl %ebx, %ebx
movq -0x48(%rbp), %r12
testl %r15d, %r15d
js 0x2af7
movq -0x50(%rbp), %rdi
callq 0x1790
testl %eax, %eax
je 0x2af7
decl %r15d
movl %r15d, -0x2c(%rbp)
movslq %ebx, %rbx
movq -0x40(%rbp), %rax
leaq (%rax,%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x2fec
movq 0x58(%r12), %rcx
movq (%rcx), %rcx
movq -0x38(%rbp), %r14
movq %rax, (%rcx,%r14,8)
movslq 0x8(%r12), %rsi
addq %r13, %rsi
movq %r12, %rdi
movl %r14d, %edx
callq 0x2b0a
movl 0x8(%r12), %r15d
addl %eax, %ebx
leal (%r15,%rbx), %eax
decl %eax
movslq %eax, %r13
addq -0x40(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x31ef
movq 0x58(%r12), %rax
movq 0x20(%rax), %rax
movb $0x7c, (%rax,%r14)
incq %r14
movq %r14, -0x38(%rbp)
addl %r15d, %ebx
movzbl (%r13), %eax
testl %eax, %eax
je 0x2aee
cmpl $0x1a, %eax
je 0x2aee
incl %ebx
incq %r13
jmp 0x2ad9
movl -0x2c(%rbp), %r15d
jmp 0x2a45
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse.c
// Function: get_args
static int				get_args(t_minishell_meta *ms, char *line, int index)
{
	int		i;
	int		quote_bit;
	int		j;

	if ((i = check_endline(line, ms, &j, &quote_bit)) < 0)
		return (-i);
	while (line && line[ms->n = i] && line[i] != 26)
	{
		if (ft_isredir(line[i]) && quote_bit % 2 == 0)
			break ;
		if (ft_isspace(line[i]) && (quote_bit % 2 == 0))
		{
			(ms->arg == NULL) ? ms->arg = ft_strdup("") : (void)ms->arg;
			ms->piped_cmds->args1[index][j++] = ft_strdup(ms->arg);
			while (ft_free(&ms->arg) && line[i] != '\0' && ft_isspace(line[i]))
				i++;
			continue;
		}
		if (line[i] == 24 && (quote_bit = quote_bit + (0 * ++i) + 1))
			continue;
		else
			ms->arg = ft_stradd(ms->arg, line[i]);
		i++;
	}
	return (return_value(ms, index, j, line));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x34(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x2c(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x3374
movl %eax, %r14d
testl %eax, %eax
js 0x2c51
testq %rbx, %rbx
je 0x2c3b
leaq 0x10(%r15), %r12
movslq -0x34(%rbp), %rax
movq %rax, -0x40(%rbp)
movl %r14d, 0x50(%r15)
movl %r14d, %r13d
movzbl (%rbx,%r13), %eax
testl %eax, %eax
je 0x2c3b
cmpl $0x1a, %eax
je 0x2c3b
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x2b8a
testb $0x1, -0x30(%rbp)
je 0x2c3b
movsbl (%rbx,%r13), %edi
callq 0x4898
testl %eax, %eax
je 0x2c00
testb $0x1, -0x30(%rbp)
jne 0x2c00
movq (%r12), %rdi
testq %rdi, %rdi
jne 0x2bba
leaq 0x245a(%rip), %rdi      # 0x5008
callq 0x17cf
movq %rax, %rdi
movq %rax, (%r12)
callq 0x17cf
movq 0x58(%r15), %rcx
movq 0x8(%rcx), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2c(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, -0x2c(%rbp)
movq %rax, (%rcx,%rdx,8)
movq %r12, %rdi
callq 0x1790
testl %eax, %eax
je 0x2c33
movsbl (%rbx,%r13), %edi
testl %edi, %edi
je 0x2c33
callq 0x4898
testl %eax, %eax
je 0x2c33
incq %r13
jmp 0x2bdd
movb (%rbx,%r13), %al
cmpb $0x18, %al
jne 0x2c1b
movq %r13, %r14
incq %r14
incl -0x30(%rbp)
jne 0x2b57
movb (%rbx,%r14), %al
movq (%r12), %rdi
movsbl %al, %esi
callq 0x18b1
movq %rax, (%r12)
incl %r14d
jmp 0x2b57
movl %r13d, %r14d
jmp 0x2b57
movl -0x2c(%rbp), %edx
movq %r15, %rdi
movl -0x34(%rbp), %esi
movq %rbx, %rcx
callq 0x33d4
movl %eax, %r14d
jmp 0x2c54
negl %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse.c
// Function: load_cmds_args
void					load_cmds_args(t_minishell_meta *ms, char **line_splits)
{
	int		i;
	int		arg_end;
	int		j;

	i = -1;
	j = 0;
	while (line_splits[++i] != NULL && (ft_free(&ms->arg)))
	{
		if (ft_strchr(line_splits[i], 26))
		{
			j = parse_piped_commands(ms, line_splits[i], j);
			continue;
		}
		ms->piped_cmds->cmds[j] = get_command(line_splits[i], ms);
		arg_end = get_args(ms, &line_splits[i][ms->arg_start], j);
		get_files(&line_splits[i][arg_end + ms->arg_start], ms, j);
		j++;
	}
	terminate_tabs(ms, j);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
xorl %r12d, %r12d
pushq $0x1a
popq %r13
cmpq $0x0, (%r14)
je 0x2d09
movq %r15, %rdi
callq 0x1790
testl %eax, %eax
je 0x2d09
movq (%r14), %rdi
movl %r13d, %esi
callq 0x4c2c
movq (%r14), %rsi
testq %rax, %rax
je 0x2cba
movq %rbx, %rdi
movl %r12d, %edx
callq 0x2a00
movl %eax, %r12d
jmp 0x2d00
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x2fec
movq 0x58(%rbx), %rcx
movq (%rcx), %rcx
movslq %r12d, %rdx
movq %rax, (%rcx,%rdx,8)
movslq 0x8(%rbx), %rsi
addq (%r14), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x2b0a
movslq 0x8(%rbx), %rcx
movslq %eax, %rdi
addq %rcx, %rdi
addq (%r14), %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x31ef
incl %r12d
addq $0x8, %r14
jmp 0x2c85
movq %rbx, %rdi
movl %r12d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4274
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse.c
// Function: parse
char					*parse(t_minishell_meta *ms, char *line)
{
	char	**line_splits;

	if (check_line(line) && (ms->multiline = 1))
		return (line);
	line = refine_line(line, ms);
	if (((line == NULL) && (ms->multiline = 1)))
		return (line);
	ms->piped_cmds = init_cmds(ft_strlen(line));
	if (ms->piped_cmds == NULL)
		exit(1);
	if (ft_strchr(line, 25) != NULL || ft_strchr(line, 26) != NULL)
		line_splits = ft_split(line, 25);
	else
	{
		line_splits = (char **)malloc(2 * sizeof(char*));
		line_splits[0] = ft_strdup(line);
		line_splits[1] = NULL;
	}
	load_cmds_args(ms, line_splits);
	free_tab(line_splits);
	return (line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4406
testl %eax, %eax
je 0x2d48
movl $0x1, 0x44(%r14)
jmp 0x2dc0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3683
testq %rax, %rax
je 0x2db6
movq %rax, %rbx
movq %rax, %rdi
callq 0x17b9
movl %eax, %edi
callq 0x37bf
movq %rax, 0x58(%r14)
testq %rax, %rax
je 0x2deb
pushq $0x19
popq %rsi
movq %rbx, %rdi
callq 0x4c2c
testq %rax, %rax
jne 0x2d93
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x4c2c
testq %rax, %rax
je 0x2dce
pushq $0x19
popq %rsi
movq %rbx, %rdi
callq 0x4a78
movq %rax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2c66
movq %r15, %rdi
callq 0x28ee
jmp 0x2dc0
movl $0x1, 0x44(%r14)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x1110
movq %rax, %r15
movq %rbx, %rdi
callq 0x17cf
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
jmp 0x2da1
pushq $0x1
popq %rdi
callq 0x1140
nop
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_input_line.c
// Function: parse_input_line
char						*parse_input_line(char *line, t_minishell_meta *ms)
{
	int i;

	i = 0;
	while (line[i] != '\0')
	{
		if (line[i] == ';' && line[i - 1] != '\\')
			line[i] = 25;
		if (line[i] == '|' && line[i - 1] != '\\')
			line[i] = 26;
		if (line[i] == '\'' || line[i] == '\"')
		{
			line = replace_semi(line, (i + 1), line[i], ms);
			i = ms->end_quote;
			if (line == NULL && (ms->multiline = 1))
				return (0);
		}
		i++;
	}
	return (line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rax
xorl %esi, %esi
movslq %esi, %rcx
movzbl (%rax,%rcx), %edx
cmpl $0x22, %edx
je 0x2e54
cmpl $0x27, %edx
je 0x2e54
cmpl $0x3b, %edx
je 0x2e72
cmpl $0x7c, %edx
je 0x2e6e
testl %edx, %edx
jne 0x2e7e
jmp 0x2e8b
incl %esi
movsbl %dl, %edx
movq %rax, %rdi
movq %rbx, %rcx
callq 0x2df4
testq %rax, %rax
je 0x2e82
movl 0x48(%rbx), %esi
jmp 0x2e7e
movb $0x1a, %dl
jmp 0x2e74
movb $0x19, %dl
cmpb $0x5c, -0x1(%rcx,%rax)
je 0x2e7e
movb %dl, (%rax,%rcx)
incl %esi
jmp 0x2e33
movl $0x1, 0x44(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_input_line.c
// Function: fetch_redir
char						*fetch_redir(char *line, int *i)
{
	char	*redir_seq;
	int		j;

	j = *i;
	redir_seq = NULL;
	redir_seq = ft_stradd(redir_seq, line[*i]);
	j++;
	if (line[j] == '>')
	{
		redir_seq = ft_stradd(redir_seq, line[j]);
		j++;
	}
	*i = j;
	return (redir_seq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %r15
movsbl (%rdi,%r15), %esi
xorl %edi, %edi
callq 0x18b1
cmpb $0x3e, 0x1(%r14,%r15)
jne 0x2eca
pushq $0x3e
popq %rsi
movq %rax, %rdi
callq 0x18b1
addl $0x2, %r15d
jmp 0x2ecd
incq %r15
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_input_line.c
// Function: check_invalid_redir
int							check_invalid_redir(char *line, int i,\
t_minishell_meta *ms)
{
	char *redir_seq;
	char *tmp;

	redir_seq = fetch_redir(line, &i);
	if (ms->arg == NULL)
		tmp = ft_strdup(redir_seq);
	else
		tmp = ft_strjoin(ms->arg, redir_seq);
	ft_free(&ms->arg);
	ms->arg = ft_strdup(tmp);
	ft_free(&tmp);
	ft_free(&redir_seq);
	if (line[i] == 0)
		return (throw_newline_error(ms));
	else if (ft_isredir(line[i]))
	{
		redir_seq = fetch_redir(line, &i);
		syntax_error(redir_seq);
		ft_free(&redir_seq);
		ft_free(&ms->arg);
		return (0);
	}
	ft_free(&redir_seq);
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %r14
leaq -0x2c(%rbp), %rax
movl %esi, (%rax)
movq %rax, %rsi
callq 0x2e92
movq %rax, -0x38(%rbp)
leaq 0x10(%r15), %rbx
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x2f45
movq %rax, %rsi
callq 0x180a
jmp 0x2f4d
movq %rax, %rdi
callq 0x17cf
movq %rax, %r12
leaq -0x40(%rbp), %r13
movq %rax, (%r13)
movq %rbx, %rdi
callq 0x1790
movq %r12, %rdi
callq 0x17cf
movq %rax, (%rbx)
movq %r13, %rdi
callq 0x1790
leaq -0x38(%rbp), %rdi
callq 0x1790
movslq -0x2c(%rbp), %r12
movb (%r14,%r12), %al
testb %al, %al
je 0x2fc1
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x2fce
leaq -0x2c(%rbp), %rsi
movq %r14, %rdi
callq 0x2e92
leaq -0x38(%rbp), %r14
movq %rax, (%r14)
movq %rax, %rdi
callq 0x4513
movq %r14, %rdi
callq 0x1790
movq %rbx, %rdi
callq 0x1790
jmp 0x2fc9
movq %r15, %rdi
callq 0x2edb
xorl %r12d, %r12d
jmp 0x2fd7
leaq -0x38(%rbp), %rdi
callq 0x1790
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils.c
// Function: get_command
char						*get_command(char *line, t_minishell_meta *ms)
{
	int		i;
	char	*command;
	int		quote_bit;

	i = 0;
	quote_bit = 0;
	command = NULL;
	i = pre_process_cmd(&command, i, line, &quote_bit);
	while (line[i] && (!ft_isspace(line[i]) || quote_bit % 2)\
	&& line[i] != '\0' && line[i] != 26)
	{
		if (ft_isredir(line[i]) && !(quote_bit % 2))
			break ;
		if (line[i] != 24)
			command = ft_stradd(command, line[i]);
		else
			quote_bit++;
		i++;
	}
	if (command == NULL)
		command = ft_strdup("");
	ms->arg_start = i;
	return (command);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
xorl %r13d, %r13d
xorl %r12d, %r12d
movsbl (%r14,%r12), %edi
testl %edi, %edi
je 0x302d
callq 0x4898
testl %eax, %eax
je 0x301e
incq %r12
jmp 0x3007
xorl %r13d, %r13d
cmpb $0x18, (%r14,%r12)
sete %r13b
addq %r13, %r12
movslq %r12d, %rbx
addq %r14, %rbx
xorl %r15d, %r15d
movsbl (%rbx), %edi
testl %edi, %edi
je 0x305c
callq 0x4898
testl %eax, %eax
je 0x305c
movsbl (%rbx), %esi
movq %r15, %rdi
callq 0x18b1
movq %rax, %r15
incl %r12d
incq %rbx
jmp 0x3036
movslq %r12d, %rax
addq %rax, %r14
movsbl (%r14), %edi
testl %edi, %edi
je 0x30bc
callq 0x4898
movl %r13d, %ebx
andl $0x1, %ebx
testl %eax, %eax
je 0x307d
testl %ebx, %ebx
je 0x30bc
movzbl (%r14), %eax
testl %eax, %eax
je 0x30bc
cmpl $0x1a, %eax
je 0x30bc
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x309a
testl %ebx, %ebx
je 0x30bc
movb (%r14), %al
cmpb $0x18, %al
jne 0x30a6
incl %r13d
jmp 0x30b4
movsbl %al, %esi
movq %r15, %rdi
callq 0x18b1
movq %rax, %r15
incl %r12d
incq %r14
jmp 0x3062
testq %r15, %r15
jne 0x30d0
leaq 0x1f40(%rip), %rdi      # 0x5008
callq 0x17cf
movq %rax, %r15
movq -0x30(%rbp), %rax
movl %r12d, 0x8(%rax)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils.c
// Function: get_redir
char						*get_redir(char *redir,
char *line, t_minishell_meta *ms)
{
	int i;

	i = 0;
	redir = NULL;
	if (line[i] == '\0')
		return (ft_strdup(""));
	while (ft_isredir(line[i]) && line[i] != '\0')
	{
		redir = ft_stradd(redir, line[i]);
		i++;
	}
	ms->arg_start += i;
	return (redir);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb (%rsi), %al
testb %al, %al
je 0x3143
movq %rdx, %rbx
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x3133
movb (%r14,%r12), %al
testb %al, %al
je 0x3133
movsbl %al, %esi
movq %r15, %rdi
callq 0x18b1
movq %rax, %r15
movb 0x1(%r14,%r12), %al
incq %r12
jmp 0x3107
addl %r12d, 0x8(%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ebe(%rip), %rdi      # 0x5008
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x17cf
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils.c
// Function: get_file_name
int							get_file_name(char *line, int i,\
int *quote_bit, char **str)
{
	while (line[i] && line[i] != 26)
	{
		if (line[i] == 24 && (*quote_bit = *quote_bit + 1))
		{
			i++;
			continue;
		}
		if ((ft_isspace(line[i]) || ft_isredir(line[i])) && (*quote_bit % 2))
		{
			str[0] = ft_stradd(str[0], line[i]);
			i++;
			continue;
		}
		if (!ft_isspace(line[i]) && (!ft_isredir(line[i])))
		{
			str[0] = ft_stradd(str[0], line[i]);
			i++;
			continue ;
		}
		return (i);
	}
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %r14d
movslq %esi, %r12
addq %rdi, %r12
movzbl (%r12), %eax
cmpl $0x18, %eax
je 0x3186
testl %eax, %eax
je 0x31e3
cmpl $0x1a, %eax
jne 0x318f
jmp 0x31e3
incl (%r15)
jne 0x31db
movb (%r12), %al
movsbl %al, %edi
callq 0x4898
testl %eax, %eax
jne 0x31a9
movsbl (%r12), %edi
callq 0x4258
testl %eax, %eax
je 0x31af
testb $0x1, (%r15)
jne 0x31cb
movsbl (%r12), %edi
callq 0x4898
testl %eax, %eax
jne 0x31e3
movsbl (%r12), %edi
callq 0x4258
testl %eax, %eax
jne 0x31e3
movq (%rbx), %rdi
movsbl (%r12), %esi
callq 0x18b1
movq %rax, (%rbx)
incl %r14d
incq %r12
jmp 0x3171
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils.c
// Function: get_files
void						get_files(char *line,\
t_minishell_meta *ms, int index)
{
	int		i;
	int		quote_bit;
	int		j;

	i = 0;
	quote_bit = 0;
	while ((j = 0) && line[i] != '\0' && ft_isalpha(line[i]))
		i++;
	while (line[i] != '\0' && ft_isspace(line[i]))
		i++;
	if (line[i] == '\0' || !ft_isredir(line[i]))
		return ;
	while (line[i] && line[i] != 26)
	{
		while (line[i] && ft_isredir(line[i]))
			ms->arg = ft_stradd(ms->arg, line[i++]);
		j = add_ms_arg(ms, index, j, 0);
		while (line[i] != '\0' && ft_isspace(line[i]))
			i++;
		i = get_file_name(line, i, &quote_bit, &ms->arg);
		j = add_ms_arg(ms, index, j, 1);
	}
	j = add_ms_arg(ms, index, j, 1);
	ms->piped_cmds->redir[index][j] = 0;
	ms->piped_cmds->files1[index][j] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
andl $0x0, -0x48(%rbp)
xorl %r15d, %r15d
movsbl (%rbx,%r15), %edi
testl %edi, %edi
je 0x3363
callq 0x4898
testl %eax, %eax
je 0x322c
incq %r15
jmp 0x3211
movb (%rbx,%r15), %al
testb %al, %al
je 0x3363
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x3363
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x50(%rbp)
xorl %edx, %edx
movq %rbx, -0x58(%rbp)
movq -0x50(%rbp), %r12
movq -0x58(%rbp), %r13
movslq %r15d, %r14
movzbl (%rbx,%r14), %eax
testl %eax, %eax
je 0x3326
cmpl $0x1a, %eax
je 0x3326
movl %edx, -0x44(%rbp)
movq %r15, -0x40(%rbp)
addq %r14, %rbx
testb %al, %al
je 0x32c3
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x32c3
movq (%r12), %rdi
leaq 0x1(%r14), %r15
movsbl (%r13,%r14), %esi
callq 0x18b1
movq %rax, (%r12)
movb 0x1(%r13,%r14), %al
movq -0x40(%rbp), %rcx
incl %ecx
movq %rcx, -0x40(%rbp)
incq %rbx
movq %r15, %r14
jmp 0x3285
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x44(%rbp), %edx
xorl %ecx, %ecx
callq 0x4744
movl %eax, %r14d
movq -0x40(%rbp), %r15
movsbl (%rbx), %edi
testl %edi, %edi
je 0x32f3
callq 0x4898
testl %eax, %eax
je 0x32f3
incl %r15d
incq %rbx
jmp 0x32db
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
leaq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq 0x3157
movl %eax, %r15d
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl %r14d, %edx
pushq $0x1
popq %rcx
callq 0x4744
movl %eax, %edx
jmp 0x3262
pushq $0x1
popq %rcx
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movl -0x2c(%rbp), %r14d
movl %r14d, %esi
callq 0x4744
movq 0x58(%rbx), %rcx
movq 0x18(%rcx), %rcx
movslq %r14d, %rdx
movq (%rcx,%rdx,8), %rcx
cltq
andq $0x0, (%rcx,%rax,8)
movq 0x58(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rdx,8), %rcx
andq $0x0, (%rcx,%rax,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils2.c
// Function: check_endline
int			check_endline(char *line, t_minishell_meta *ms, int *j, int *q)
{
	int i;

	*j = 0;
	*q = 0;
	i = 0;
	while (line[i] != '\0' && ft_isspace(line[i]))
		i++;
	if ((line[i] == '\0' || line[i] == 26 || ft_isredir(line[i]))\
	&& (ms->no_args = 1))
		return (-i);
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
andl $0x0, (%rdx)
andl $0x0, (%rcx)
xorl %ebx, %ebx
movsbl (%r15,%rbx), %edi
testl %edi, %edi
je 0x33bd
callq 0x4898
testl %eax, %eax
je 0x33a3
incq %rbx
jmp 0x338c
movzbl (%r15,%rbx), %eax
cmpl $0x1a, %eax
je 0x33bd
testl %eax, %eax
je 0x33bd
movsbl %al, %edi
callq 0x4258
testl %eax, %eax
je 0x33c7
movl $0x1, 0x4c(%r14)
negl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils2.c
// Function: return_value
int			return_value(t_minishell_meta *ms, int index, int j, char *line)
{
	int i;

	i = ms->n;
	if (ms->arg)
		ms->piped_cmds->args1[index][j++] = ft_strdup(ms->arg);
	else if (line[i - 1] == 24 && line[i - 2] == 24)
		ms->piped_cmds->args1[index][j++] = ft_strdup("");
	ft_free(&ms->arg);
	ms->piped_cmds->args1[index][j] = 0;
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r15
movslq 0x50(%rdi), %r14
leaq 0x10(%rdi), %r12
movq 0x10(%rdi), %rdi
movslq %esi, %r13
testq %rdi, %rdi
je 0x3417
callq 0x17cf
movq 0x58(%r15), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movslq %ebx, %rdx
incl %ebx
movq %rax, (%rcx,%rdx,8)
jmp 0x3430
cmpb $0x18, -0x1(%rcx,%r14)
jne 0x3430
cmpb $0x18, -0x2(%rcx,%r14)
jne 0x3430
leaq 0x1bda(%rip), %rdi      # 0x5008
jmp 0x33fb
movq %r12, %rdi
callq 0x1790
movq 0x58(%r15), %rax
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movslq %ebx, %rcx
andq $0x0, (%rax,%rcx,8)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils2.c
// Function: return_line
char		*return_line(char *line, t_minishell_meta *ms)
{
	ft_free(&line);
	line = ft_strdup(ms->arg);
	ft_free(&ms->arg);
	return (line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq -0x18(%rbp), %r14
movq %rdi, (%r14)
movq %r14, %rdi
callq 0x1790
movq 0x10(%rbx), %rdi
addq $0x10, %rbx
callq 0x17cf
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x1790
movq (%r14), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils2.c
// Function: free_on_multiline
int			free_on_multiline(t_minishell_meta *ms)
{
	if (ms->arg != NULL && (ms->process_bit = -1))
		ft_free(&ms->arg);
	ft_putstr("Multiline commands not supported\n");
	errno = 1;
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x10(%rdi)
je 0x34b7
orl $-0x1, 0x18(%rdi)
addq $0x10, %rdi
callq 0x1790
leaq 0x1c24(%rip), %rdi      # 0x50e2
callq 0x4a18
callq 0x1040
movl $0x1, (%rax)
pushq $0x1
popq %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils2.c
// Function: add_to_line
int			add_to_line(char *line, int i, t_minishell_meta *ms)
{
	ms->arg = ft_stradd(ms->arg, 24);
	i = parse_quotes(line, i, ms);
	if (i == 0 && ft_free(&line) && free_on_multiline(ms))
		return (-1);
	ms->arg = ft_stradd(ms->arg, 24);
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movq %rdi, -0x20(%rbp)
movq 0x10(%rdx), %rdi
pushq $0x18
popq %rsi
callq 0x18b1
movq %rax, 0x10(%rbx)
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x3f6c
movl %eax, %r14d
testl %eax, %eax
je 0x3521
movq 0x10(%rbx), %rdi
pushq $0x18
popq %rsi
callq 0x18b1
movq %rax, 0x10(%rbx)
jmp 0x353a
leaq -0x20(%rbp), %rdi
callq 0x1790
testl %eax, %eax
je 0x350f
movq %rbx, %rdi
callq 0x349f
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils3.c
// Function: check_red_err
int							check_red_err(char *line, int i,\
t_minishell_meta *ms)
{
	if (line[i] == '\\')
	{
		if (line[i + 1] == '\0' && ft_free(&line) && free_on_multiline(ms))
			return (-1);
		ms->arg = ft_stradd(ms->arg, line[i + 1]);
		i++;
		return (i);
	}
	else if (line[i] == ';' && (line[i] = 25))
	{
		if (line[i + 1] == ';' && syntax_error(";;")\
		&& ft_free(&ms->arg) && ft_free(&line))
			return (-1);
	}
	else if (line[i] == '|')
	{
		if (line[i] == '|' && i == 0 && syntax_error("|") && ft_free(&line))
			return (-1);
		line[i] = 26;
	}
	ms->arg = ft_stradd(ms->arg, line[i]);
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movq %rdi, -0x28(%rbp)
movslq %esi, %r12
movzbl (%rdi,%r12), %eax
cmpl $0x3b, %eax
je 0x35d9
cmpl $0x7c, %eax
je 0x35cd
cmpl $0x5c, %eax
jne 0x3610
cmpb $0x0, 0x1(%r15,%r12)
je 0x365c
incq %r12
movl %r12d, %r14d
jmp 0x3610
testl %r14d, %r14d
je 0x3636
movb $0x1a, (%r15,%r12)
jmp 0x3610
movb $0x19, (%r15,%r12)
cmpb $0x3b, 0x1(%r15,%r12)
jne 0x3610
leaq 0x1b17(%rip), %rdi      # 0x5104
callq 0x4513
testl %eax, %eax
je 0x3610
leaq 0x10(%rbx), %rdi
callq 0x1790
testl %eax, %eax
je 0x3610
leaq -0x28(%rbp), %rdi
callq 0x1790
testl %eax, %eax
jne 0x367d
addq -0x28(%rbp), %r12
movq 0x10(%rbx), %rdi
movsbl (%r12), %esi
callq 0x18b1
movq %rax, 0x10(%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1aca(%rip), %rdi      # 0x5107
callq 0x4513
testl %eax, %eax
je 0x35d2
leaq -0x28(%rbp), %rdi
callq 0x1790
testl %eax, %eax
jne 0x367d
movq -0x28(%rbp), %r15
jmp 0x35d2
leaq -0x28(%rbp), %rdi
callq 0x1790
testl %eax, %eax
je 0x35c5
movq %rbx, %rdi
callq 0x349f
testl %eax, %eax
je 0x35c5
pushq $-0x1
popq %r14
jmp 0x3626
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils3.c
// Function: refine_line
char						*refine_line(char *line, t_minishell_meta *ms)
{
	int		i;

	i = 0;
	while (i < ft_strlen(line))
	{
		if ((line[i] == '\'' || line[i] == '\"')\
		&& (i == 0 || line[i - 1] != '\\'))
		{
			if ((i = add_to_line(line, i, ms)) == -1)
				return (0);
		}
		else if (line[i] == '$')
			i = substitute_value(line, i, ms);
		else if (line[i] != '|' && ft_isredir(line[i]))
		{
			i = check_invalid_redir(line, i, ms);
			if (i == 0 && ft_free(&line))
				return (0);
			continue ;
		}
		else if ((i = check_red_err(line, i, ms)) == -1)
			return (0);
		i++;
	}
	return (return_line(line, ms));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
leaq -0x28(%rbp), %r15
movq %rdi, (%r15)
xorl %ebx, %ebx
xorl %r12d, %r12d
callq 0x17b9
movq -0x28(%rbp), %rdi
cmpl %eax, %r12d
jge 0x374a
movslq %r12d, %rcx
movzbl (%rdi,%rcx), %eax
cmpl $0x22, %eax
je 0x36ce
cmpl $0x24, %eax
je 0x36de
cmpl $0x7c, %eax
je 0x372b
cmpl $0x27, %eax
jne 0x36f8
testl %r12d, %r12d
je 0x36eb
cmpb $0x5c, -0x1(%rdi,%rcx)
jne 0x36eb
cmpb $0x24, %al
jne 0x36f8
movl %r12d, %esi
movq %r14, %rdx
callq 0x4048
jmp 0x373b
movl %r12d, %esi
movq %r14, %rdx
callq 0x34d3
jmp 0x3736
movsbl %al, %edi
callq 0x4258
movq -0x28(%rbp), %rdi
testl %eax, %eax
je 0x372b
movl %r12d, %esi
movq %r14, %rdx
callq 0x2f05
movl %eax, %r12d
testl %eax, %eax
jne 0x3741
movq %r15, %rdi
callq 0x1790
xorl %r12d, %r12d
testl %eax, %eax
je 0x3741
jmp 0x3765
movl %r12d, %esi
movq %r14, %rdx
callq 0x3586
cmpl $-0x1, %eax
je 0x3755
movl %eax, %r12d
incl %r12d
movq -0x28(%rbp), %rdi
jmp 0x36a1
movq %r14, %rsi
callq 0x345e
movq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x3755
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils3.c
// Function: create_3d_array
char						***create_3d_array(int length)
{
	char	***array;
	int		i;

	i = 0;
	if (!(array = (char***)malloc(sizeof(char**) + length * sizeof(char**))))
		return (NULL);
	while (i <= length)
	{
		if (!(array[i] = (char**)malloc(sizeof(char*) * (length + 1))))
			return (NULL);
		array[i][0] = 0;
		i++;
	}
	return (array);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %edi, %r15
leaq 0x8(,%r15,8), %r14
movq %r14, %rdi
callq 0x1110
testq %rax, %rax
je 0x37b1
movq %rax, %rbx
xorl %r12d, %r12d
cmpq %r15, %r12
jg 0x37b3
movq %r14, %rdi
callq 0x1110
movq %rax, (%rbx,%r12,8)
testq %rax, %rax
je 0x37b1
andq $0x0, (%rax)
incq %r12
jmp 0x3792
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_parse_utils3.c
// Function: init_cmds
t_piped_minishell_meta		*init_cmds(int length)
{
	t_piped_minishell_meta	*pipe;

	if (!(pipe = malloc(sizeof(t_piped_minishell_meta))))
		return (NULL);
	if (!(pipe->cmds = (char**)malloc(sizeof(char*) + (length
	* sizeof(char*)))))
		return (NULL);
	pipe->length = length + 1;
	if (!(pipe->args1 = create_3d_array(length)))
		return (NULL);
	if (!(pipe->files1 = create_3d_array(length)))
		return (NULL);
	if (!(pipe->redir = create_3d_array(length)))
		return (NULL);
	if (!(pipe->pipe = (char*)malloc(sizeof(char) * (length + 1))))
		return (NULL);
	pipe->pipe = ft_memset(pipe->pipe, 'x', length);
	pipe->pipe[length] = '\0';
	return (pipe);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r15d
pushq $0x30
popq %rdi
callq 0x1110
testq %rax, %rax
je 0x385e
movq %rax, %rbx
movslq %r15d, %r14
leaq 0x8(,%r14,8), %rdi
callq 0x1110
movq %rax, (%rbx)
testq %rax, %rax
je 0x385e
leal 0x1(%r15), %r12d
movl %r12d, 0x28(%rbx)
movl %r15d, %edi
callq 0x3769
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x385e
movl %r15d, %edi
callq 0x3769
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x385e
movl %r15d, %edi
callq 0x3769
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x385e
movslq %r12d, %rdi
callq 0x1110
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x385e
pushq $0x78
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x4988
movq %rax, 0x20(%rbx)
movb $0x0, (%rax,%r14)
jmp 0x3860
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pvineet44[P]minishell/src/ms_pipe.c
// Function: unset_fd
void			unset_fd(t_minishell_meta *ms)
{
	if (ms->file_fd == 1)
		close(ms->file_fd);
	if (ms->out_fd != -1)
		dup2(ms->out_fd, 1);
	if (ms->in_fd != -1)
	{
		dup2(ms->in_fd, 0);
		close(ms->in_fd);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, 0x40(%rdi)
jne 0x3883
pushq $0x1
popq %rdi
callq 0x10a0
movl 0x3c(%rbx), %edi
cmpl $-0x1, %edi
je 0x3893
pushq $0x1
popq %rsi
callq 0x1070
movl 0x38(%rbx), %edi
cmpl $-0x1, %edi
je 0x38b0
xorl %esi, %esi
callq 0x1070
movl 0x38(%rbx), %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10a0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq