LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_pipe.c
// Function: exe_pipe
int		exe_pipe(t_btree *ast, t_control *control)
{
	pid_t	pid;
	int		status;

	ft_fork(&pid);
	if (pid == 0)
		exe_pipe_child(ast, control);
	else
	{
		waitpid(pid, &status, 0);
		control->exit_status = WIFEXITED(status) ? WEXITSTATUS(status) : g_sig;
	}
	return (control->exit_status);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdi
callq 0x24b3
movl (%r15), %edi
testl %edi, %edi
je 0x67bb
leaq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x21c0
movl (%r14), %eax
testb $0x7f, %al
je 0x67ab
leaq 0xb995(%rip), %rax      # 0x1213c
movl (%rax), %eax
jmp 0x67ae
movzbl %ah, %eax
movl %eax, 0x4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6688
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_simple_cmd_root.c
// Function: exe_simple_cmd_root
int	exe_simple_cmd_root(t_token *token, t_control *control)
{
	int builtin;
	int res;

	res = exe_prepare_simple_cmd(token, control);
	if (res == 1)
		return (1);
	//check the exit status is working the same way as the last Return here.
	else if (res == 2)
		return (0);
	//need to make sure the control->quit is raised inside this function..
	if (!exe_perform_arrow((t_simple_cmd *)token->str, control))
	{
		exe_cancel_arrows(control);
		return (0);
	}
	//HERE function that does all the redirections.
	//need to operate the redirections list just before executing the simple
	//command. note: the stdin and stdout, should be saved then restored.
	if (!((t_simple_cmd *)token->str)->argv[0])
		;
	else if ((builtin = exe_is_builtin(((t_simple_cmd *)token->str)->argv[0])))
	{
//		printf("\033[35mthis is a builtin\033[0m\n");
		//check the returned value here;
		exe_call_builtin(((t_simple_cmd *)token->str), builtin, control);
	}
	else
		exe_binary((t_simple_cmd *)token->str, control);
	//try execute the non builtin commands here.
	//always make sure we set the exit status.
	//always restore the stdion and stdout, to original value.
	exe_cancel_arrows(control);
	return (!!control->exit_status);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6844
cmpl $0x1, %eax
je 0x683c
cmpl $0x2, %eax
je 0x681f
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x69c8
testl %eax, %eax
je 0x6817
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x682b
callq 0x688c
movq (%r14), %rdi
testl %eax, %eax
je 0x6823
movl %eax, %esi
movq %rbx, %rdx
callq 0x6952
jmp 0x682b
movq %rbx, %rdi
callq 0x6b9c
xorl %eax, %eax
jmp 0x683c
movq %rbx, %rsi
callq 0x6f0d
movq %rbx, %rdi
callq 0x6b9c
xorl %eax, %eax
cmpl $0x0, 0x4(%rbx)
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_simple_cmd_root.c
// Function: exe_prepare_simple_cmd
int	exe_prepare_simple_cmd(t_token *token, t_control *control)
{
	int res;

//	printf("\033[34mBEFORE WORD EXPAND:\033[0m\n");
//	debug_tokens_list((t_list *)token->str);
	res = word_expand_root(((t_list **)&token->str), control);
	if (res)
	{
		control->exit_status = 1;
		if (res == 2)
			control->quit = 1;
		return (res);
	}
//	printf("\033[34mAFTER WORD EXPAND:\033[0m\n");
//	debug_tokens_list((t_list *)token->str);
	if (!list_to_cmd_root(token))
	{
		control->exit_status = 1;
		control->quit = 1;
		return (2);
	}
//	debug_simple_cmd(((t_simple_cmd *)token->str));
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6ff8
testl %eax, %eax
je 0x6865
movl $0x1, 0x4(%rbx)
cmpl $0x2, %eax
je 0x6881
jmp 0x6884
movq %r14, %rdi
callq 0x8af8
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x6884
movl $0x1, 0x4(%rbx)
movl $0x2, %eax
orb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_simple_cmd_root.c
// Function: exe_is_builtin
int	exe_is_builtin(char *argv0) //OK
{
	if (!argv0)
		return (0);
	if (!ft_strcmp(argv0, "echo"))
		return (B_ECHO);
	else if (!ft_strcmp(argv0, "cd"))
		return (B_CD);
	else if (!ft_strcmp(argv0, "pwd"))
		return (B_PWD);
	else if (!ft_strcmp(argv0, "export"))
		return (B_EXPORT);
	else if (!ft_strcmp(argv0, "unset"))
		return (B_UNSET);
	else if (!ft_strcmp(argv0, "env"))
		return (B_ENV);
	else if (!ft_strcmp(argv0, "exit"))
		return (B_EXIT);
	else
		return (0);
}

// Assembly:
testq %rdi, %rdi
je 0x6925
pushq %rbx
movq %rdi, %rbx
leaq 0x4b84(%rip), %rsi      # 0xb424
callq 0xaa70
testl %eax, %eax
je 0x6928
leaq 0x48d9(%rip), %rsi      # 0xb189
movq %rbx, %rdi
callq 0xaa70
testl %eax, %eax
je 0x692f
leaq 0x4b66(%rip), %rsi      # 0xb429
movq %rbx, %rdi
callq 0xaa70
testl %eax, %eax
je 0x6936
leaq 0x4860(%rip), %rsi      # 0xb136
movq %rbx, %rdi
callq 0xaa70
testl %eax, %eax
je 0x693d
leaq 0x485b(%rip), %rsi      # 0xb144
movq %rbx, %rdi
callq 0xaa70
testl %eax, %eax
je 0x6944
leaq 0x4b31(%rip), %rsi      # 0xb42d
movq %rbx, %rdi
callq 0xaa70
testl %eax, %eax
je 0x694b
leaq 0x48cd(%rip), %rsi      # 0xb1dc
movq %rbx, %rdi
callq 0xaa70
xorl %ecx, %ecx
testl %eax, %eax
movl $0x7, %eax
cmovnel %ecx, %eax
jmp 0x6950
xorl %eax, %eax
retq
movl $0x1, %eax
jmp 0x6950
movl $0x2, %eax
jmp 0x6950
movl $0x3, %eax
jmp 0x6950
movl $0x4, %eax
jmp 0x6950
movl $0x5, %eax
jmp 0x6950
movl $0x6, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_simple_cmd_root.c
// Function: exe_call_builtin
int	exe_call_builtin(t_simple_cmd *cmd, int id, t_control *control)
{
	if (id == B_ECHO)
		return (echo_builtin(cmd->argv, control));
	else if (id == B_ENV)
		return (env_builtin(control->env, control));
	else if (id == B_EXPORT)
		return (export_builtin(&control->env, cmd->argv, control));
	else if (id == B_UNSET)
		return (unset_builtin(&control->env, cmd->argv, control));
	else if (id == B_CD)
		return (cd_builtin(control->env, cmd->argv, control));
	else if (id == B_EXIT)
		return (exit_builtin(cmd->argv, control));
	else if (id == B_PWD)
		return (pwd_builtin(control));
	return (0);
}

// Assembly:
decl %esi
cmpl $0x6, %esi
ja 0x699d
leaq 0x4aa8(%rip), %rax      # 0xb408
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rdi), %rdi
movq %rdx, %rsi
jmp 0x3620
leaq 0x20(%rdx), %rax
movq 0x8(%rdi), %rsi
movq %rax, %rdi
jmp 0x3510
movq %rdx, %rdi
jmp 0x3ce4
leaq 0x20(%rdx), %rax
movq 0x8(%rdi), %rsi
movq %rax, %rdi
jmp 0x36cc
xorl %eax, %eax
retq
movq 0x20(%rdx), %rax
movq 0x8(%rdi), %rsi
movq %rax, %rdi
jmp 0x3984
movq 0x20(%rdx), %rdi
movq %rdx, %rsi
jmp 0x3210
movq 0x8(%rdi), %rdi
movq %rdx, %rsi
jmp 0x3d04
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_perform_arrow.c
// Function: exe_perform_arrow
int	exe_perform_arrow(t_simple_cmd *cmd, t_control *control)
{
	t_list const	*arrows = cmd->arrows;
	t_arrow			*arrow;

	while (arrows && (arrow = arrows->content))
	{
		if ((arrow->id != LESS && !exe_perform_redirections(arrow, control)) ||
			(arrow->id == LESS && !exe_perform_indirections(arrow, control)))
		{
			control->exit_status = 1;
			return (0);
		}
		arrows = arrows->next;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
movl $0x1, %ebx
testq %r12, %r12
je 0x6a2b
movq %rsi, %r14
movq (%r12), %r15
testq %r15, %r15
je 0x6a2b
cmpl $0xa, 0x10(%r15)
je 0x69ff
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a39
testl %eax, %eax
je 0x6a21
cmpl $0xa, 0x10(%r15)
jne 0x6a15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6af7
testl %eax, %eax
je 0x6a21
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x69e0
jmp 0x6a2b
movl $0x1, 0x4(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_perform_arrow.c
// Function: exe_perform_redirections
int	exe_perform_redirections(t_arrow *arrow, t_control *control)
{
	int			fd;
	int			src;
	int			options;
	const int	signals = S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR;

	src = ft_isdigit(arrow->src[0]) ? ft_atoi(arrow->src) : 1;
	options = (arrow->id == GREAT ? O_TRUNC : O_APPEND);
	if ((fd = open(arrow->dest, O_WRONLY | O_CREAT | options, signals)) < 0)
	{
		ft_perror("open", arrow->dest, strerror(errno));
		return (0);
	}
	if (dup2(fd, src) == -1)
	{
		ft_perror("dup2", NULL, NULL);
		control->quit = 1;
		close(fd);
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movsbl (%rax), %edi
callq 0x9c08
testl %eax, %eax
je 0x6a62
movq (%r15), %rdi
callq 0x9b54
movl %eax, %ebp
jmp 0x6a67
movl $0x1, %ebp
xorl %esi, %esi
cmpl $0xc, 0x10(%r15)
setne %sil
movq 0x8(%r15), %rdi
shll $0x9, %esi
addl $0x241, %esi            # imm = 0x241
xorl %r14d, %r14d
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x2200
testl %eax, %eax
js 0x6ac9
movl %eax, %r12d
movl %eax, %edi
movl %ebp, %esi
callq 0x20b0
movl $0x1, %r14d
cmpl $-0x1, %eax
jne 0x6aeb
leaq 0x4951(%rip), %rdi      # 0xb401
xorl %r14d, %r14d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2511
orb $0x1, (%rbx)
movl %r12d, %edi
callq 0x2110
jmp 0x6aeb
movq 0x8(%r15), %rbx
callq 0x2040
movl (%rax), %edi
callq 0x2220
leaq 0x4951(%rip), %rdi      # 0xb431
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2511
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_perform_arrow.c
// Function: exe_perform_indirections
int	exe_perform_indirections(t_arrow *arrow, t_control *control)
{
	int		fd;
	int		src;

	src = ft_isdigit(arrow->src[0]) ? ft_atoi(arrow->src) : 0;
	if ((fd = open(arrow->dest, O_RDONLY)) < 0)
	{
		ft_perror("open", arrow->dest, strerror(errno));
		return (0);
	}
	if (dup2(fd, src) == -1)
	{
		ft_perror("dup2", NULL, NULL);
		control->quit = 1;
		close(fd);
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movsbl (%rax), %edi
callq 0x9c08
testl %eax, %eax
je 0x6b21
movq (%r15), %rdi
callq 0x9b54
movl %eax, %r12d
jmp 0x6b24
xorl %r12d, %r12d
movq 0x8(%r15), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
xorl %eax, %eax
callq 0x2200
testl %eax, %eax
js 0x6b6e
movl %eax, %ebp
movl %eax, %edi
movl %r12d, %esi
callq 0x20b0
movl $0x1, %r14d
cmpl $-0x1, %eax
jne 0x6b90
leaq 0x48ab(%rip), %rdi      # 0xb401
xorl %r14d, %r14d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2511
orb $0x1, (%rbx)
movl %ebp, %edi
callq 0x2110
jmp 0x6b90
movq 0x8(%r15), %rbx
callq 0x2040
movl (%rax), %edi
callq 0x2220
leaq 0x48ac(%rip), %rdi      # 0xb431
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2511
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_perform_arrow.c
// Function: exe_cancel_arrows
int	exe_cancel_arrows(t_control *control)
{
	if ((dup2(control->truefd[STDIN_FILENO], STDIN_FILENO)) == -1 ||
		(dup2(control->truefd[STDOUT_FILENO], STDOUT_FILENO)) == -1 ||
		(dup2(control->truefd[STDERR_FILENO], STDERR_FILENO)) == -1)
	{
		control->quit = 1;
		control->exit_status = 1;
		ft_perror("dup2", NULL, strerror(errno));
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x30(%rdi), %edi
xorl %esi, %esi
callq 0x20b0
cmpl $-0x1, %eax
je 0x6bda
movl 0x34(%rbx), %edi
movl $0x1, %ebp
movl $0x1, %esi
callq 0x20b0
cmpl $-0x1, %eax
je 0x6bda
movl 0x38(%rbx), %edi
movl $0x2, %esi
callq 0x20b0
cmpl $-0x1, %eax
jne 0x6c03
orb $0x1, (%rbx)
movl $0x1, 0x4(%rbx)
callq 0x2040
movl (%rax), %edi
callq 0x2220
leaq 0x480a(%rip), %rdi      # 0xb401
xorl %esi, %esi
movq %rax, %rdx
callq 0x2511
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_binary.c
// Function: build_env2d
char	**build_env2d(t_list *env, t_control *control)
{
	int			i;
	const int	lstsize = ft_lstsize(env);
	char		**res;
	t_env		*tmp;

	if (!(res = (char **)ft_memalloc(sizeof(char *) * (lstsize + 1))))
	{
		control->quit = 1;
		return (NULL);
	}
	i = -1;
	while (env)
	{
		tmp = env->content;
		if (!(res[++i] = ft_strjoin_free(tmp->label, (char	[2]){'=', '\0'}, 0))
		|| !(res[i] = ft_strjoin_free(res[i], tmp->value, 1)))
		{
			control->quit = 1;
			ft_array_free(res, lstsize);
			return (NULL);
		}
		env = env->next;
	}
	return (res);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0xa8b8
movl %eax, %ebp
cltq
leaq 0x8(,%rax,8), %rdi
callq 0xaa1c
testq %rax, %rax
je 0x6c99
movq %rax, %rbx
testq %r15, %r15
je 0x6cb3
movq %r14, 0x10(%rsp)
leaq 0xe(%rsp), %r12
movq %rbx, %r13
movq (%r15), %r14
movq (%r14), %rdi
movw $0x3d, 0xe(%rsp)
movq %r12, %rsi
xorl %edx, %edx
callq 0xa584
movq %rax, (%r13)
testq %rax, %rax
je 0x6c9f
movq 0x8(%r14), %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0xa584
movq %rax, (%r13)
testq %rax, %rax
je 0x6c9f
movq 0x8(%r15), %r15
addq $0x8, %r13
testq %r15, %r15
jne 0x6c50
jmp 0x6cb3
orb $0x1, (%r14)
jmp 0x6cb1
movq 0x10(%rsp), %rax
orb $0x1, (%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa924
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_binary.c
// Function: exe_binary_fork
int		exe_binary_fork(char *prog, char **argv, t_control *control)
{
	char	**env;
	pid_t	pid;
	int		status;

	ft_fork(&pid);
	if (pid == 0)
	{
		if (!(env = build_env2d(control->env, control)) && control->quit)
			ft_exit("malloc", NULL, strerror(errno), 1);
		if (execve(prog, argv, env) == -1)
			ft_perror(prog, NULL, strerror(errno));
		ft_array_free(env, ft_array_len(env));
		ft_errno_exit();
	}
	else
	{
		waitpid(pid, &status, 0);
		control->exit_status = WIFEXITED(status) ? WEXITSTATUS(status) : g_sig;
//		printf("Exit status of the child was %d\n", control->exit_status);
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x24b3
movl (%r14), %edi
testl %edi, %edi
je 0x6d0c
movq %rsp, %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x21c0
movl (%rbx), %eax
testb $0x7f, %al
je 0x6d8f
movl 0xb435(%rip), %eax      # 0x1213c
jmp 0x6d92
movq 0x20(%r12), %rdi
movq %r12, %rsi
callq 0x6c0c
movq %rax, %r14
testq %rax, %rax
jne 0x6d4a
testb $0x1, (%r12)
je 0x6d4a
callq 0x2040
movl (%rax), %edi
callq 0x2220
leaq 0x46fb(%rip), %rdi      # 0xb436
xorl %esi, %esi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x24a4
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2150
cmpl $-0x1, %eax
jne 0x6d76
callq 0x2040
movl (%rax), %edi
callq 0x2220
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2511
movq %r14, %rdi
callq 0xa9b8
movq %r14, %rdi
movl %eax, %esi
callq 0xa924
callq 0x655f
jmp 0x6d97
movzbl %ah, %eax
movl %eax, 0x4(%r12)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_binary.c
// Function: exe_given_path
int		exe_given_path(char **argv0, t_control *control, char **path_to_binary)
{
	char *new;

	if (!(new = ft_strrchr(*argv0, '/')))
		return (0);
	if (!(new = ft_strdup(new + 1)))
	{
		control->quit = 1;
		return (-1);
	}
	*path_to_binary = *argv0;
	*argv0 = new;
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x2f, %esi
callq 0xa634
testq %rax, %rax
je 0x6de8
incq %rax
movq %rax, %rdi
callq 0xa4b4
testq %rax, %rax
je 0x6dec
movq (%r14), %rcx
movq %rcx, (%rbx)
movq %rax, (%r14)
movl $0x1, %eax
jmp 0x6df5
xorl %eax, %eax
jmp 0x6df5
orb $0x1, (%r15)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_binary.c
// Function: exe_search_path
int		exe_search_path(char *argv0, t_control *control, char **path_to_binary)
{
	int			i;
	int			ret;
	char		*path;
	char		**split;
	struct stat	buf;

	if (!(split = ft_split(env_get("PATH", 4, control->env), ':')))
		return (errno ? -1 : 0);
	i = -1;
	ret = 0;
	while (ret == 0 && split[++i])
	{
		if (!(path = ft_strjoin(split[i], argv0)))
			ret = -1;
		else if (!stat(path, &buf) && S_ISREG(buf.st_mode))
		{
			*path_to_binary = path;
			ret = 1;
		}
		else
			ft_free((void **)&path);
	}
	errno = 0;
	ft_array_free(split, ft_array_len(split));
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, %r15
movq 0x20(%rsi), %rdx
leaq 0x461e(%rip), %rdi      # 0xb43d
movl $0x4, %esi
callq 0x339c
movq %rax, %rdi
movl $0x3a, %esi
callq 0x9f4c
testq %rax, %rax
je 0x6ecd
movq %rax, %r14
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6eda
movq %r14, %rbx
addq $0x8, %rbx
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r15, %rsi
callq 0xa4f8
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x6eb4
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
testl %eax, %eax
jne 0x6ea6
movl 0x30(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x6ea6
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movl $0x1, %ebp
jmp 0x6eb9
movq %r13, %rdi
callq 0xaa9c
xorl %ebp, %ebp
movb $0x1, %al
jmp 0x6ebb
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %eax, %eax
testb %al, %al
je 0x6edc
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x6e5f
jmp 0x6edc
callq 0x2040
xorl %ebp, %ebp
cmpl (%rax), %ebp
sbbl %ebp, %ebp
jmp 0x6ef9
xorl %ebp, %ebp
callq 0x2040
movl $0x0, (%rax)
movq %r14, %rdi
callq 0xa9b8
movq %r14, %rdi
movl %eax, %esi
callq 0xa924
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/exe_binary.c
// Function: exe_binary
int		exe_binary(t_simple_cmd *cmd, t_control *control)
{
	int		ret;
	char	*argv0;
	char	*path_to_binary;

	g_sig = 1;
//	printf("\e[95mThis is a binary !\e[0m\n");
	path_to_binary = NULL;
	if ((ret = exe_given_path(&cmd->argv[0], control, &path_to_binary)) == -1)
		return (ret);
	else if (ret == 0)
	{
		if (!(argv0 = ft_strjoin((char	[]){'/', '\0'}, cmd->argv[0])) ||
			((ret = exe_search_path(argv0, control, &path_to_binary)) == -1))
			control->quit = 1;
		else if (ret == 0 && (control->exit_status = 127))
			ft_perror(cmd->argv[0], NULL, "Command not found");
		free(argv0);
		if (ret != 1)
			return (ret);
	}
	ret = exe_binary_fork(path_to_binary, cmd->argv, control);
	free(path_to_binary);
	return (ret);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0xb214(%rip)      # 0x1213c
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq 0x8(%rdi), %rdi
callq 0x6da8
movl %eax, %r12d
cmpl $-0x1, %eax
je 0x6fe6
testl %r12d, %r12d
jne 0x6fc4
leaq 0xe(%rsp), %rdi
movw $0x2f, (%rdi)
movq 0x8(%r14), %rax
movq (%rax), %rsi
callq 0xa4f8
movq %rax, %r15
testq %rax, %rax
je 0x6f8d
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6dfb
testl %eax, %eax
je 0x6f97
movl $0x1, %r12d
cmpl $-0x1, %eax
je 0x6f8f
jmp 0x6fb6
xorl %eax, %eax
orb $0x1, (%rbx)
movl %eax, %r12d
jmp 0x6fb6
movl $0x7f, 0x4(%rbx)
movq 0x8(%r14), %rax
movq (%rax), %rdi
leaq 0x4496(%rip), %rdx      # 0xb442
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x2511
movq %r15, %rdi
callq 0x2240
cmpl $0x1, %r12d
jne 0x6fe6
movq 0x10(%rsp), %r15
movq 0x8(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x6cc5
movq %r15, %rdi
callq 0x2240
movl $0x1, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_root_v2.c
// Function: word_expand_root
int		word_expand_root(t_list **tokens, t_control *control)
{
	int id;
	int res;

	while (*tokens)
	{
		id = tklst_id(*tokens);
		if (id == GREAT || id == DGREAT || id == LESS)
		{
			tokens = &(*tokens)->next;
			((t_token*)(*tokens)->content)->is_filename = 1;
		}
		res = word_expand_and_replace(&tokens, control);
		if (res == 1 || res == 2)
			return (res);
		if (res == 3)
			;
		else
			tokens = &(*tokens)->next;
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r12
movq %rdi, 0x8(%rsp)
movq (%rdi), %rdi
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x7088
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movl $0x3400, %ebp           # imm = 0x3400
callq 0x63f7
cmpl $0xd, %eax
ja 0x704d
btl %eax, %ebp
jae 0x704d
movq (%r12), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rax), %rax
movq (%rax), %rax
movl $0x1, 0xc(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x7097
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x7086
cmpl $0x3, %eax
je 0x7076
movq 0x8(%rsp), %rax
movq (%rax), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %r12
movq (%r12), %rdi
testq %rdi, %rdi
jne 0x7023
jmp 0x7088
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_root_v2.c
// Function: word_expand_and_replace
int		word_expand_and_replace(t_list ***tokens, t_control *control)
{
	t_list	*expanded_word;
	int		res;
	t_list 	*del_me;

	if (!(expanded_word = dup_token((**tokens)->content)))
		return (2);
	if ((res = word_expand_stage1(&expanded_word, control)))
	{
		if (res == 1)
			ft_ambiguous_redirect(((t_token *)(**tokens)->content)->str, 2);
		if (res < 3)
			ft_lstclear(&expanded_word, del_token);
		if (res == 3)
		{
			del_me = **tokens;
			**tokens = (**tokens)->next;
			del_token(del_me->content);
			ft_free((void **)&del_me);
		}
		return (res);
	}
	word_expand_replace(tokens, expanded_word);
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x7152
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x7132
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x71aa
testl %eax, %eax
je 0x7139
movl %eax, %ebx
cmpl $0x1, %eax
jne 0x70ea
movq (%r14), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rdi
movl $0x2, %esi
callq 0x25f5
cmpl $0x2, %ebx
jg 0x7100
leaq -0x496d(%rip), %rsi     # 0x2789
leaq 0x8(%rsp), %rdi
callq 0xa820
cmpl $0x3, %ebx
jne 0x7148
movq (%r14), %rax
movq (%rax), %rcx
leaq 0x10(%rsp), %r14
movq %rcx, (%r14)
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movq (%r14), %rax
movq (%rax), %rdi
callq 0x2789
movq %r14, %rdi
callq 0xaa9c
jmp 0x7148
movl $0x2, %ebx
jmp 0x7148
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7228
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_root_v2.c
// Function: dup_token
t_list	*dup_token(const t_token *token)
{
	t_list	*new_list;
	t_token	*new_token;

	if (!(new_token = malloc(sizeof(t_token))))
		return (NULL);
	ft_memcpy(new_token, token, sizeof(t_token));
	if (!(new_token->str = ft_strdup(token->str)))
	{
		del_token(new_token);
		return (NULL);
	}
	if (!(new_list = ft_lstnew(new_token)))
	{
		del_token(new_token);
		return (NULL);
	}
	return (new_list);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x20, %edi
callq 0x2190
testq %rax, %rax
je 0x71a0
movq %rax, %rbx
movl $0x20, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x9de8
movq (%r14), %rdi
callq 0xa4b4
movq %rax, (%rbx)
testq %rax, %rax
je 0x7198
movq %rbx, %rdi
callq 0xa894
testq %rax, %rax
jne 0x71a2
movq %rbx, %rdi
callq 0x2789
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_root_v2.c
// Function: word_expand_stage1
int		word_expand_stage1(t_list **tokens, t_control *control)
{
	int res;
	int is_filename;

	//printf("word_exp_stage1: BEFORE: token list is:\n");
	//debug_tokens_list(*tokens);
	if (!tild_expansion_root(control->env, \
				&((t_token*)(*tokens)->content)->str))
		return (2);
	is_filename = ((t_token *)((*tokens)->content))->is_filename;
	if ((res = parameter_expansion_root(*tokens, control, is_filename)))
		return (res);
	skim_empty_tokens(tokens);
	if (!*tokens)
		return (3);
	if (is_filename && ft_strlen(((t_token*)(*tokens)->content)->str) == 0)
		return (1);
	res = pathname_expansion_root(tokens, is_filename);
	//printf("word_exp_stage1: AFTER: token list is:\n");
	//debug_tokens_list(*tokens);
	return (res);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rdi
movq (%rbx), %rax
movq (%rax), %rsi
callq 0x7b48
testl %eax, %eax
je 0x7210
movq (%rbx), %rdi
movq (%rdi), %rax
movl 0xc(%rax), %ebp
movq %r14, %rsi
movl %ebp, %edx
callq 0x72d0
testl %eax, %eax
jne 0x7215
movq %rbx, %rdi
callq 0x727c
movq (%rbx), %rax
testq %rax, %rax
je 0x721a
testl %ebp, %ebp
je 0x7202
movq (%rax), %rax
movq (%rax), %rdi
callq 0xa5c8
testq %rax, %rax
je 0x7221
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x7980
movl $0x2, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x3, %eax
jmp 0x7215
movl $0x1, %eax
jmp 0x7215
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_root_v2.c
// Function: word_expand_replace
void	word_expand_replace(t_list ***tokens, t_list *expanded)
{
	t_list *last;
	t_list *del_me;

	last = ft_lstlast(expanded);
	last->next = (**tokens)->next;
	del_me = **tokens;
	**tokens = expanded;
	*tokens = &last;
	del_token(del_me->content);
	free(del_me);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xa87c
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq (%r14), %rdx
movq (%rdx), %rdx
movq 0x8(%rdx), %rdx
movq %rdx, 0x8(%rax)
movq (%r14), %rax
movq (%rax), %r15
movq %rbx, (%rax)
movq %rcx, (%r14)
movq (%r15), %rdi
callq 0x2789
movq %r15, %rdi
callq 0x2240
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/word_expand_assist.c
// Function: skim_empty_tokens
void	skim_empty_tokens(t_list **tokens)
{
	t_list	*del_me;

	while (*tokens)
	{
		if (!ft_strlen(((t_token *)((*tokens)->content))->str))
		{
			del_me = *tokens;
			*tokens = (*tokens)->next;
			del_token((t_token *)(del_me->content));
			free(del_me);
		}
		else
			tokens = &(*tokens)->next;
	}
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x72cd
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rax), %rax
movq (%rax), %rdi
callq 0xa5c8
movq (%rbx), %r14
testq %rax, %rax
je 0x72a7
addq $0x8, %r14
movq %r14, %rbx
jmp 0x72be
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq 0x2789
movq %r14, %rdi
callq 0x2240
movq (%rbx), %rax
testq %rax, %rax
jne 0x728b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion_root.c
// Function: parameter_expansion_root
int		parameter_expansion_root(t_list *token, \
		t_control *control, int filename)
{
	t_expansion	exp;
	int			res;

	res = 0;
	reset_t_expansion(&exp, filename, control);
	return (parameter_exp(token, control, exp, res));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movl %edx, 0x2c(%rsp)
movq 0x20(%rsi), %rdx
leaq 0x415a(%rip), %rdi      # 0xb454
movl $0x3, %esi
callq 0x339c
movq %rax, 0x30(%rsp)
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7357
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion_root.c
// Function: parameter_exp
int		parameter_exp(t_list *token, t_control *ctrl, t_expansion exp, int res)
{
	char *insert;
	char *str;

	while ((exp.start = param_exp_find_start(token, exp.start, &exp.quoted)) \
			!= -1)
	{
		str = ((t_token *)token->content)->str;
		if ((exp.end = param_exp_find_end(token, exp.start)) == exp.start)
		{
			exp.start++;
			continue;
		}
		if (!(insert = param_exp_get_env(ctrl, str + exp.start + 1, \
				exp.end - exp.start)))
			return (2);
		//printf("expanded variable = [%s]\n", insert);
		ft_memmove(str + exp.start, str + exp.end + 1, \
				ft_strlen(str + exp.end));
		if ((res = parameter_expansion2(&token, &insert, &exp)))
		{
			free(insert);
			return (res);
		}
		free(insert);
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %rbp
movq %rdi, 0x10(%rsp)
leaq 0x58(%rsp), %r14
movl -0x8(%r14), %esi
movq %r14, %rdx
callq 0x745e
movl %eax, -0x8(%r14)
xorl %ecx, %ecx
cmpl $-0x1, %eax
je 0x744d
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r13
movq (%rbp), %rcx
movq (%rcx), %r12
movq %rbp, %rdi
movl %eax, %esi
callq 0x74f3
movl %eax, 0x4(%r15)
movslq (%r15), %rcx
cmpl %ecx, %eax
jne 0x73bd
incl %ecx
movl %ecx, (%r15)
jmp 0x7421
leaq (%r12,%rcx), %rsi
incq %rsi
subl %ecx, %eax
movq %rbx, %rdi
movl %eax, %edx
callq 0x7547
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x7444
movslq (%r15), %rbp
addq %r12, %rbp
movslq 0x4(%r15), %rax
leaq (%r12,%rax), %rdi
addq %rax, %r12
incq %r12
callq 0xa5c8
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x9e04
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x75a4
movl %eax, %ebp
movq 0x8(%rsp), %rdi
callq 0x2240
testl %ebp, %ebp
jne 0x744b
movq 0x10(%rsp), %rbp
movl (%r15), %esi
movq %rbp, %rdi
movq %r14, %rdx
callq 0x745e
movl %eax, (%r15)
cmpl $-0x1, %eax
jne 0x739a
xorl %ecx, %ecx
jmp 0x744d
movl $0x2, %ecx
jmp 0x744d
movl %ebp, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion_root.c
// Function: param_exp_find_start
int		param_exp_find_start(t_list *token, int start, char *quot)
{
	int		esc_next;
	char	*str;

	str = ((t_token*)token->content)->str;
	*quot = 0;
	esc_next = 0;
	while (str[start])
	{
		if (!esc_next && !*quot && (str[start] == '\'' || str[start] == '\"'))
			*quot = str[start];
		else if (!esc_next && *quot && str[start] == *quot)
			*quot = 0;
		if (!esc_next && str[start] == '\\')
		{
			esc_next = 1;
			start++;
			continue;
		}
		if (!esc_next && *quot != '\'' && str[start] == '$')
			return (start);
		esc_next = 0;
		start++;
	}
	return (-1);
}

// Assembly:
movq (%rdi), %rax
movq (%rax), %rcx
movb $0x0, (%rdx)
movslq %esi, %r8
movb (%rcx,%r8), %dil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %dil, %dil
je 0x74ef
addq %r8, %rcx
incq %rcx
movb $0x1, %r8b
movb $0x1, %r9b
testb $0x1, %r8b
je 0x74df
movb (%rdx), %r10b
testb %r10b, %r10b
je 0x74a4
movb $0x1, %r9b
testb $0x1, %r8b
je 0x74df
cmpb %r10b, %dil
jne 0x74b7
xorl %edi, %edi
jmp 0x74b4
cmpb $0x22, %dil
je 0x74b4
movzbl %dil, %r9d
cmpl $0x27, %r9d
jne 0x7492
movb %dil, (%rdx)
movb $0x1, %r9b
testb $0x1, %r8b
je 0x74df
movb -0x1(%rcx), %dil
cmpb $0x5c, %dil
setne %r9b
testb %r8b, %r9b
je 0x74df
movb $0x1, %r9b
cmpb $0x24, %dil
jne 0x74df
cmpb $0x27, (%rdx)
jne 0x74f0
movb (%rcx), %dil
incl %esi
incq %rcx
movl %r9d, %r8d
testb %dil, %dil
jne 0x7481
retq
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion_root.c
// Function: param_exp_find_end
int		param_exp_find_end(t_list *token, int start)
{
	int		end;
	char	*str;

	str = ((t_token*)token->content)->str;
	end = start + 1;
	while (str[end])
	{
		if (str[start + 1] == '?')
			return (start + 1);
		if (!ft_isalnum(str[end]) && str[end] != '_')
			break ;
		end++;
	}
	return (end - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq (%rdi), %rax
movq (%rax), %r15
movslq %esi, %r14
movb 0x1(%r15,%r14), %al
testb %al, %al
je 0x753f
leaq 0x1(%r14), %rbx
cmpb $0x3f, (%r15,%rbx)
je 0x753f
movsbl %al, %edi
callq 0x9bd0
testl %eax, %eax
jne 0x752b
cmpb $0x5f, 0x1(%r15,%r14)
jne 0x7537
movb 0x2(%r15,%r14), %al
incq %r14
testb %al, %al
jne 0x7510
incl %r14d
movl %r14d, %ebx
decl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion_root.c
// Function: param_exp_get_env
char	*param_exp_get_env(t_control *control, char *str, int len)
{
	char *value;
	char **addr_value;

	if (!ft_strncmp(str, "?", len))
		return (ft_itoa(control->exit_status));
	addr_value = env_get_addr(str, len, control->env);
	//printf("str: [%s], len: %d\n", str,  len);
	//printf("value: %s\n", value);
	if (!addr_value)
		value = ft_strdup("");
	else
		value = ft_strdup(*addr_value);
	return (value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movslq %edx, %r14
leaq 0x3efc(%rip), %rsi      # 0xb458
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa5dc
testl %eax, %eax
je 0x7584
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3403
testq %rax, %rax
je 0x7592
movq (%rax), %rdi
jmp 0x7599
movl 0x4(%r15), %edi
popq %rbx
popq %r14
popq %r15
jmp 0x9c94
leaq 0x3c42(%rip), %rdi      # 0xb1db
popq %rbx
popq %r14
popq %r15
jmp 0xa4b4
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion2.c
// Function: parameter_expansion2
int	parameter_expansion2(t_list **token, char **var, t_expansion *exp)
{
	int field_split;

	((t_token *)(*token)->content)->unquote_protected = 1;
	((t_token *)(*token)->content)->protect_s = exp->start;
	field_split = need_to_field_split1(var, exp);
	if (field_split == 2 || (field_split == 1 && exp->is_filename))
		return (field_split);
	if (!field_split)
	{
		if (!param_exp_no_fsplit(*token, *var, exp))
			return (2);
	}
	else
	{
		if (!field_splitting_root(token, *var, exp))
			return (2);
	}
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movl $0x1, 0x14(%rax)
movl (%rdx), %ecx
movl %ecx, 0x18(%rax)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x7613
testl %eax, %eax
je 0x75f2
cmpl $0x2, %eax
je 0x760d
cmpl $0x0, 0xc(%rbx)
jne 0x760d
testl %eax, %eax
je 0x75f2
movq (%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7760
jmp 0x7600
movq (%r14), %rdi
movq (%r15), %rsi
movq %rbx, %rdx
callq 0x76b0
testl %eax, %eax
je 0x7608
xorl %eax, %eax
jmp 0x760d
movl $0x2, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion2.c
// Function: need_to_field_split1
int	need_to_field_split1(char **str, t_expansion *exp)
{
	char *tmp;

	tmp = *str;
	if (exp->quoted || (exp->ifs && !ft_strlen(exp->ifs)))
		return (0);
	if (!exp->ifs)
	{
		if (!(*str = ft_strtrim(*str, " \t\n")))
		{
			free(tmp);
			return (2);
		}
		free(tmp);
		if (-1 != ft_stristr(*str, " \t\n"))
			return (1);
		return (0);
	}
	else
	{
		return (need_to_field_split2(str, exp));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpb $0x0, 0x8(%rsi)
je 0x762f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
je 0x764b
callq 0xa5c8
testq %rax, %rax
je 0x7622
cmpq $0x0, 0x10(%r15)
je 0x7667
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7704
movq (%rbx), %rdi
leaq 0x3de9(%rip), %rsi      # 0xb45a
callq 0xa670
movq %rax, %r15
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x2240
testq %r15, %r15
je 0x76a6
movq (%rbx), %rdi
leaq 0x3dc7(%rip), %rsi      # 0xb45a
callq 0xa968
xorl %ebp, %ebp
cmpl $-0x1, %eax
setne %bpl
jmp 0x7622
movl $0x2, %ebp
jmp 0x7622
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion2.c
// Function: param_exp_no_fsplit
int	param_exp_no_fsplit(t_list *token, char *var, t_expansion *exp)
{
	char **ptr_str;

	ptr_str = &((t_token*)token->content)->str;
	((t_token *)token->content)->protect_e = ft_strlen(var) + exp->start;
	if (!ft_strstradd(ptr_str, exp->start, var))
		return (0);
	exp->start += ft_strlen(var);
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r12
movq %rsi, %rdi
callq 0xa5c8
movl (%rbx), %esi
addl %esi, %eax
movq (%r15), %rcx
movl %eax, 0x1c(%rcx)
movq %r12, %rdi
movq %r14, %rdx
callq 0xab9c
testl %eax, %eax
je 0x76f6
movq %r14, %rdi
callq 0xa5c8
addl %eax, (%rbx)
movl $0x1, %eax
jmp 0x76f8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/parameter_expansion2.c
// Function: need_to_field_split2
int	need_to_field_split2(char **str, t_expansion *exp)
{
	char *tmp;

	tmp = *str;
	if (!(*str = ft_strtrim(*str, exp->ifs)))
	{
		free(tmp);
		return (2);
	}
	free(tmp);
	if (-1 != ft_stristr(*str, exp->ifs))
		return (1);
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x10(%rsi), %rsi
movq %r15, %rdi
callq 0xa670
movq %rax, %r12
movq %rax, (%r14)
movq %r15, %rdi
callq 0x2240
testq %r12, %r12
je 0x774c
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0xa968
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0x7751
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/field_splitting_root.c
// Function: field_splitting_root
int	field_splitting_root(t_list **token, char *var, t_expansion *exp)
{
	char *str1;
	char *str2;

	str1 = ((t_token*)(*token)->content)->str;
	if (!(str2 = ft_substr(str1, exp->start, ft_strlen(str1) + exp->start)))
		return (0);
	str1[exp->start] = '\0';
//	printf("before param expansion: (str1) = [%s]\n", str1);
//	printf("after param expansion: (str2)  = [%s]\n", str2);
	if (!field_splitting_root_assist(token, exp, var, str2))
	{
		free(str2);
		return (0);
	}
	free(str2);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %r12
movl (%rdx), %ebp
movq %r12, %rdi
callq 0xa5c8
movslq (%r14), %rdx
addq %rax, %rdx
movq %r12, %rdi
movl %ebp, %esi
callq 0xa774
testq %rax, %rax
je 0x77c6
movq %rax, %r13
movslq (%r14), %rax
movb $0x0, (%r12,%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x77d7
movl %eax, %ebx
movq %r13, %rdi
callq 0x2240
movl %ebx, %eax
jmp 0x77c8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/field_splitting_root.c
// Function: field_splitting_root_assist
int	field_splitting_root_assist(t_list **token, t_expansion *exp, char *var,\
		char *str2)
{
	char	**array;

	if (!exp->ifs)
	{
		if (!(array = ft_split_whitespaces(var, " \n\t")))
			return (0);
	}
	else if (!(array = ft_split_whitespaces(var, exp->ifs)))
		return (0);
	((t_token *)(*token)->content)->protect_e = exp->start + \
				ft_strlen(array[0]);
	//debug_array(array);
	if (!field_splitting(token, exp, array, str2))
	{
		ft_array_free(array, ft_array_len(array));
		return (0);
	}
	ft_array_free(array, ft_array_len(array));
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
jne 0x77f8
leaq 0x3c66(%rip), %rsi      # 0xb45e
movq %rdx, %rdi
callq 0xa1c4
testq %rax, %rax
je 0x7847
movq %rax, %r12
movl (%r14), %ebp
movq (%rax), %rdi
callq 0xa5c8
addl %ebp, %eax
movq (%r15), %rcx
movq (%rcx), %rcx
movl %eax, 0x1c(%rcx)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x7852
movl %eax, %ebx
movq %r12, %rdi
callq 0xa9b8
movq %r12, %rdi
movl %eax, %esi
callq 0xa924
movl %ebx, %eax
jmp 0x7849
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/field_splitting_root.c
// Function: field_splitting
int	field_splitting(t_list **tok, t_expansion *exp, char **array, char *str2)
{
	char	**str;
	int		i;

	i = 1;
	str = &((t_token*)(*tok)->content)->str;
	if (array[0] && !(*str = ft_strjoin_free(*str, array[0], 1)))
		return (0);
	while (array[i])
	{
		tok = &(*tok)->next;
		if (!(field_splitting_assist(tok, array[i])))
			return (0);
		i++;
	}
	str = &((t_token*)(*tok)->content)->str;
	exp->start = ft_strlen(*str);
	if (!(*str = ft_strjoin_free(*str, str2, 1)))
		return (0);
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x788c
movq (%r15), %rax
movq (%rax), %r13
movq (%r13), %rdi
movl $0x1, %edx
callq 0xa584
movq %rax, (%r13)
testq %rax, %rax
je 0x78eb
movq 0x8(%r12), %rsi
testq %rsi, %rsi
je 0x78ba
addq $0x10, %r12
movq (%r15), %r15
addq $0x8, %r15
movq %r15, %rdi
callq 0x78f7
testl %eax, %eax
je 0x78eb
movq (%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0x789a
movq (%r15), %rax
movq (%rax), %r15
movq (%r15), %rdi
callq 0xa5c8
movl %eax, (%r14)
movq (%r15), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa584
movq %rax, %rcx
movq %rax, (%r15)
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x78ed
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/field_splitting_root.c
// Function: field_splitting_assist
int	field_splitting_assist(t_list **tok, char *str)
{
	t_list	*new_link;
	t_token	*new_token;

	if (!(new_token = lexer_init_token()))
		return (0);
	if (!(new_token->str = ft_strdup(str)))
	{
		free(new_token);
		return (0);
	}
	new_token->id = TOKEN;
	new_token->unquote_protected = 1;
	new_token->protect_s = 0;
	new_token->protect_e = ft_strlen(new_token->str);
	if (!(new_link = ft_lstnew(new_token)))
	{
		del_token(new_token);
		return (0);
	}
	ft_lstadd_front(tok, new_link);
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
callq 0x27d6
xorl %ebx, %ebx
testq %rax, %rax
je 0x7971
movq %rax, %r15
movq %r12, %rdi
callq 0xa4b4
movq %rax, (%r15)
testq %rax, %rax
je 0x795f
movl $0x0, 0x8(%r15)
movq $0x1, 0x14(%r15)
movq %rax, %rdi
callq 0xa5c8
movl %eax, 0x1c(%r15)
movq %r15, %rdi
callq 0xa894
testq %rax, %rax
je 0x7969
movq %r14, %rdi
movq %rax, %rsi
callq 0xa810
movl $0x1, %ebx
jmp 0x7971
movq %r15, %rdi
callq 0x2240
jmp 0x7971
movq %r15, %rdi
callq 0x2789
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/pathname_expansion_root.c
// Function: pathname_expansion_root
int	pathname_expansion_root(t_list **tokens, int is_filename)
{
	int res;

	while (*tokens)
	{
		if (!pathname_is_expandable(((t_token*)(*tokens)->content)->str))
			quote_removal((t_token*)(*tokens)->content);
		else
		{
			if ((res = pathname_expansion(&tokens, is_filename)))
				return (res);
		}
		tokens = &((*tokens)->next);
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movq (%rdi), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x79dd
movl %esi, %ebp
movq %rsp, %r14
movq (%rax), %r15
movq (%r15), %rdi
callq 0x79ea
testl %eax, %eax
je 0x79b9
movq %r14, %rdi
movl %ebp, %esi
callq 0x7a77
testl %eax, %eax
je 0x79c1
jmp 0x79db
movq %r15, %rdi
callq 0x8ac8
movq (%rsp), %rax
movq (%rax), %rax
leaq 0x8(%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x799a
jmp 0x79dd
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/pathname_expansion_root.c
// Function: pathname_is_expandable
int	pathname_is_expandable(char *str)
{
	int quoted;
	int	escaped;
	int i;

	quoted = 0;
	escaped = 0;
	i = 0;
	while (str[i])
	{
		if (!escaped && str[i] == '\\')
		{
			i++;
			escaped = 1;
			continue;
		}
		if (!escaped && !quoted && (str[i] == '\"' || str[i] == '\''))
			quoted = str[i];
		else if (!escaped && quoted && str[i] == quoted)
			quoted = 0;
		else if (!escaped && !quoted && str[i] == '*')
			return (1);
		escaped = 0;
		i++;
	}
	return (0);
}

// Assembly:
movb (%rdi), %sil
testb %sil, %sil
je 0x7a6e
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpb $0x5c, %sil
je 0x7a03
movl %esi, %r8d
jmp 0x7a13
movslq %ecx, %rcx
movb 0x1(%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x7a6e
incq %rcx
cmpb $0x5c, %sil
sete %r10b
testl %edx, %edx
setne %r9b
orb %r10b, %r9b
jne 0x7a3c
cmpb $0x27, %r8b
je 0x7a36
movzbl %r8b, %r10d
cmpl $0x22, %r10d
jne 0x7a3c
movsbl %r8b, %edx
jmp 0x7a5e
cmpb $0x5c, %sil
je 0x7a51
testl %edx, %edx
je 0x7a51
movsbl %r8b, %esi
cmpl %esi, %edx
cmovel %eax, %edx
jmp 0x7a5e
testb %r9b, %r9b
jne 0x7a5e
xorl %edx, %edx
cmpb $0x2a, %r8b
je 0x7a71
movslq %ecx, %rcx
movb 0x1(%rdi,%rcx), %sil
incq %rcx
testb %sil, %sil
jne 0x79f8
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/pathname_expansion_root.c
// Function: pathname_expansion
int	pathname_expansion(t_list ***token, int is_filename)
{
	t_list		*path_parts;
	t_path_exp	tool;
	int res;

	if (!(path_parts = split_path_root(((t_token*)((**token)->content))->str)))
		return (2);
	init_path_expansion_struct(path_parts, &tool, is_filename);
	if ((res = pathname_matching_root(&tool, path_parts)))
	{
		ft_lstclear(&(tool.path_parts), delete_path_part_link);
		ft_lstclear(&(tool.matched_paths), del_token);
		return (res);
	}
	//debug_path_parts(tool.path_parts);
	ft_lstclear(&(tool.path_parts), delete_path_part_link);
	if (!tool.matched_paths)
		quote_removal((t_token*)(**token)->content);
	else
	{
		//debug_tokens_list(**token);
		word_expand_replace(token, tool.matched_paths);
		ft_lstclear(&(tool.path_parts), delete_path_part_link);
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x7e00
testq %rax, %rax
je 0x7ae9
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movl %ebp, 0x8(%r14)
movl $0x0, 0xc(%r14)
movq $0x0, 0x10(%r14)
movq %r14, %rdi
movq %rax, %rsi
callq 0x82b8
movl %eax, %ebp
leaq 0x638(%rip), %rsi       # 0x8102
movq %r14, %rdi
callq 0xa820
testl %ebp, %ebp
je 0x7af0
leaq 0x18(%rsp), %rdi
leaq -0x5359(%rip), %rsi     # 0x2789
callq 0xa820
jmp 0x7b25
movl $0x2, %ebp
jmp 0x7b25
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x7b15
movq %rbx, %rdi
callq 0x7228
leaq 0x5f9(%rip), %rsi       # 0x8102
leaq 0x8(%rsp), %rdi
callq 0xa820
jmp 0x7b23
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x8ac8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/tild_expansion_root.c
// Function: tild_expansion_root
int	tild_expansion_root(t_list *env, char **str)
{
	char	*home_env;
	int		start_assignement;
	int		index;

	index = 0;
	if (!(home_env = env_get("HOME", 4, env)))
		return (1);
	start_assignement = index_assignement_sign(*str);
	if (start_assignement == -1)
		return (tild_expand_try(str, home_env, &index));
	else
		return (expand_tild_in_assignement(str, home_env, start_assignement, \
				start_assignement));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rdx
movl $0x0, 0x4(%rsp)
leaq 0x361c(%rip), %rdi      # 0xb17d
movl $0x4, %esi
callq 0x339c
testq %rax, %rax
je 0x7b96
movq %rax, %r14
movq (%rbx), %rdi
callq 0x7bb5
cmpl $-0x1, %eax
je 0x7b9d
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %eax, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7ca4
movl $0x1, %eax
jmp 0x7bad
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7c02
addq $0x8, %rsp
popq %rbx
popq %r14
retq