LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_builtin
int		env_builtin(t_list *env, t_control *control)
{
	while (env)
	{
		ft_putstr_fd(((t_env *)env->content)->label, 1);
		ft_putstr_fd("=", 1);
		ft_putendl_fd(((t_env *)env->content)->value, 1);
		env = env->next;
	}
	control->exit_status = 0;
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x3276
movq %rdi, %r14
leaq 0x8bc2(%rip), %r15      # 0xbe01
movq (%r14), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x9e70
movq %r15, %rdi
movl $0x1, %esi
callq 0x9e70
movq (%r14), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x9dcc
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x323f
movl $0x0, 0x4(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_build_linked_list
t_list	*env_build_linked_list(char **env)
{
	t_list	*lst_head;
	t_list	*lst_link;
	t_env	*env_struct;
	int		i;

	i = 0;
	lst_head = NULL;
	while (env[i])
	{
		if (!(env_struct = env_build(env[i])))
		{
			ft_lstclear(&lst_head, env_del_struct);
			return (NULL);
		}
		if (!(lst_link = ft_lstnew(env_struct)))
		{
			env_del_struct(env_struct);
			ft_lstclear(&lst_head, env_del_struct);
			return (NULL);
		}
		ft_lstadd_back(&lst_head, lst_link);
		i++;
	}
	return (lst_head);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x32ff
addq $0x8, %rbx
leaq 0x8(%rsp), %r14
callq 0x330b
testq %rax, %rax
je 0x32ee
movq %rax, %r15
movq %rax, %rdi
callq 0xa7bc
testq %rax, %rax
je 0x32e6
movq %r14, %rdi
movq %rax, %rsi
callq 0xa70c
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x32ae
movq 0x8(%rsp), %rax
jmp 0x3301
movq %r15, %rdi
callq 0x338c
leaq 0x97(%rip), %rsi        # 0x338c
leaq 0x8(%rsp), %rdi
callq 0xa748
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_build
t_env	*env_build(char *str)
{
	int		i;
	t_env	*new;

	if ((i = ft_strichr(str, '=')) == -1)
		return (NULL);
	if (!(new = env_init_struct()))
		return (NULL);
	if (!(new->label = ft_substr(str, 0, i++)) ||
		!(new->value = ft_substr(str + i, 0, ft_strlen(str + i))))
	{
		env_del_struct(new);
		return (NULL);
	}
	return (new);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x3d, %esi
callq 0xa824
cmpl $-0x1, %eax
je 0x337c
movl %eax, %ebp
movl $0x18, %edi
callq 0xa944
testq %rax, %rax
je 0x337c
movq %rax, %rbx
movslq %ebp, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xa69c
movq %rax, (%rbx)
testq %rax, %rax
je 0x3374
addq %r15, %r14
incq %r14
movq %r14, %rdi
callq 0xa4f8
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xa69c
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x337e
movq %rbx, %rdi
callq 0x338c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_get
char	*env_get(char *str, size_t len, t_list *env)
{
	while (env)
	{
		if (((t_env*)env->content)->label)
		{
			if (ft_strlen(((t_env*)env->content)->label) == len \
					&& !ft_strncmp(str, ((t_env*)env->content)->label, len))
				return (((t_env*)env->content)->value);
		}
		env = env->next;
	}
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x3401
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x33f6
callq 0xa4f8
cmpq %r15, %rax
jne 0x33f6
movq (%r14), %rax
movq (%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0xa518
testl %eax, %eax
je 0x3405
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x33cc
jmp 0x340c
xorl %ebx, %ebx
jmp 0x340c
movq (%r14), %rax
movq 0x8(%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_get_addr
char	**env_get_addr(char *str, size_t len, t_list *env)
{
	while (env)
	{
		if (((t_env *)env->content)->label)
		{
			if (ft_strlen(((t_env *)env->content)->label) == len \
					&& !ft_strncmp(str, ((t_env *)env->content)->label, len))
				return (&((t_env *)env->content)->value);
		}
		env = env->next;
	}
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x3468
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x345d
callq 0xa4f8
cmpq %r15, %rax
jne 0x345d
movq (%r14), %rax
movq (%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0xa518
testl %eax, %eax
je 0x346c
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x3433
jmp 0x3473
xorl %ebx, %ebx
jmp 0x3473
movq (%r14), %rbx
addq $0x8, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_env.c
// Function: env_shlvl_update
int		env_shlvl_update(t_list **env, t_control *control)
{
	int		shlvl;
	char	*nbr;
	char	*argv[3];

	if (!(nbr = env_get("SHLVL", 5, *env)))
		nbr = "0";
	shlvl = ft_atoi(nbr) + 1;
	argv[0] = "export";
	argv[1] = NULL;
	argv[2] = NULL;
	if (!(nbr = ft_itoa(shlvl)) ||
		!(argv[1] = ft_strjoin_free("SHLVL=", nbr, 2)))
		return (0);
	export_builtin(env, argv, control);
	free(argv[1]);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdx
leaq 0x7c94(%rip), %rdi      # 0xb130
movl $0x5, %esi
callq 0x33b4
testq %rax, %rax
leaq 0x7e1f(%rip), %rdi      # 0xb2cf
cmovneq %rax, %rdi
callq 0x9afc
leal 0x1(%rax), %edi
leaq 0x7c73(%rip), %rax      # 0xb136
movq %rax, (%rsp)
movq $0x0, 0x10(%rsp)
callq 0x9c38
xorl %ebp, %ebp
testq %rax, %rax
je 0x3519
leaq 0x7c5a(%rip), %rdi      # 0xb13d
movq %rax, %rsi
movl $0x2, %edx
callq 0xa4b4
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3519
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x36e4
movq 0x8(%r15), %rdi
callq 0x2240
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_unset.c
// Function: unset_builtin
int		unset_builtin(t_list **env_head, char **argv, t_control *control)
{
	int i;

	i = 1;
	while (argv[i])
	{
		if (!is_identifier_valid(argv[i], "unset"))
			unset_in_env_list(env_head, argv[i]);
		else
			control->exit_status = 1;
		i++;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x357a
movq %rdx, %rbx
movq %rsi, %r14
addq $0x10, %r14
leaq 0x7bf7(%rip), %r12      # 0xb144
movq %r12, %rsi
callq 0x358b
testl %eax, %eax
je 0x3562
movl $0x1, 0x4(%rbx)
jmp 0x356e
movq -0x8(%r14), %rsi
movq %r15, %rdi
callq 0x35d0
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x354d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_unset.c
// Function: unset_in_env_list
void	unset_in_env_list(t_list **env_head, char *str)
{
	t_list **ptr;
	t_list *extra;

	ptr = env_head;
	while (*ptr)
	{
		if (!ft_strncmp(str, ((t_env*)((*ptr)->content))->label, \
					ft_strlen(str) + 1))
		{
			extra = *ptr;
			*ptr = (*ptr)->next;
			env_del_struct(extra->content);
			free(extra);
			return ;
		}
		ptr = &(*ptr)->next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x3617
movq %rsi, %rbx
movq %rdi, %r14
movq (%rcx), %rax
movq (%rax), %r15
movq %rbx, %rdi
callq 0xa4f8
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa518
movq (%r14), %r15
movq 0x8(%r15), %rcx
testl %eax, %eax
je 0x361d
addq $0x8, %r15
movq %r15, %r14
testq %rcx, %rcx
jne 0x35e3
popq %rbx
popq %r14
popq %r15
retq
movq %rcx, (%r14)
movq (%r15), %rdi
callq 0x338c
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2240
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_echo.c
// Function: echo_builtin
int	echo_builtin(char **argv, t_control *control)
{
	int i;
	int n_option;

	i = 1;
	while (argv[i] && argv[i][0] == '-' && ft_isonly(argv[i] + 1, 'n'))
		i++;
	n_option = (i == 1 ? 0 : 1);
	while (argv[i])
	{
		ft_putstr_fd(argv[i], 1);
		if (argv[++i])
			ft_putchar_fd(' ', 1);
	}
	if (!n_option)
		ft_putchar_fd('\n', 1);
	control->exit_status = 0;
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3677
movl $0x1, %r15d
cmpb $0x2d, (%rdi)
jne 0x367d
incq %rdi
movl $0x6e, %esi
callq 0x9bc8
testl %eax, %eax
je 0x367d
movq 0x8(%r14,%r15,8), %rdi
incq %r15
testq %rdi, %rdi
jne 0x3652
jmp 0x367d
movl $0x1, %r15d
movl %r15d, %r15d
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0x36bc
leaq (%r14,%r15,8), %r14
addq $0x8, %r14
movl $0x1, %esi
callq 0x9e70
cmpq $0x0, (%r14)
je 0x36bc
movl $0x20, %edi
movl $0x1, %esi
callq 0x9db0
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x3691
cmpl $0x1, %r15d
jne 0x36d1
movl $0xa, %edi
movl $0x1, %esi
callq 0x9db0
movl $0x0, 0x4(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_export.c
// Function: export_builtin
int		export_builtin(t_list **head, char **argv, t_control *control)
{
	if (argv[1] == NULL)
		export_builtin_no_arg(head, control);
	else if (!export_builtin2(head, argv, control))
	{
		control->quit = 1;
		control->exit_status = errno;
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x3713
movq %rbx, %rdx
callq 0x3722
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x3720
orb $0x1, (%rbx)
callq 0x2040
movl (%rax), %eax
movl %eax, 0x4(%rbx)
xorl %eax, %eax
jmp 0x3720
movq %rbx, %rsi
callq 0x38a8
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_export.c
// Function: export_builtin2
int		export_builtin2(t_list **head, char **argv, t_control *control)
{
	int		i;
	char	**str_addr;
	char	*sep2;

	i = 1;
	control->exit_status = 0;
	while (argv[i])
	{
		if (!(sep2 = export_builtin_check_label(argv[i], control)))
		{
			i++;
			continue;
		}
		if ((str_addr = env_get_addr(argv[i], ft_strlen(argv[i]), *head)))
		{
			ft_free((void **)str_addr);
			if (!(*str_addr = ft_strdup(sep2)))
				return (0);
		}
		else if (!export_builtin_new_env(argv[i], sep2, head))
			return (0);
		i++;
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movl $0x0, 0x4(%rdx)
movq 0x8(%rsi), %rdi
movl $0x1, %ebx
testq %rdi, %rdi
je 0x37bf
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %r15
movq %r14, %rsi
callq 0x37d0
testq %rax, %rax
je 0x37ae
movq %rax, %r13
movq (%r15), %rbp
movq %rbp, %rdi
callq 0xa4f8
movq (%r12), %rdx
movq %rbp, %rdi
movq %rax, %rsi
callq 0x341b
testq %rax, %rax
je 0x379c
movq %rax, %rbp
movq %rax, %rdi
callq 0xa9c0
movq %r13, %rdi
callq 0xa3e4
movq %rax, (%rbp)
testq %rax, %rax
jne 0x37ae
jmp 0x37bd
movq (%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x381c
testl %eax, %eax
je 0x37bd
movq 0x8(%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x374f
jmp 0x37bf
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_export.c
// Function: export_builtin_check_label
char	*export_builtin_check_label(char *str, t_control *control)
{
	int i;

	if (is_identifier_valid(str, "export"))
	{
		control->exit_status = 1;
		return (NULL);
	}
	if ((i = ft_strichr(str, '=')) == -1)
		return (NULL);
	str[i] = '\0';
	return (str + i + 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7955(%rip), %rsi      # 0xb136
callq 0x358b
testl %eax, %eax
je 0x37f6
movl $0x1, 0x4(%r14)
xorl %eax, %eax
jmp 0x3814
movq %rbx, %rdi
movl $0x3d, %esi
callq 0xa824
cmpl $-0x1, %eax
je 0x37f2
cltq
addq %rbx, %rax
incq %rax
movb $0x0, -0x1(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_export.c
// Function: export_builtin_new_env
int		export_builtin_new_env(char *str, char *str2, t_list **head)
{
	t_env	*env;
	t_list	*new_link;

	if (!(env = ft_memalloc(sizeof(t_env))))
		return (0);
	if (!(env->label = ft_strdup(str)))
	{
		free(env);
		return (0);
	}
	if (!(env->value = ft_strdup(str2)))
	{
		free(env->label);
		free(env);
		return (0);
	}
	if (!(new_link = ft_lstnew(env)))
	{
		env_del_struct(env);
		return (0);
	}
	ft_lstadd_back(head, new_link);
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x18, %edi
callq 0xa944
xorl %ebx, %ebx
testq %rax, %rax
je 0x3892
movq %rax, %r14
movq %r13, %rdi
callq 0xa3e4
movq %rax, (%r14)
testq %rax, %rax
je 0x388a
movq %r12, %rdi
callq 0xa3e4
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3882
movq %r14, %rdi
callq 0xa7bc
testq %rax, %rax
je 0x389e
movq %r15, %rdi
movq %rax, %rsi
callq 0xa70c
movl $0x1, %ebx
jmp 0x3892
movq (%r14), %rdi
callq 0x2240
movq %r14, %rdi
callq 0x2240
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x338c
jmp 0x3892
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_export2.c
// Function: export_builtin_no_arg
void		export_builtin_no_arg(t_list **head, t_control *control)
{
	const t_list	*env = *head;
	t_env			*tmp;
	t_env			*sort;
	int				list_size;

	control->exit_status = 0;
	list_size = ft_lstsize(*head);
	while (list_size--)
	{
		env = *head;
		sort = NULL;
		while (env)
		{
			tmp = env->content;
			if (tmp->tmpdeclare == 0 && alpha_cmp(tmp, sort) < 0)
				sort = tmp;
			env = env->next;
		}
		if (sort && sort->tmpdeclare == 0)
		{
			export_no_arg_display(sort);
			sort->tmpdeclare = 1;
		}
	}
	export_builtin_no_arg_end(*head);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x4(%rsi)
movq (%rdi), %rdi
callq 0xa7dc
testl %eax, %eax
je 0x3976
movl %eax, %ebp
leaq 0x7ee2(%rip), %r12      # 0xb7b8
movq (%rbx), %r14
testq %r14, %r14
je 0x396e
xorl %r15d, %r15d
movq (%r14), %r13
cmpl $0x0, 0x10(%r13)
jne 0x3907
testq %r15, %r15
je 0x3904
movq (%r13), %rdi
movq (%r15), %rsi
callq 0xa994
testl %eax, %eax
jns 0x3907
movq %r13, %r15
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x38e5
testq %r15, %r15
je 0x396e
cmpl $0x0, 0x10(%r15)
jne 0x396e
leaq 0x784b(%rip), %rdi      # 0xb16e
movl $0x1, %esi
callq 0x9e70
movq (%r15), %rdi
movl $0x1, %esi
callq 0x9e70
leaq 0x7839(%rip), %rdi      # 0xb17a
movl $0x1, %esi
callq 0x9e70
movq 0x8(%r15), %rdi
movl $0x1, %esi
callq 0x9e70
movq %r12, %rdi
movl $0x1, %esi
callq 0x9dcc
movl $0x1, 0x10(%r15)
decl %ebp
jne 0x38d6
movq (%rbx), %rax
testq %rax, %rax
je 0x398e
movq (%rax), %rcx
movl $0x0, 0x10(%rcx)
movq 0x8(%rax), %rax
jmp 0x3979
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_cd.c
// Function: cd_builtin
int		cd_builtin(t_list *env, char **argv, t_control *control)
{
	int ret;

	if (!argv[1] || !ft_strcmp("~", argv[1]))
		ret = cd_special("HOME", env, control);
	else if (!ft_strcmp("-", argv[1]))
	{
		if ((ret = cd_special("OLDPWD", env, control)) == 1)
			ft_putendl_fd(control->cwd, STDOUT_FILENO);
	}
	else
		ret = ft_chdir(argv[1], env, control);
	if (ret == 0)
		control->quit = 1;
	else if (errno)
		ft_perror(argv[0], argv[1], strerror(errno));
	control->exit_status = (ret == 1 ? 0 : 1);
	return (ret == 0 ? 0 : 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0x39ef
leaq 0x7929(%rip), %rdi      # 0xb2ea
callq 0xa994
testl %eax, %eax
je 0x39ef
movq 0x8(%r14), %rsi
leaq 0x7bd3(%rip), %rdi      # 0xb5a8
callq 0xa994
testl %eax, %eax
je 0x3a53
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3adb
jmp 0x3a01
leaq 0x7787(%rip), %rdi      # 0xb17d
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3a81
movl %eax, %ebp
testl %ebp, %ebp
je 0x3a34
callq 0x2040
movl (%rax), %edi
movl $0x1, %r15d
testl %edi, %edi
je 0x3a3c
movq (%r14), %r12
movq 0x8(%r14), %r14
callq 0x2220
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2511
jmp 0x3a3c
orb $0x1, (%rbx)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %eax, %eax
cmpl $0x1, %ebp
setne %al
movl %eax, 0x4(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7728(%rip), %rdi      # 0xb182
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3a81
movl %eax, %ebp
cmpl $0x1, %eax
jne 0x3a03
movq 0x78(%rbx), %rdi
movl $0x1, %ebp
movl $0x1, %esi
callq 0x9dcc
jmp 0x3a07
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_cd.c
// Function: ft_chdir
int		ft_chdir(char *target_dir, t_list *env, t_control *control)
{
	char	**oldpwd;
	char	**pwd_env;

	pwd_env = env_get_addr("PWD", 3, env);
	oldpwd = env_get_addr("OLDPWD", 6, env);
	if (chdir(target_dir) == -1)
		return (-1);
	if (oldpwd)
	{
		free(*oldpwd);
		if (!(*oldpwd = ft_strdup(control->cwd)))
			return (0);
	}
	if (!(ft_getcwd(&control->cwd)))
		return (0);
	if (pwd_env && ft_getcwd(pwd_env) == 0)
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x7692(%rip), %rdi      # 0xb185
movl $0x3, %esi
movq %r15, %rdx
callq 0x341b
movq %rax, %rbx
leaq 0x7678(%rip), %rdi      # 0xb182
movl $0x6, %esi
movq %r15, %rdx
callq 0x341b
movq %rax, %r15
movq %r12, %rdi
callq 0x20a0
cmpl $-0x1, %eax
je 0x3b6f
testq %r15, %r15
je 0x3b45
movq (%r15), %rdi
callq 0x2240
movq 0x78(%r14), %rdi
callq 0xa3e4
movq %rax, (%r15)
testq %rax, %rax
je 0x3b76
addq $0x78, %r14
movq %r14, %rdi
callq 0x3ca7
xorl %ebp, %ebp
testl %eax, %eax
je 0x3b78
testq %rbx, %rbx
je 0x3b68
movq %rbx, %rdi
callq 0x3ca7
testl %eax, %eax
je 0x3b78
movl $0x1, %ebp
jmp 0x3b78
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b78
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_cd_utils.c
// Function: ft_ls
void	ft_ls(char *directory, int showdot)
{
	struct dirent	*reader;
	DIR				*dir;
	int				i;

	i = 1;
	if (!(dir = opendir(directory)))
	{
		printf("Couldn't read this directory (%s)\n", directory);
		return ;
	}
	while ((reader = readdir(dir)) != NULL)
	{
		if (!(showdot == 0 && reader->d_name[0] == '.'))
		{
			ft_putstr_fd("\033[0;93m", 1);
			ft_putstr_fd(reader->d_name, 1);
			ft_putstr_fd("\033[0m", 1);
			ft_putstr_fd((i++ % 3 != 0 ? "     \t\t" : "\n"), 1);
		}
	}
	ft_putstr_fd(((i - 1) % 3 == 0 ? "" : "\n"), 1);
	closedir(dir);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
callq 0x2080
testq %rax, %rax
je 0x3c5e
movq %rax, %rbx
movq %rax, %rdi
callq 0x2180
testq %rax, %rax
je 0x3c7d
movq %rax, %r13
movl $0x1, %r15d
leaq 0x7896(%rip), %r14      # 0xb45c
leaq 0x7607(%rip), %r12      # 0xb1d4
testl %ebp, %ebp
jne 0x3bd8
cmpb $0x2e, 0x13(%r13)
je 0x3c30
leaq 0x75ed(%rip), %rdi      # 0xb1cc
movl $0x1, %esi
callq 0x9e70
addq $0x13, %r13
movq %r13, %rdi
movl $0x1, %esi
callq 0x9e70
leaq 0x8049(%rip), %rdi      # 0xbc4a
movl $0x1, %esi
callq 0x9e70
imull $0xaaaaaaab, %r15d, %eax # imm = 0xAAAAAAAB
incl %r15d
addl $0x2aaaaaaa, %eax       # imm = 0x2AAAAAAA
cmpl $0x55555555, %eax       # imm = 0x55555555
movq %r12, %rdi
cmovbq %r14, %rdi
movl $0x1, %esi
callq 0x9e70
movq %rbx, %rdi
callq 0x2180
movq %rax, %r13
testq %rax, %rax
jne 0x3bcd
imull $0xaaaaaaab, %r15d, %eax # imm = 0xAAAAAAAB
addl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x55555555, %eax       # imm = 0x55555555
leaq 0x7583(%rip), %rax      # 0xb1db
cmovbq %rax, %r14
jmp 0x3c84
leaq 0x7544(%rip), %rdi      # 0xb1a9
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
leaq 0x7557(%rip), %r14      # 0xb1db
movq %r14, %rdi
movl $0x1, %esi
callq 0x9e70
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_cd_utils.c
// Function: ft_getcwd
int		ft_getcwd(char **target)
{
	if (!(getcwd(*target, ft_strlen(*target))))
	{
		errno = 0;
		ft_free((void **)target);
		if (!(*target = getcwd(NULL, 0)))
			return (0);
	}
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
callq 0xa4f8
movq %r14, %rdi
movq %rax, %rsi
callq 0x2100
testq %rax, %rax
jne 0x3cf0
callq 0x2040
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0xa9c0
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
callq 0x2100
movq %rax, (%rbx)
testq %rax, %rax
je 0x3cf6
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/builtin_exit.c
// Function: exit_builtin
int		exit_builtin(char **argv, t_control *control)
{
	int has_sign;

	control->quit = 1;
	if (control->parent_pid == getpid())
		ft_putendl_fd("exit", 2);
	if (!argv || !argv[1])
		return (1);
	has_sign = (argv[1][0] == '-' || argv[1][0] == '+' ? 1 : 0);
	if (!ft_isonly_ft(argv[1] + has_sign, ft_isdigit, 1))
	{
		ft_perror("exit", argv[1], "numeric argument required");
		control->exit_status = (IS_APPLE ? 255 : 2);
	}
	else if (ft_array_len(argv) >= 3)
	{
		ft_perror("exit", NULL, "too many arguments");
		control->quit = 0;
		control->exit_status = 1;
	}
	else
		control->exit_status = (unsigned char)ft_atoi(argv[1]);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
orb $0x1, (%rsi)
movl 0x8(%rsi), %ebp
callq 0x2070
cmpl %eax, %ebp
jne 0x3d4e
leaq 0x7498(%rip), %rdi      # 0xb1dc
movl $0x2, %esi
callq 0x9dcc
testq %r14, %r14
je 0x3dda
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3dda
movb (%rdi), %al
addb $-0x2b, %al
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %rdi
leaq 0x5e3d(%rip), %rsi      # 0x9bb0
movl $0x1, %edx
callq 0x9bf8
testl %eax, %eax
je 0x3dad
movq %r14, %rdi
callq 0xa8e0
cmpl $0x3, %eax
jl 0x3dcb
leaq 0x7447(%rip), %rdi      # 0xb1dc
leaq 0x745f(%rip), %rdx      # 0xb1fb
xorl %esi, %esi
callq 0x2511
andb $-0x2, (%rbx)
movl $0x1, %eax
jmp 0x3dd7
movq 0x8(%r14), %rsi
leaq 0x7424(%rip), %rdi      # 0xb1dc
leaq 0x7422(%rip), %rdx      # 0xb1e1
callq 0x2511
movl $0x2, %eax
jmp 0x3dd7
movq 0x8(%r14), %rdi
callq 0x9afc
movzbl %al, %eax
movl %eax, 0x4(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/input_root.c
// Function: input_root
t_list	*input_root(t_control *control)
{
	t_list *tokens_lst;

	control->ctrl_c = 0;
	control->term->prompt_ps1 = 1;
	if (!reset_prompts(control->env, control->term))
	{
		control->quit = 1;
		return (NULL);
	}
	if (!history_add_new_link(control))
	{
		control->quit = 1;
		return (NULL);
	}
	tokens_lst = input_root_assist_and_prompt(control);
	return (tokens_lst);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andb $-0x3, (%rdi)
movq 0x18(%rdi), %rsi
movl $0x1, 0x30(%rsi)
movq 0x20(%rdi), %rdi
callq 0x4010
testl %eax, %eax
je 0x3e18
movq %rbx, %rdi
callq 0x59e3
testl %eax, %eax
je 0x3e18
movq %rbx, %rdi
popq %rbx
jmp 0x3e1f
orb $0x1, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/input_root.c
// Function: input_root_assist_and_prompt
t_list	*input_root_assist_and_prompt(t_control *control)
{
	t_list *tokens_lst;

	tokens_lst = NULL;
	while (!tokens_lst && !control->quit && !control->ctrl_c \
			&& !control->lexer_end.unexpected)
	{
		if (!terminfo_load_win_size(control->term) && (control->quit = 1))
			break ;
		control->term->clipboard.highlight = 0;
		if (control->term->prompt_ps1)
			ft_putstr_fd(control->term->ps1, 2);
		else
			ft_putstr_fd(control->term->ps2, 2);
		if (!input_reset_term_struct(control))
			return (NULL);
		tokens_lst = input_reading_and_lexing(control);
		control->term->prompt_ps1 = 0;
		ft_free((void **)&(control->term->line));
	}
	if (control->lexer_end.unexpected)
		input_synthax_error(control, control->lexer_end.unexpected);
//	debug_tokens_list(tokens_lst);
	//ft_lstclear(&tokens_lst, del_token);
	return (tokens_lst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
testb $0x3, (%r14)
jne 0x3e9e
movl 0x2c(%r14), %esi
testl %esi, %esi
jne 0x3ea6
movq 0x18(%r14), %rdi
callq 0x4317
testl %eax, %eax
je 0x3e98
movq 0x18(%r14), %rax
movl $0x0, 0x60(%rax)
xorl %ecx, %ecx
cmpl $0x0, 0x30(%rax)
sete %cl
movq 0x38(%rax,%rcx,8), %rdi
movl $0x2, %esi
callq 0x9e70
movq %r14, %rdi
callq 0x3eb7
testl %eax, %eax
je 0x3eae
movq %r14, %rdi
callq 0x3f07
movq %rax, %r15
movq 0x18(%r14), %rdi
movl $0x0, 0x30(%rdi)
callq 0xa9c0
testq %r15, %r15
je 0x3e29
movq %r15, %rbx
jmp 0x3e9e
orb $0x1, (%r14)
xorl %ebx, %ebx
movl 0x2c(%r14), %esi
testl %esi, %esi
je 0x3eae
movq %r14, %rdi
callq 0x3f6a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/input_root.c
// Function: input_reset_term_struct
int		input_reset_term_struct(t_control *control)
{
	if (!terminfo_cursor_get_pos(control, &(control->term->cursor_start)))
		return (0);
	control->term->cursor = control->term->cursor_start;
	control->term->prompt_len = control->term->cursor.x;
	control->term->inline_position = -1;
	control->term->line_len = 0;
	control->term->current_history_link = control->history->head;
	return (1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rsi
addq $0x20, %rsi
callq 0x4570
testl %eax, %eax
je 0x3f03
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rbx), %rax
movl 0x10(%rax), %ecx
movl %ecx, 0x48(%rax)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0x8(%rax)
movq 0x10(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x58(%rax)
movl $0x1, %eax
jmp 0x3f05
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/input_root.c
// Function: input_reading_and_lexing
t_list	*input_reading_and_lexing(t_control *control)
{
	t_list *token_lst;

	token_lst = NULL;
	read_root(control, 0, 0);
	if (!terminfo_clipboard_disable_highlight(control))
		return (NULL);
	if (!terminfo_cursor_move_endl(control, 0))
		return (NULL);
	ft_putchar_fd('\n', 1);
	if (control->quit)
		return (NULL);
	if (!history_root(control, control->history))
		return (NULL);
	//printf("\n\033[38;5;27mENTERING LEXER WITH: [\033[0m%s\033[38;5;27m]\033[0m\n\n", control->history->head->content);
	token_lst = lexer_root((char *)(control->history->head->content), control);
	return (token_lst);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x5518
movq %rbx, %rdi
callq 0x5201
testl %eax, %eax
je 0x3f66
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a4f
testl %eax, %eax
je 0x3f66
movl $0xa, %edi
movl $0x1, %esi
callq 0x9db0
testb $0x1, (%rbx)
jne 0x3f66
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
callq 0x595c
testl %eax, %eax
je 0x3f66
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x2648
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/input_root.c
// Function: input_synthax_error
void	input_synthax_error(t_control *control, unsigned int unexpected)
{
	ft_putstr_fd("minishell: synthax error near unexpected token `", 2);
	if (unexpected == SEMI)
		ft_putchar_fd(';', 2);
	else if (unexpected == PIPE)
		ft_putchar_fd('|', 2);
	else if (unexpected == OR_IF)
		ft_putstr_fd("||", 2);
	else if (unexpected == AND)
		ft_putchar_fd('&', 2);
	else if (unexpected == AND_IF)
		ft_putstr_fd("&&", 2);
	else if (unexpected == LBRACE)
		ft_putchar_fd('(', 2);
	else if (unexpected == RBRACE)
		ft_putchar_fd(')', 2);
	else if (unexpected == LESS || unexpected == DLESS || unexpected == GREAT \
			|| unexpected == DGREAT)
		ft_putstr_fd("newline", 2);
	ft_putstr_fd("'\n", 2);
	control->lexer_end.unexpected = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x72c9(%rip), %rdi      # 0xb244
movl $0x2, %esi
callq 0x9e70
decl %r14d
cmpl $0xc, %r14d
ja 0x3fee
leaq 0x727b(%rip), %rax      # 0xb210
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x72d6(%rip), %rdi      # 0xb27b
jmp 0x3fcc
leaq 0x72ca(%rip), %rdi      # 0xb278
jmp 0x3fcc
movl $0x28, %edi
jmp 0x3fe4
movl $0x26, %edi
jmp 0x3fe4
movl $0x3b, %edi
jmp 0x3fe4
leaq 0x72a9(%rip), %rdi      # 0xb275
movl $0x2, %esi
callq 0x9e70
jmp 0x3fee
movl $0x7c, %edi
jmp 0x3fe4
movl $0x29, %edi
movl $0x2, %esi
callq 0x9db0
leaq 0x728e(%rip), %rdi      # 0xb283
movl $0x2, %esi
callq 0x9e70
movl $0x0, 0x2c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/reset_prompts.c
// Function: reset_prompts
int	reset_prompts(t_list *env, t_term *term)
{
	char	**ps1;
	char	**ps2;

	ps2 = env_get_addr("PS2", 3, env);
	ps1 = env_get_addr("PS1", 3, env);
	if (!reset_prompt(ps1, &term->ps1))
		return (0);
	return (reset_prompt(ps2, &term->ps2));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x7264(%rip), %rdi      # 0xb286
movl $0x3, %esi
movq %r15, %rdx
callq 0x341b
movq %rax, %r14
leaq 0x7251(%rip), %rdi      # 0xb28a
movl $0x3, %esi
movq %r15, %rdx
callq 0x341b
leaq 0x38(%rbx), %rsi
movq %rax, %rdi
callq 0x4072
testl %eax, %eax
je 0x406a
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4072
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/reset_prompts.c
// Function: reset_prompt
int	reset_prompt(char **ref_from_env, char **term_ps)
{
	if (!ref_from_env || !*ref_from_env)
	{
		if (!*term_ps || !ft_strlen(*term_ps))
		{
			ft_free((void **)term_ps);
			if (!(*term_ps = ft_strdup("")))
				return (0);
		}
	}
	else if (!*term_ps || ft_strcmp(*ref_from_env, *term_ps))
	{
		ft_free((void **)term_ps);
		if (!(*term_ps = ft_strdup(*ref_from_env)))
			return (0);
	}
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x40a7
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x40a7
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x409a
callq 0xa994
testl %eax, %eax
je 0x40d5
movq %rbx, %rdi
callq 0xa9c0
movq (%r14), %rdi
jmp 0x40c8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x40b9
callq 0xa4f8
testq %rax, %rax
jne 0x40d5
movq %rbx, %rdi
callq 0xa9c0
leaq 0x7113(%rip), %rdi      # 0xb1db
callq 0xa3e4
movq %rax, (%rbx)
testq %rax, %rax
je 0x40dc
movl $0x1, %eax
jmp 0x40de
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/termios_utils.c
// Function: termios_reset_cooked_mode
int	termios_reset_cooked_mode(t_control *control, struct termios *saved_copy)
{
	struct termios new;

	if (tcgetattr(STDIN_FILENO, &new) == -1)
	{
		control->quit = 1;
		control->exit_status = 1;
		ft_perror("tcgetattr can't get", NULL, strerror(errno));
		return (0);
	}
	if (!ft_memcmp(saved_copy, &new, sizeof(struct termios)))
		return (1);
	if (tcsetattr(STDIN_FILENO, TCSAFLUSH, saved_copy) == -1)
	{
		control->quit = 1;
		control->exit_status = 1;
		ft_perror("tcsetattr can't reset", NULL, strerror(errno));
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0x21d0
cmpl $-0x1, %eax
je 0x4206
leaq 0x4(%rsp), %rsi
movl $0x3c, %edx
movq %r14, %rdi
callq 0x9d18
movl $0x1, %ebp
testl %eax, %eax
je 0x4232
xorl %edi, %edi
movl $0x2, %esi
movq %r14, %rdx
callq 0x21e0
cmpl $-0x1, %eax
jne 0x4232
leaq 0x70b2(%rip), %r14      # 0xb2b6
jmp 0x420d
leaq 0x7081(%rip), %r14      # 0xb28e
orb $0x1, (%rbx)
movl $0x1, 0x4(%rbx)
callq 0x2040
movl (%rax), %edi
callq 0x2220
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2511
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_utils.c
// Function: terminfo_init_database
t_term	*terminfo_init_database(void)
{
	int		res;
	t_term	*term;

	res = setupterm(NULL, STDOUT_FILENO, NULL);
	if (res == ERR)
		return (NULL); //note: ERR is defined to 1 in the library. {mli norm 🤔}
	if (!(term = terminfo_init_struct()))
		return (NULL);
	if (!terminfo_load_win_size(term))
		return (terminfo_free_struct(term));
	if (!terminfo_load_array_esc_seq(term))
		return (terminfo_free_struct(term));
	return (term);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x21a0
cmpl $-0x1, %eax
je 0x42ce
movl $0x78, %edi
callq 0x2190
testq %rax, %rax
je 0x42cc
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movups %xmm0, 0x38(%rbx)
movl $0x0, 0x48(%rbx)
movups %xmm0, 0x50(%rbx)
movl $0x1, 0x30(%rbx)
movq %rsp, %r14
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x20f0
movzwl (%r14), %eax
movl %eax, 0x2c(%rbx)
movzwl 0x2(%r14), %eax
movl %eax, 0x28(%rbx)
movq %rbx, %rdi
callq 0x43cc
testl %eax, %eax
jne 0x42ce
movq %rbx, %rdi
callq 0x434e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_utils.c
// Function: terminfo_free_struct
void	*terminfo_free_struct(t_term *term)
{
	free(term->line);
	free(term->ps1);
	free(term->ps2);
	ft_array_free(term->array_esc_seq, \
			ft_array_len(term->array_esc_seq));
	ft_free((void **)&term->clipboard.paste_me);
	free(term);
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2240
movq 0x38(%rbx), %rdi
callq 0x2240
movq 0x40(%rbx), %rdi
callq 0x2240
movq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0xa8e0
movq %r14, %rdi
movl %eax, %esi
callq 0xa84c
leaq 0x70(%rbx), %rdi
callq 0xa9c0
movq %rbx, %rdi
callq 0x2240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_load_array_esc_seq
int		terminfo_load_array_esc_seq(t_term *term)
{
	char	**array;
	int		i;

	array = (char *[]){KEY_ESC_, KEY_UP_, KEY_RIGHT_,
		KEY_LEFT_, KEY_DOWN_, KEY_HOME_, KEY_DELETE_, KEY_END_, KEY_PAGE_UP_,
		KEY_PAGE_DOWN_, KEY_UP_CTRL_, KEY_DOWN_CTRL_, KEY_RIGHT_CTRL_,
		KEY_LEFT_CTRL_, NULL};
	i = 0;
	if (!(term->array_esc_seq = (char **)malloc(sizeof(char *) * (1 + \
						NUMBER_SPECIAL_KEYS))))
		return (0);
	term->array_esc_seq[NUMBER_SPECIAL_KEYS] = NULL;
	while (i < NUMBER_SPECIAL_KEYS)
	{
		if (!(term->array_esc_seq[i] = ft_strdup((char *)array[i])))
		{
			ft_array_free(term->array_esc_seq, i);
			return (0);
		}
		i++;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x78, %edi
callq 0x2190
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x442e
movq $0x0, 0x70(%rax)
leaq 0xd7ea(%rip), %r15      # 0x11be0
xorl %r14d, %r14d
movq (%r15), %rdi
callq 0xa3e4
movq 0x50(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
testq %rax, %rax
je 0x4422
incq %r14
addq $0x8, %r15
cmpq $0xe, %r14
jne 0x43f9
movl $0x1, %eax
jmp 0x4430
movq 0x50(%rbx), %rdi
movl %r14d, %esi
callq 0xa84c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_refresh_screen_from_start
int		terminfo_refresh_screen_from_start(t_control *control)
{
	char *caps;

	control->term->cursor_saved = control->term->cursor;
	if (!terminfo_update_bottom_screen_and_cursor(control))
		return (0);
	if (!terminfo_cursor_move(control, 0, control->term->cursor_start.y))
		return (0);
	if (!(caps = terminfo_get_caps("ed", control)))
		return (0);
	tputs(caps, 1, ft_putchar);
	if (control->term->prompt_ps1)
		ft_putstr_fd(control->term->ps1, 2);
	else
		ft_putstr_fd(control->term->ps2, 2);
	ft_putstr_fd(control->term->line, 1);
	if (!(terminfo_cursor_saved_reset(control)))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rax)
callq 0x44fd
testl %eax, %eax
je 0x44f2
movq 0x18(%rbx), %rax
movl 0x24(%rax), %edx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4879
testl %eax, %eax
je 0x44f4
leaq 0x6d63(%rip), %rdi      # 0xb1f8
callq 0x21f0
testq %rax, %rax
je 0x44f4
leaq 0x64ca(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x30(%rax)
sete %cl
movq 0x38(%rax,%rcx,8), %rdi
movl $0x2, %esi
callq 0x9e70
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x9e70
movq %rbx, %rdi
callq 0x464f
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x44f4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_update_bottom_screen_and_cursor
int		terminfo_update_bottom_screen_and_cursor(t_control *control)
{
	t_int_pair	cursor_end;
	char		*caps;

	cursor_end = terminfo_cursor_get_endl(control);
	if (!(caps = terminfo_get_caps("ind", control)))
		return (0);
	while (cursor_end.y >= control->term->size_window.y)
	{
		cursor_end.y--;
		control->term->cursor_start.y--;
		tputs(caps, 1, ft_putchar);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x4676
movq %rax, %r14
leaq 0x6dff(%rip), %rdi      # 0xb316
callq 0x21f0
testq %rax, %rax
je 0x4563
movq %rax, %r15
shrq $0x20, %r14
movq 0x18(%rbx), %rax
movl $0x1, %ebp
cmpl %r14d, 0x2c(%rax)
jg 0x4565
incl %r14d
leaq 0x642f(%rip), %r12      # 0xa970
decl 0x24(%rax)
movq %r15, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x2030
movq 0x18(%rbx), %rax
decl %r14d
cmpl 0x2c(%rax), %r14d
jg 0x4541
jmp 0x4565
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_get_pos_assist
void		terminfo_cursor_get_pos_assist(char *caps, t_int_pair *cursor)
{
	int		first_coord;
	char	c;

	first_coord = 1;
	cursor->x = 0;
	cursor->y = 0;
	tputs(caps, 1, ft_putchar);
	while (read(STDIN_FILENO, &c, 1) == 1)
	{
		if (c == '\033' || c == '[')
			continue;
		if (first_coord && ft_isdigit(c))
		{
			cursor->y *= 10;
			cursor->y += c - 48;
			continue;
		}
		first_coord = 0;
		if (ft_isdigit(c))
		{
			cursor->x *= 10;
			cursor->x += c - 48;
		}
		if (c == 'R')
			break ;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq $0x0, (%rsi)
leaq 0x63aa(%rip), %rdx      # 0xa970
movl $0x1, %esi
callq 0x2030
xorl %ebp, %ebp
leaq 0x7(%rsp), %r14
movl $0x1, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x2140
cmpq $0x1, %rax
jne 0x4644
movsbl 0x7(%rsp), %r15d
movl %r15d, %eax
andb $-0x41, %al
cmpb $0x1b, %al
je 0x45d7
testb $0x1, %bpl
jne 0x4621
movl %r15d, %edi
callq 0x9bb0
testl %eax, %eax
je 0x4621
movl 0x4(%rbx), %eax
leal (%rax,%rax,4), %eax
leal (%r15,%rax,2), %eax
addl $-0x30, %eax
movl %eax, 0x4(%rbx)
xorl %ebp, %ebp
jmp 0x45d7
movl %r15d, %edi
callq 0x9bb0
testl %eax, %eax
je 0x463b
movl (%rbx), %eax
leal (%rax,%rax,4), %eax
leal (%r15,%rax,2), %eax
addl $-0x30, %eax
movl %eax, (%rbx)
movb $0x1, %bpl
cmpb $0x52, %r15b
jne 0x45d7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_saved_reset
int			terminfo_cursor_saved_reset(t_control *control)
{
	control->term->cursor = control->term->cursor_saved;
	if (!terminfo_cursor_move(control, control->term->cursor.x, \
				control->term->cursor.y))
		return (0);
	return (1);
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rdi), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
callq 0x4879
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_get_endl
t_int_pair	terminfo_cursor_get_endl(t_control *control)
{
	t_int_pair	cursor_end;
	char		*str;
	int			i;

	cursor_end = control->term->cursor_start;
	str = control->term->line;
	i = 0;
	if (!control->term->line)
		return (control->term->cursor_start);
	while (str[i])
	{
		if (str[i] == '\n' || cursor_end.x == control->term->size_window.x - 1)
		{
			cursor_end.x = -1;
			cursor_end.y++;
		}
		i++;
		cursor_end.x++;
	}
	return (cursor_end);
}

// Assembly:
movq 0x18(%rdi), %rdx
movl 0x20(%rdx), %eax
movl 0x24(%rdx), %ecx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x46ab
movzbl (%rsi), %edi
cmpl $0xa, %edi
je 0x469d
testl %edi, %edi
je 0x46ab
movl 0x28(%rdx), %edi
decl %edi
cmpl %edi, %eax
jne 0x46a4
incl %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
incq %rsi
jmp 0x4688
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_right
int	terminfo_cursor_move_right(t_control *control)
{
	char	*caps;
	int		cur_line_end_index;

	cur_line_end_index = terminfo_predict_current_line_end_index(control);
	if (control->term->inline_position + 1 >= control->term->line_len)
		return (1);
	if (control->term->inline_position + 1 == cur_line_end_index)
	{
		if (!terminfo_cursor_move_diagonally_down(control))
			return (0);
	}
	else
	{
		control->term->cursor.x++;
		if (!(caps = terminfo_get_caps("cuf1", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
	}
	control->term->inline_position++;
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x4ee8
movq 0x18(%r14), %rcx
movl 0xc(%rcx), %edx
incl %edx
movl $0x1, %ebx
cmpl 0x8(%rcx), %edx
jge 0x471f
cmpl %eax, %edx
jne 0x46e9
movq %r14, %rdi
callq 0x4729
testl %eax, %eax
jne 0x4714
jmp 0x471d
incl 0x10(%rcx)
leaq 0x6c2a(%rip), %rdi      # 0xb31d
movq %r14, %rsi
callq 0x4457
testq %rax, %rax
je 0x471d
leaq 0x6269(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%r14), %rax
incl 0xc(%rax)
jmp 0x471f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_diagonally_down
int	terminfo_cursor_move_diagonally_down(t_control *control)
{
	char *caps;

	if (control->term->cursor.y + 1 == control->term->size_window.y)
	{
		if (!(caps = terminfo_edit_caps(control, "indn", 1)))
			return (0);
		control->term->cursor_start.y--;
		control->term->cursor_saved.y--;
		control->term->cursor.y--;
		tputs(caps, 1, ft_putchar);
	}
	if (!terminfo_cursor_move(control, 0, control->term->cursor.y + 1))
		return (0);
	control->term->cursor.x = 0;
	control->term->cursor.y += 1;
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl 0x14(%rax), %edx
incl %edx
cmpl 0x2c(%rax), %edx
jne 0x4780
leaq 0x6be3(%rip), %rsi      # 0xb327
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4436
testq %rax, %rax
je 0x47a5
movq 0x18(%rbx), %rcx
decl 0x24(%rcx)
decl 0x1c(%rcx)
decl 0x14(%rcx)
leaq 0x6206(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
movl 0x14(%rax), %edx
incl %edx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4879
testl %eax, %eax
je 0x47a7
movq 0x18(%rbx), %rax
movl $0x0, 0x10(%rax)
incl 0x14(%rax)
movl $0x1, %ebp
jmp 0x47a7
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_left
int	terminfo_cursor_move_left(t_control *control)
{
	char		*caps;

	if (control->term->inline_position < 0)
		return (1);
	if (control->term->cursor.x == 0)
	{
		if (!terminfo_cursor_move_diagonally_up(control))
			return (0);
	}
	else
	{
		if (!(caps = terminfo_get_caps("cub1", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
		control->term->cursor.x--;
	}
	control->term->inline_position--;
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movl $0x1, %ebx
cmpl $0x0, 0xc(%rax)
js 0x4814
movq %rdi, %r14
cmpl $0x0, 0x10(%rax)
je 0x47fd
leaq 0x6b4f(%rip), %rdi      # 0xb322
movq %r14, %rsi
callq 0x4457
testq %rax, %rax
je 0x4812
leaq 0x6189(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%r14), %rax
decl 0x10(%rax)
jmp 0x480d
movq %r14, %rdi
callq 0x481e
testl %eax, %eax
je 0x4812
movq 0x18(%r14), %rax
decl 0xc(%rax)
jmp 0x4814
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_diagonally_up
int	terminfo_cursor_move_diagonally_up(t_control *control)
{
	t_int_pair	previous_end;

	if (control->term->cursor_start.y == control->term->cursor.y)
		return (1);
	previous_end = terminfo_predict_previous_line_cursor_end(control);
	if (!terminfo_cursor_move(control, previous_end.x, previous_end.y))
		return (0);
	control->term->cursor = previous_end;
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movl 0x24(%rax), %ecx
movl $0x1, %ebx
cmpl 0x14(%rax), %ecx
je 0x486b
movq %rdi, %r14
callq 0x4f85
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4879
testl %eax, %eax
je 0x4869
movq 0x18(%r14), %rax
movl %r15d, 0x10(%rax)
movl %r12d, 0x14(%rax)
jmp 0x486b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move2.c
// Function: terminfo_cursor_move_up
void	terminfo_cursor_move_up(t_control *control, t_int_pair *cursor)
{
	t_int_pair	previous_end;

	if (cursor->y <= control->term->cursor_start.y)
		return ;
	previous_end = terminfo_predict_previous_line_cursor_end(control);
	if (cursor->y == control->term->cursor_start.y + 1 \
			&& cursor->x < control->term->prompt_len)
		read_process_control_combo(control, CTRL_A_COMBO);
	else if (cursor->x > previous_end.x)
	{
		terminfo_cursor_move(control, previous_end.x, previous_end.y);
		control->term->inline_position -= cursor->x + 1;
		*cursor = previous_end;
	}
	else
	{
		terminfo_cursor_move(control, cursor->x, cursor->y - 1);
		control->term->inline_position -= cursor->x \
										+ (previous_end.x - cursor->x) + 1;
		cursor->y--;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rsi), %eax
movq 0x18(%rdi), %rcx
cmpl 0x24(%rcx), %eax
jle 0x4963
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4f85
movq %rax, %r15
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq 0x18(%r14), %rax
movl 0x24(%rax), %ecx
incl %ecx
cmpl %ecx, %edx
jne 0x491d
cmpl 0x48(%rax), %esi
jge 0x491d
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x58f6
cmpl %r15d, %esi
jle 0x494b
movq %r15, %r12
shrq $0x20, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4879
movl (%rbx), %eax
notl %eax
movq 0x18(%r14), %rcx
addl %eax, 0xc(%rcx)
movl %r15d, (%rbx)
movl %r12d, 0x4(%rbx)
jmp 0x4963
decl %edx
movq %r14, %rdi
callq 0x4879
notl %r15d
movq 0x18(%r14), %rax
addl %r15d, 0xc(%rax)
decl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq