LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/parsing/quotes/quotes_utils_2.c
// Function: find_closing_quote
char	*find_closing_quote(char *str, char quote
								, int opening, int *closing)
{
	int	i;

	i = opening + 1;
	*closing = 0;
	if (str[i] == quote && i >= 2 && str[i - 2] == ' ')
	{
		*closing += opening + 1;
		return (ft_strdup("\"\" "));
	}
	while (str[i])
	{
		if (str[i] == quote
			&& (quote == '\'' || check_prev_backslashes(str, i)))
		{
			*closing += opening + 1;
			return (get_string_between_quotes(str, opening
						, *closing, quote));
		}
		*closing += 1;
		i++;
	}
	handle_quote_error(quote);
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %esi, %ebx
movq %rdi, %r15
andl $0x0, (%rcx)
movslq %edx, %rbp
leaq 0x1(%rbp), %rax
movl %ebp, %r12d
testl %ebp, %ebp
jle 0x36b7
cmpb %bl, 0x1(%r15,%rbp)
jne 0x36b7
cmpb $0x20, -0x1(%r15,%r12)
jne 0x36b7
movl %eax, (%r14)
leaq 0x1ac7(%rip), %rdi      # 0x516b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d48
movq %rax, (%rsp)
addq %r15, %rbp
xorl %edx, %edx
pushq $0x1
popq %r13
movb (%rbp,%r13), %al
testb %al, %al
je 0x36f4
cmpb %bl, %al
jne 0x36ea
cmpb $0x27, %bl
je 0x370d
leal (%r12,%r13), %esi
movq %r15, %rdi
callq 0x3460
movl (%r14), %edx
testw %ax, %ax
jne 0x370d
incl %edx
movl %edx, (%r14)
incq %r13
jmp 0x36c4
movsbl %bl, %edi
callq 0x3648
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl (%rsp), %edx
movl %edx, (%r14)
movsbl %bl, %ecx
movq %r15, %rdi
movl %r12d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x355e
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/parsing/utils/split_non_escaped.c
// Function: ft_split_non_escaped
char			**ft_split_non_escaped(char *input, char delimiter)
{
	char	**args;
	int		len;

	if (!(args = malloc((count_args(input, delimiter) + 2) * sizeof(char *))))
		return (NULL);
	len = ft_strlen(input);
	input = set_split_delimiter(input, delimiter);
	divide_arguments(args, input, len);
	return (args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %r14
callq 0x3905
cltq
leaq 0x10(,%rax,8), %rdi
callq 0x1140
movq %rax, %r12
testq %rax, %rax
je 0x38bc
movq %r14, %rdi
callq 0x4f18
movq %rax, 0x10(%rsp)
addq $-0x2, %r14
cmpb $0x20, 0x2(%r14)
leaq 0x1(%r14), %r14
je 0x3774
movq %r12, (%rsp)
movb 0x1(%r14), %al
incq %r14
cmpb %bpl, %al
je 0x3783
pushq $-0x1
popq %r12
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
xorl %r15d, %r15d
movsbl %bpl, %ecx
movl %ecx, 0xc(%rsp)
movq %r13, %rbx
xorl %ebp, %ebp
testb %al, %al
je 0x3827
movsbl %al, %edi
movl 0xc(%rsp), %esi
callq 0x38e4
testw %ax, %ax
je 0x380a
movl %r12d, %edx
movq %rbx, %rcx
xorl %eax, %eax
cmpq %rax, %r15
je 0x37e2
movl %edx, %edx
cmpb $0x5c, (%r14,%rdx)
jne 0x37ea
decq %rax
addq %r13, %rcx
decl %edx
jmp 0x37ca
movq %rbp, %rax
pushq $-0x1
popq %rcx
jmp 0x37f1
sarq $0x20, %rcx
negq %rax
cmpl $0x2, %eax
jb 0x3801
cmpb $0x20, (%r14,%rcx)
pushq $0x1
popq %rcx
cmovel %ecx, %eax
testb $0x1, %al
jne 0x380a
movb $0x0, (%r14,%rbp)
movb 0x1(%r14,%rbp), %al
incq %rbp
decq %r15
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rcx, %rbx
incl %r12d
jmp 0x37ad
movq 0x10(%rsp), %rax
movslq %eax, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
movq (%rsp), %r12
cmpl %eax, %r13d
jge 0x38b4
movslq %r13d, %rdi
addq %r14, %rdi
callq 0x4d48
movq %rax, %rbp
movq %rax, (%r12,%rbx,8)
movq %rax, %rdi
leaq 0x1916(%rip), %rsi      # 0x516f
pushq $0x3
popq %rdx
callq 0x4f38
testl %eax, %eax
je 0x386f
movq %rbp, %rdi
callq 0x4f18
jmp 0x3895
leaq 0x17a8(%rip), %rdi      # 0x501e
callq 0x4d48
movq %rax, %r12
movq %rbp, %rdi
callq 0x1030
movq (%rsp), %rax
movq %r12, (%rax,%rbx,8)
movq (%rsp), %r12
pushq $0x2
popq %rax
addl %r13d, %eax
incq %rbx
movslq %eax, %r13
movq 0x10(%rsp), %rax
cmpq %r15, %r13
jge 0x38b4
cmpb $0x0, (%r14,%r13)
jne 0x3838
incq %r13
jmp 0x38a3
movslq %ebx, %rax
andq $0x0, (%r12,%rax,8)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/parsing/utils/split_non_escaped_utils.c
// Function: count_args
int		count_args(char *input, char delimiter)
{
	int		i;
	int		l;

	l = 0;
	i = 0;
	while (input[i])
	{
		if (is_delimiter(input[i], delimiter) && input[i - 1] != '\\')
		{
			l++;
			while (input[i] && !is_delimiter(input[i], delimiter))
				i++;
		}
		i++;
	}
	return (l);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1(%rdi), %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
movsbl %sil, %ebp
xorl %r14d, %r14d
movslq %r12d, %r13
movb (%rbx,%r13), %r15b
testb %r15b, %r15b
je 0x3976
movsbl %r15b, %edi
movl %ebp, %esi
callq 0x38e4
testw %ax, %ax
je 0x3949
cmpb $0x5c, -0x1(%rbx,%r13)
jne 0x394e
incl %r12d
jmp 0x3925
incl %r14d
addq (%rsp), %r13
testb %r15b, %r15b
je 0x3949
movsbl %r15b, %edi
movl %ebp, %esi
callq 0x38e4
testw %ax, %ax
jne 0x3949
movb (%r13), %r15b
incl %r12d
incq %r13
jmp 0x3955
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator.c
// Function: validate_input
int				validate_input(t_shell *shell, char *line)
{
	int it;

	it = -1;
	while (line[++it])
	{
		if (line[it] == '|' ||
			line[it] == '<' ||
			line[it] == '>' ||
			line[it] == ';')
		{
			if (validator(shell, line, line[it], it))
				return (0);
		}
	}
	return (1);
	if (line[it + 1] == '<' || line[it + 1] == '>')
		it++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
leaq 0x1(%rsi), %r15
pushq $-0x1
popq %r12
leaq 0x1(%r12), %rbp
movb -0x1(%r15), %bl
movzbl %bl, %eax
leal -0x3b(%rax), %ecx
cmpl $0x2, %ecx
jb 0x39c9
cmpl $0x3e, %eax
je 0x39c9
cmpl $0x7c, %eax
je 0x39c9
testl %eax, %eax
jne 0x3a2c
jmp 0x3a4a
movsbl %bl, %r13d
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x3b26
incl %r12d
testw %ax, %ax
je 0x39fb
movq (%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
movl %r12d, %ecx
callq 0x3baf
testl %eax, %eax
je 0x3a2c
jmp 0x3a6a
cmpb $0x7c, %bl
jne 0x3a13
movq %r15, %rdi
movl %r12d, %esi
callq 0x3b8f
movl %ebp, %r12d
testw %ax, %ax
jne 0x3a4f
movsbl -0x1(%r15), %ecx
movq (%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x3a7c
testq %rax, %rax
jne 0x3a37
incq %r15
movq %rbp, %r12
jmp 0x39a2
movq (%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c21
pushq $0x1
jmp 0x3a66
pushq $0x1
popq %rax
jmp 0x3a6c
leaq 0x171c(%rip), %rsi      # 0x5172
movq (%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4484
pushq $0x2
popq %rax
movl %eax, 0x28(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator_utils.c
// Function: post_to_token
char		*post_to_token(t_shell *shell, char *line, int it, char token)
{
	char	*key;
	char	*value;
	char	*tmp;

	if (token == '>')
		while (line[it++])
			if (line[it] == '}' && line[it - 1] != ' ')
			{
				key = get_var_key(line, it);
				value = expand_var(key, shell);
				if (contain_spaces(value))
				{
					free(value);
					tmp = ft_strjoin("$", key);
					free(key);
					return (tmp);
				}
				free(key);
				free(value);
			}
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x3e, %cl
jne 0x3aee
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %r15
leaq (%r15,%rsi), %rbp
incq %rbp
incl %r15d
movb -0x1(%rbp), %al
testb %al, %al
je 0x3aee
cmpb $0x20, %al
je 0x3ae9
cmpb $0x7d, (%rbp)
jne 0x3ae9
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1a2e
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x2e4c
movq %rax, %r13
movq %rax, %rdi
callq 0x1a91
testw %ax, %ax
jne 0x3aff
movq %r12, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
incq %rbp
jmp 0x3a9c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x1030
leaq 0x1691(%rip), %rdi      # 0x519f
movq %r12, %rsi
callq 0x4d88
movq %rax, %rbx
movq %r12, %rdi
callq 0x1030
movq %rbx, %rax
jmp 0x3af0
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator_utils.c
// Function: prior_to_token
short		prior_to_token(char *line, int it, char token)
{
	int aux_it;

	aux_it = it;
	while (aux_it > 0 && line[aux_it] == ' ')
		aux_it--;
	if (token == '>' || token == '<')
		return (aux_it > 0 && aux_it != it &&
				(line[aux_it] == '>' ||
				line[aux_it] == '<'));
	else
	{
		return (aux_it < 1 ||
				line[aux_it] == ';' ||
				line[aux_it] == '>' ||
				line[aux_it] == '<' ||
				line[aux_it] == '|');
	}
	return (0);
}

// Assembly:
movl %esi, %ecx
sarl $0x1f, %ecx
andl %esi, %ecx
movl %esi, %eax
testl %eax, %eax
jle 0x3b43
movl %eax, %r8d
cmpb $0x20, (%rdi,%r8)
jne 0x3b41
decl %eax
jmp 0x3b2f
movl %eax, %ecx
andb $-0x3, %dl
cmpb $0x3c, %dl
jne 0x3b5c
testl %eax, %eax
setle %al
cmpl %esi, %ecx
sete %dl
orb %al, %dl
je 0x3b7e
xorl %eax, %eax
retq
movw $0x1, %ax
testl %ecx, %ecx
jle 0x3b5b
movl %ecx, %ecx
movzbl (%rdi,%rcx), %ecx
leal -0x3b(%rcx), %edx
cmpl $0x2, %edx
jb 0x3b5b
cmpl $0x3e, %ecx
je 0x3b5b
cmpl $0x7c, %ecx
je 0x3b5b
jmp 0x3b59
movl %ecx, %eax
movb (%rdi,%rax), %cl
andb $-0x3, %cl
xorl %eax, %eax
cmpb $0x3c, %cl
sete %al
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator_utils.c
// Function: nothing_after_pipe
short		nothing_after_pipe(char *line, int it)
{
	if ((it - 2) >= 0 && *(line - 2) == '\\')
		return (0);
	while (*line && *line == ' ')
		line++;
	if (!*line)
		return (1);
	return (0);
}

// Assembly:
cmpl $0x2, %esi
jl 0x3b9d
cmpb $0x5c, -0x2(%rdi)
jne 0x3b9d
xorl %eax, %eax
retq
movb (%rdi), %cl
incq %rdi
cmpb $0x20, %cl
je 0x3b9d
xorl %eax, %eax
testb %cl, %cl
sete %al
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator_utils.c
// Function: get_validator_err
int			get_validator_err(t_shell *shell,
		char *line, char separator, int it)
{
	if (separator == ';')
		print_errors(shell, "syntax error near unexpected token `;'", NULL);
	else if (separator == '|')
		print_errors(shell, "syntax error near unexpected token `|'", NULL);
	else if (separator == '>' && line[it + 1] == '>')
		print_errors(shell, "syntax error near unexpected token `>>'", NULL);
	else if (separator == '>')
		print_errors(shell, "syntax error near unexpected token `>'", NULL);
	else if (separator == '<' && line[it + 1] == '<')
		print_errors(shell, "syntax error near unexpected token `<<'", NULL);
	else if (separator == '<')
		print_errors(shell, "syntax error near unexpected token `<'", NULL);
	shell->stat_loc = 2;
	return (1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x3b, %edx
je 0x3c04
cmpl $0x3c, %edx
je 0x3bd0
cmpl $0x3e, %edx
je 0x3be8
cmpl $0x7c, %edx
jne 0x3c15
leaq 0x15fa(%rip), %rsi      # 0x51c8
jmp 0x3c0b
movslq %ecx, %rax
cmpb $0x3c, 0x1(%rsi,%rax)
leaq 0x165f(%rip), %rax      # 0x523e
leaq 0x1680(%rip), %rsi      # 0x5266
jmp 0x3bfe
movslq %ecx, %rax
cmpb $0x3e, 0x1(%rsi,%rax)
leaq 0x15f8(%rip), %rax      # 0x51ef
leaq 0x1619(%rip), %rsi      # 0x5217
cmoveq %rax, %rsi
jmp 0x3c0b
leaq 0x1596(%rip), %rsi      # 0x51a1
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4484
movl $0x2, 0x28(%rbx)
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/validator/validator_utils.c
// Function: safe_print_err
void		safe_print_err(t_shell *shell, char *key)
{
	char	*tmp;

	tmp = ft_strjoin(key, ": ambiguous redirect");
	print_errors(shell, tmp, NULL);
	free(tmp);
	free(key);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x165a(%rip), %rsi      # 0x528d
movq %rbx, %rdi
callq 0x4d88
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x4484
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/redirections/redirections.c
// Function: find_redirections
int				find_redirections(t_shell *shell)
{
	size_t	it;
	int		fd;

	it = 0;
	while (shell->args[it])
	{
		if (validator(shell, shell->args[it]))
		{
			if (ft_strcmp(shell->args[it], ">"))
				fd = redirections_output(shell, it);
			else if (ft_strcmp(shell->args[it], "<"))
				fd = redirections_input(shell, it);
			else if (ft_strcmp(shell->args[it], ">>"))
				fd = redirections_append(shell, it);
			else
				it++;
		}
		else
		{
			fd = -1;
			break ;
		}
	}
	return (fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x15eb(%rip), %r14      # 0x5262
leaq 0x1627(%rip), %r15      # 0x52a5
leaq 0x161d(%rip), %r12      # 0x52a2
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x3e26
movq %rdi, %rcx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rcx), %esi
cmpl $0x20, %esi
je 0x3cc1
cmpl $0x3c, %esi
je 0x3cb9
cmpl $0x3e, %esi
je 0x3cbe
testl %esi, %esi
je 0x3cc6
xorl %edx, %edx
xorl %eax, %eax
jmp 0x3cc1
incq %rax
jmp 0x3cc1
incq %rdx
incq %rcx
jmp 0x3c9d
cmpq $0x3, %rdx
jae 0x3de2
cmpq $0x3, %rax
jae 0x3df4
movq %r15, %rsi
callq 0x4f6c
testq %rax, %rax
je 0x3cf7
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3ed7
movl %eax, %r13d
jmp 0x3c85
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movq %r12, %rsi
callq 0x4f6c
movq 0x18(%rbx), %rcx
testq %rax, %rax
je 0x3d4a
cmpq $0x0, 0x8(%rcx,%rbp,8)
je 0x3d72
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3f76
movswl %ax, %r13d
cmpw $-0x1, %r13w
je 0x3d38
movl %r13d, %edi
xorl %esi, %esi
callq 0x1070
movq 0x18(%rbx), %rdx
movq (%rdx,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
jmp 0x3d8e
movq (%rcx,%rbp,8), %rdi
leaq 0x154f(%rip), %rsi      # 0x52a4
callq 0x4f6c
testq %rax, %rax
je 0x3dda
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3e38
movl %eax, %r13d
jmp 0x3c85
movl $0x2, 0x28(%rbx)
movq %rbx, %rdi
leaq 0x1549(%rip), %rsi      # 0x52cc
xorl %edx, %edx
callq 0x4484
pushq $-0x1
popq %r13
movq 0x18(%rbx), %rdx
movq (%rdx,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
testq %rbp, %rbp
jne 0x3c85
movq 0x18(%rbx), %rax
cmpq $0x0, (%rax)
movl $0x0, %ebp
je 0x3c85
movq 0x8(%rbx), %rdi
callq 0x1030
movq 0x18(%rbx), %rax
movq (%rax), %rdi
callq 0x4d48
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x3c85
incq %rbp
jmp 0x3c85
leaq 0x142b(%rip), %rax      # 0x5214
leaq 0x1423(%rip), %r14      # 0x5213
cmoveq %rax, %r14
leaq 0x14ac(%rip), %rdi      # 0x52a7
movq %r14, %rsi
callq 0x4d88
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x4484
movq %r14, %rdi
callq 0x1030
movl $0x2, 0x28(%rbx)
pushq $-0x1
popq %r13
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/redirections/redirections_utils.c
// Function: redirections_append
int		redirections_append(t_shell *shell, size_t it)
{
	int fd;

	fd = -1;
	if (!(shell->args[it + 1]))
	{
		shell->stat_loc = 2;
		print_errors(shell,
				"syntax error near unexpected token `newline'", NULL);
	}
	else
	{
		if ((fd = open(shell->args[it + 1],
						O_CREAT | O_APPEND | O_WRONLY, 0644)) == -1)
		{
			shell->stat_loc = 1;
			print_errors(shell,
					" No such file or directory", shell->args[it + 1]);
		}
		else
			dup2(fd, 1);
		delete_environment(shell, shell->args[it], shell->args);
	}
	delete_environment(shell, shell->args[it], shell->args);
	return (fd);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x3e74
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1160
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x3e91
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x1070
jmp 0x3eb0
movl $0x2, 0x28(%rbx)
leaq 0x144a(%rip), %rsi      # 0x52cc
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4484
pushq $-0x1
popq %rbp
jmp 0x3ec0
movl $0x1, 0x28(%rbx)
movq 0x18(%rbx), %rax
movq 0x8(%rax,%r14,8), %rdx
leaq 0x1200(%rip), %rsi      # 0x50a8
movq %rbx, %rdi
callq 0x4484
movq 0x18(%rbx), %rdx
movq (%rdx,%r14,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
movq 0x18(%rbx), %rdx
movq (%rdx,%r14,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/redirections/redirections_utils.c
// Function: redirections_output
int		redirections_output(t_shell *shell, size_t it)
{
	int fd;

	fd = -1;
	if (!(shell->args[it + 1]))
	{
		shell->stat_loc = 2;
		print_errors(shell,
				"syntax error near unexpected token `newline'", NULL);
	}
	else
	{
		if ((fd = open(shell->args[it + 1],
						O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1)
		{
			shell->stat_loc = 1;
			print_errors(shell,
					" No such file or directory", shell->args[it + 1]);
		}
		else
			dup2(fd, 1);
		delete_environment(shell, shell->args[it], shell->args);
	}
	delete_environment(shell, shell->args[it], shell->args);
	return (fd);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x3f13
movl $0x241, %esi            # imm = 0x241
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1160
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x3f30
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x1070
jmp 0x3f4f
movl $0x2, 0x28(%rbx)
leaq 0x13ab(%rip), %rsi      # 0x52cc
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4484
pushq $-0x1
popq %rbp
jmp 0x3f5f
movl $0x1, 0x28(%rbx)
movq 0x18(%rbx), %rax
movq 0x8(%rax,%r14,8), %rdx
leaq 0x1161(%rip), %rsi      # 0x50a8
movq %rbx, %rdi
callq 0x4484
movq 0x18(%rbx), %rdx
movq (%rdx,%r14,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
movq 0x18(%rbx), %rdx
movq (%rdx,%r14,8), %rsi
movq %rbx, %rdi
callq 0x1c7c
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/redirections/redirections_utils.c
// Function: redirection_exists
short	redirection_exists(t_shell *shell, size_t it)
{
	struct stat	s;
	int			fd;

	fd = -1;
	if ((fd = open(shell->args[it + 1], O_RDONLY, 0644)) == -1)
	{
		if (stat(shell->args[it + 1], &s) != -1)
		{
			if (!(s.st_mode & S_IRUSR) ||
					(s.st_mode & S_IRUSR && (!(s.st_mode & S_IXUSR))))
			{
				shell->stat_loc = 1;
				print_errors(shell, " Permission denied", shell->args[it + 1]);
			}
		}
		else
		{
			shell->stat_loc = 1;
			print_errors(shell,
					" No such file or directory", shell->args[it + 1]);
		}
	}
	return (fd);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rax,%rsi,8), %rdi
xorl %esi, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1160
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x3fef
movq 0x18(%rbx), %rax
movq 0x8(%rax,%r14,8), %rdi
movq %rsp, %rsi
callq 0x1120
cmpl $-0x1, %eax
je 0x3fd0
movl 0x18(%rsp), %eax
notl %eax
testw $0x140, %ax             # imm = 0x140
je 0x3fef
leaq 0x10b5(%rip), %rsi      # 0x5083
jmp 0x3fd7
leaq 0x10d1(%rip), %rsi      # 0x50a8
movl $0x1, 0x28(%rbx)
movq 0x18(%rbx), %rax
movq 0x8(%rax,%r14,8), %rdx
movq %rbx, %rdi
callq 0x4484
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/search/search.c
// Function: search_binary_in_pwd
char			*search_binary_in_pwd(t_shell *shell)
{
	struct stat		s;
	struct dirent	*direntp;
	DIR				*pdir;

	if (stat(".", &s) != -1 &&
		s.st_mode & S_IFDIR)
	{
		if (!(pdir = opendir(".")))
			return (NULL);
		while ((direntp = readdir(pdir)))
		{
			if (ft_strcmp(direntp->d_name, shell->args[0]))
			{
				closedir(pdir);
				return (absolute_bin_path(".", shell->binary));
			}
			direntp++;
		}
		closedir(pdir);
	}
	shell->stat_loc = 127;
	print_errors(shell, " No such file or directory", shell->binary);
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x1057(%rip), %rdi      # 0x506b
leaq 0x8(%rsp), %rsi
callq 0x1120
cmpl $-0x1, %eax
je 0x408d
testb $0x40, 0x21(%rsp)
je 0x408d
leaq 0x103a(%rip), %rdi      # 0x506b
callq 0x1050
testq %rax, %rax
je 0x40a7
movq %rax, %r14
movq %r14, %rdi
callq 0x1130
testq %rax, %rax
je 0x4085
addq $0x13, %rax
movq 0x18(%rbx), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x4f6c
testq %rax, %rax
je 0x403e
movq %r14, %rdi
callq 0x10c0
movq 0x8(%rbx), %rsi
leaq 0xff5(%rip), %rdi       # 0x506b
addq $0x98, %rsp
popq %rbx
popq %r14
jmp 0x45eb
movq %r14, %rdi
callq 0x10c0
movl $0x7f, 0x28(%rbx)
movq 0x8(%rbx), %rdx
leaq 0x1009(%rip), %rsi      # 0x50a8
movq %rbx, %rdi
callq 0x4484
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/search/search.c
// Function: search_binary
char			*search_binary(t_shell *shell, char **paths)
{
	size_t			it;
	struct stat		s;
	char			*bin_name;

	it = -1;
	bin_name = ft_strdup(shell->args[0]);
	to_lower_in(bin_name);
	while (paths[++it])
		if (binary_path_exists(shell, paths[it], bin_name, &s))
			return (absolute_bin_path(paths[it], shell->binary));
	if (stat(bin_name, &s) != -1)
		return (check_command(shell, bin_name, s));
	else if (lstat(bin_name, &s) != -1 ||
			!ft_strncmp(bin_name, "./", 2) || ft_strchr(shell->args[0], '/'))
	{
		shell->stat_loc = 127;
		print_errors(shell, " No such file or directory", shell->binary);
		free(bin_name);
		return (NULL);
	}
	else
		return (check_command(shell, bin_name, s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r15
movq %rdi, 0x90(%rsp)
movq 0x18(%rdi), %rax
movq (%rax), %rdi
callq 0x4d48
movq %rax, %r14
movq %rax, %rdi
callq 0x4318
pushq $-0x1
popq %rbx
leaq 0x98(%rsp), %r12
movq 0x8(%r15,%rbx,8), %r13
testq %r13, %r13
je 0x419b
movq %rbx, %rbp
incq %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x1120
cmpl $-0x1, %eax
je 0x40f2
testb $0x40, 0xb1(%rsp)
je 0x40f2
movq %r13, %rdi
callq 0x1050
testq %rax, %rax
je 0x40f2
movq %rax, %r13
movq %r13, %rdi
callq 0x1130
testq %rax, %rax
je 0x4153
addq $0x13, %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f6c
testq %rax, %rax
je 0x4130
jmp 0x415d
movq %r13, %rdi
callq 0x10c0
jmp 0x40f2
movq 0x90(%rsp), %rbx
movl $0x1, 0x30(%rbx)
movq %r13, %rdi
callq 0x10c0
movq %r14, %rdi
callq 0x1030
movq 0x8(%r15,%rbp,8), %rdi
movq 0x8(%rbx), %rsi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45eb
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x1120
cmpl $-0x1, %eax
je 0x41d3
pushq $0x12
popq %rcx
leaq 0x98(%rsp), %rsi
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x4269
jmp 0x4214
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x10e0
cmpl $-0x1, %eax
movq 0x90(%rsp), %rbx
je 0x4226
movl $0x7f, 0x28(%rbx)
movq 0x8(%rbx), %rdx
leaq 0xea6(%rip), %rsi       # 0x50a8
movq %rbx, %rdi
callq 0x4484
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10cc(%rip), %rsi      # 0x52f9
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x4f38
testl %eax, %eax
je 0x41f0
movq 0x18(%rbx), %rax
movq (%rax), %rdi
pushq $0x2f
popq %rsi
callq 0x4d28
testq %rax, %rax
jne 0x41f0
pushq $0x12
popq %rcx
leaq 0x98(%rsp), %rsi
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
jmp 0x41c9
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/search/search.c
// Function: check_command
static	char	*check_command(t_shell *shell, char *bin_name, struct stat s)
{
	if (command_exists(shell, bin_name, s))
	{
		free(bin_name);
		return (ft_strdup(shell->binary));
	}
	free(bin_name);
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0xf000, %eax           # imm = 0xF000
andl 0x38(%rsp), %eax
movl %eax, %ecx
negw %cx
jo 0x428b
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x42d6
movq 0x18(%r14), %rax
movq (%rax), %rdi
leaq 0x1061(%rip), %rsi      # 0x52fa
pushq $0x1
popq %rdx
callq 0x4f38
testl %eax, %eax
je 0x42d6
movq 0x18(%r14), %rax
movq (%rax), %rdi
leaq 0x1046(%rip), %rsi      # 0x52f9
pushq $0x2
popq %rdx
callq 0x4f38
testl %eax, %eax
je 0x42d6
movq 0x18(%r14), %rax
movq (%rax), %r15
movq %rbx, %rdi
callq 0x4f18
cmpb $0x2f, -0x1(%r15,%rax)
jne 0x42ec
movq %rbx, %rdi
callq 0x1030
movq 0x8(%r14), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4d48
movl $0x7f, 0x28(%r14)
movq 0x8(%r14), %rdx
leaq 0xffd(%rip), %rsi       # 0x52fc
movq %r14, %rdi
callq 0x4484
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/get_next_line.c
// Function: add_char
char	*add_char(char *line, char buffer)
{
	char	*output;
	int		l;

	l = 0;
	while (line && line[l])
		l++;
	if (!(output = malloc((l + 2) * sizeof(char))))
		return (NULL);
	l = 0;
	while (line && line[l])
	{
		output[l] = line[l];
		l++;
	}
	output[l] = buffer;
	output[l + 1] = '\0';
	free(line);
	return (output);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x2
popq %rax
testq %rbx, %rbx
je 0x4351
cmpb $0x0, -0x2(%rbx,%rax)
je 0x4351
incq %rax
jmp 0x4340
movl %eax, %edi
callq 0x1140
movq %rax, %r14
testq %rax, %rax
je 0x438b
xorl %eax, %eax
testq %rbx, %rbx
je 0x4377
movb (%rbx,%rax), %cl
testb %cl, %cl
je 0x4377
movb %cl, (%r14,%rax)
incq %rax
jmp 0x4362
movl %eax, %eax
movb %bpl, (%r14,%rax)
movb $0x0, 0x1(%r14,%rax)
movq %rbx, %rdi
callq 0x1030
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/get_next_line.c
// Function: get_next_line
int		get_next_line(char **line)
{
	int		output;
	char	buffer;

	if (!(*line = malloc(sizeof(char))))
		return (-1);
	**line = '\0';
	buffer = 0;
	output = 1;
	while (output || buffer)
	{
		if ((output = read(0, &buffer, 1)) == -1)
			return (-1);
		if (buffer == '\n')
			break ;
		if (!output)
			ft_putstr_fd("\033[J", 1);
		else if (!(*line = add_char(*line, buffer)))
			return (-1);
	}
	return (output);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
callq 0x1140
movq %rax, (%r14)
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x4429
xorl %r13d, %r13d
movb %r13b, (%rax)
leaq 0x7(%rsp), %r15
movb %r13b, (%r15)
movb $0x1, %bpl
pushq $0x1
popq %r12
testb %r13b, %r13b
sete %al
notb %bpl
testb %al, %bpl
jne 0x4423
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10d0
cmpl $-0x1, %eax
je 0x4429
movb 0x7(%rsp), %r13b
cmpb $0xa, %r13b
je 0x4427
testl %eax, %eax
setne %bpl
je 0x4412
movq (%r14), %rdi
movsbl %r13b, %esi
callq 0x4334
movq %rax, (%r14)
testq %rax, %rax
jne 0x43c9
jmp 0x4429
leaq 0xf07(%rip), %rdi       # 0x5320
pushq $0x1
popq %rsi
callq 0x4bec
jmp 0x43c9
xorl %ebx, %ebx
jmp 0x4429
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/errors.c
// Function: print_errors
void	print_errors(t_shell *shell, char *msg, char *bin)
{
	(void)shell;
	ft_putstr_fd("minishell: ", 2);
	if (bin)
	{
		ft_putstr_fd(bin, 2);
		ft_putchar_fd(':', 2);
	}
	ft_putstr_fd(msg, 2);
	ft_putstr_fd("\n", 2);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
leaq 0xe8f(%rip), %rdi       # 0x5324
pushq $0x2
popq %rsi
callq 0x4bec
testq %r14, %r14
je 0x44b9
pushq $0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x4bec
pushq $0x3a
popq %rdi
movl %ebp, %esi
callq 0x4b8c
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4bec
leaq 0xb50(%rip), %rdi       # 0x501d
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x4bec
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/clean.c
// Function: clean_matrix
void	clean_matrix(char **matrix)
{
	if (matrix)
	{
		while (*matrix)
		{
			free(*matrix);
			matrix++;
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0x44f5
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x44f4
callq 0x1030
addq $0x8, %rbx
jmp 0x44e1
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/clean.c
// Function: clean_commands
void	clean_commands(t_shell *shell)
{
	clean_matrix(shell->commands);
	free(shell->commands);
	shell->commands = NULL;
	clean_matrix(shell->args);
	free(shell->args);
	shell->args = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x44d8
movq 0x10(%rbx), %rdi
callq 0x1030
andq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
callq 0x44d8
movq 0x18(%rbx), %rdi
callq 0x1030
andq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/utils.c
// Function: ft_strdup_matrix
char	**ft_strdup_matrix(char **envp)
{
	char	**tmp_envp;
	int		l;
	int		i;

	i = 0;
	l = 0;
	while (envp[l])
		l++;
	if (!(tmp_envp = malloc((l + 1) * sizeof(char *))))
		return (NULL);
	while (*envp)
	{
		tmp_envp[i] = ft_strdup(*envp);
		envp++;
		i++;
	}
	tmp_envp[i] = NULL;
	return (tmp_envp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
cmpq $0x0, (%rbx,%rdi)
leaq 0x8(%rdi), %rdi
jne 0x459b
movabsq $0x7fffffff8, %rax      # imm = 0x7FFFFFFF8
andq %rax, %rdi
callq 0x1140
movq %rax, %r14
testq %rax, %rax
je 0x45e2
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x45da
callq 0x4d48
movq %rax, (%r14,%r15,8)
incq %r15
jmp 0x45c3
movl %r15d, %eax
andq $0x0, (%r14,%rax,8)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/utils.c
// Function: absolute_bin_path
char	*absolute_bin_path(char *path, char *bin)
{
	char *tmp;

	tmp = ft_strjoin(path, "/");
	path = ft_strjoin(tmp, bin);
	free(tmp);
	return (path);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xd01(%rip), %rsi       # 0x52fa
callq 0x4d88
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4d88
movq %rax, %rbx
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/utils.c
// Function: add_env
char	**add_env(char **variable, char **env, int n)
{
	char	**tmp_envp;
	int		i;

	i = 0;
	if (env[n])
		tmp_envp = realloc_matrix(env, 0);
	else
		tmp_envp = realloc_matrix(env, 1);
	tmp_envp[n] = ft_strdup(*variable);
	while (*env)
	{
		if (i != n)
			tmp_envp[i] = ft_strdup(*env);
		env++;
		i++;
	}
	if (i != n)
		tmp_envp[i] = NULL;
	else
		tmp_envp[i + 1] = NULL;
	return (tmp_envp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movslq %edx, %r13
xorl %esi, %esi
cmpq $0x0, (%r14,%r13,8)
sete %sil
movq %r14, %rdi
callq 0x4622
movq %rax, %r15
movq (%r12), %rdi
callq 0x4d48
movq %rax, (%r15,%r13,8)
movl %r13d, %r12d
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
testq %rdi, %rdi
je 0x4693
cmpq %r13, %r12
je 0x468e
callq 0x4d48
movq %rax, (%r15,%r13,8)
incq %r13
jmp 0x4677
incl %ebx
cmpl %r13d, %r12d
movl %r13d, %eax
cmoveq %rbx, %rax
andq $0x0, (%r15,%rax,8)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/pipes.c
// Function: find_pipes
void			find_pipes(t_shell *shell)
{
	pid_t	pid;
	pid_t	aux_pid;
	int		p[2];
	int		it;
	int		std[2];

	it = -1;
	std[0] = dup(0);
	std[1] = dup(1);
	while (shell->commands[++it])
	{
		get_args_and_binary(shell, it);
		pipe(p);
		pid = child_pipe(shell, it, p);
		wait_child(shell, p, pid, it);
	}
	while ((aux_pid = wait(&shell->stat_loc)) > 0)
		if (aux_pid < pid)
			shell->stat_loc = WEXITSTATUS(shell->stat_loc);
	shell->stat_loc = WEXITSTATUS(shell->stat_loc);
	dup2(std[0], 0);
	dup2(std[1], 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x1080
movl %eax, 0x14(%rsp)
pushq $0x1
popq %r12
movl %r12d, %edi
callq 0x1080
movl %eax, 0x10(%rsp)
leaq 0x28(%rbx), %r15
leaq 0x8(%rsp), %r13
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rsi
testq %rsi, %rsi
je 0x47bc
movq %rbx, %rdi
callq 0x2f6d
movq %rax, %rbp
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x1030
movq %rbp, %rdi
callq 0x31ec
movq %rax, 0x18(%rbx)
movq %rbp, %rdi
callq 0x1030
movq 0x18(%rbx), %rax
movq (%rax), %rdi
callq 0x4d48
movq %rax, 0x8(%rbx)
movq %r13, %rdi
callq 0x10b0
callq 0x1190
testl %eax, %eax
je 0x47f6
movl %eax, %ebp
movl 0xc(%rsp), %edi
callq 0x10a0
movl 0x8(%rsp), %edi
xorl %esi, %esi
callq 0x1070
movq 0x10(%rbx), %rax
cmpq $0x0, (%rax,%r14)
je 0x477c
movl %ebp, %edi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1150
movzbl 0x29(%rbx), %eax
movl %eax, 0x28(%rbx)
movl 0x8(%rsp), %edi
callq 0x10a0
movq 0x18(%rbx), %rdi
callq 0x44d8
movq 0x18(%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
addq $0x8, %r14
jmp 0x46ec
cmpl %ebp, %eax
jge 0x47bc
movzbl 0x1(%r15), %eax
movl %eax, (%r15)
movq %r15, %rdi
callq 0x1180
testl %eax, %eax
jg 0x47b0
movzbl 0x1(%r15), %eax
movl %eax, (%r15)
movl 0x14(%rsp), %edi
xorl %esi, %esi
callq 0x1070
pushq $0x1
popq %rsi
movl 0x10(%rsp), %edi
callq 0x1070
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rsp), %edi
callq 0x10a0
movq 0x10(%rbx), %rax
cmpq $0x0, 0x8(%rax,%r14)
je 0x4817
movl 0xc(%rsp), %edi
pushq $0x1
popq %rsi
callq 0x1070
movq %rbx, %rdi
callq 0x3c60
movq %rbx, %rdi
callq 0x4838
movl 0xc(%rsp), %edi
callq 0x10a0
movl 0x28(%rbx), %edi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/pipes.c
// Function: exec_arg
static void		exec_arg(t_shell *shell)
{
	char	*path;

	if (!check_builtin(shell))
	{
		path = get_path(shell);
		if (path)
		{
			if (check_permissions(shell, path))
				execve(path, shell->args, shell->env);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x15d5
testl %eax, %eax
je 0x4850
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x1474
testq %rax, %rax
je 0x4848
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4888
testl %eax, %eax
je 0x4848
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10f0
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/permissions.c
// Function: check_permissions
int			check_permissions(t_shell *shell, char *path)
{
	struct stat s;

	if (stat(path, &s) != -1)
	{
		if (s.st_mode & S_IFDIR)
		{
			return (set_err_message(shell, " is a directory", 126,
						shell->binary));
		}
		if (shell->is_binary == 1 && (!(s.st_mode & S_IXUSR)))
			return (set_err_message(shell, " Permission denied", 126, path));
		else if (shell->is_binary == 0 &&
				(!(s.st_mode & S_IXUSR) || !(s.st_mode & S_IRUSR)))
			return (set_err_message(shell, " Permission denied", 126, path));
		return (1);
	}
	else
		return (set_err_message(shell, " command not found", 127
								, shell->binary));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1120
cmpl $-0x1, %eax
je 0x48dc
movl 0x20(%rsp), %eax
btl $0xe, %eax
jb 0x48f0
movl 0x30(%rbx), %ecx
movl %ecx, %edx
xorl $0x1, %edx
movl %eax, %esi
andl $0x40, %esi
orl %edx, %esi
je 0x4907
testl %ecx, %ecx
setne %cl
notl %eax
testw $0x140, %ax             # imm = 0x140
sete %al
orb %cl, %al
je 0x4907
pushq $0x1
popq %rax
jmp 0x4922
movq 0x8(%rbx), %rdx
movl $0x7f, 0x28(%rbx)
leaq 0xa0e(%rip), %rsi       # 0x52fc
jmp 0x4902
movq 0x8(%rbx), %rdx
movl $0x7e, 0x28(%rbx)
leaq 0xa2e(%rip), %rsi       # 0x5330
movq %rbx, %rdi
jmp 0x491b
movl $0x7e, 0x28(%rbx)
leaq 0x76e(%rip), %rsi       # 0x5083
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4484
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/srcs/shlvl.c
// Function: handle_shlvl
void			handle_shlvl(t_shell *shell)
{
	char					*shlvl;
	int						lvl;
	char					*tmp;

	shlvl = get_env(shell, "SHLVL=");
	if (!shlvl)
	{
		free(shlvl);
		shlvl = "0";
	}
	lvl = (int)ft_atoi(shlvl) + 1;
	free(shlvl);
	if (lvl < 0 && lvl >= INT_MIN)
		lvl = 0;
	else if (lvl > 2000000)
	{
		shlvl_error(shell, lvl);
		lvl = 1;
	}
	shlvl = ft_itoa(lvl);
	tmp = ft_strjoin("SHLVL=", shlvl);
	ft_export(shell, tmp);
	free(tmp);
	free(shlvl);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa01(%rip), %rsi       # 0x5340
callq 0x1cdc
testq %rax, %rax
leaq 0x9f9(%rip), %r15       # 0x5347
cmovneq %rax, %r15
movq %r15, %rdi
callq 0x4a20
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
xorl %edi, %edi
cmpl $-0x1, %r14d
jl 0x49e6
leal 0x1(%r14), %edi
cmpl $0x1e8480, %r14d        # imm = 0x1E8480
jl 0x49e6
callq 0x4af0
movq %rax, %r14
leaq 0x9c0(%rip), %rdi       # 0x5349
movq %rax, %rsi
callq 0x4d88
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x4d48
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
leaq 0x9a2(%rip), %rsi       # 0x5358
movq %r14, %rdi
callq 0x4d88
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
leaq 0x9a3(%rip), %rdx       # 0x5373
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4484
movq %r15, %rdi
callq 0x1030
pushq $0x1
popq %rdi
callq 0x4af0
movq %rax, %r14
leaq 0x94b(%rip), %rdi       # 0x5340
movq %rax, %rsi
callq 0x4d88
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x252f
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_atoi.c
// Function: ft_atoi
long int			ft_atoi(const char *str)
{
	long double			res;
	int					sign;
	unsigned int		i;

	res = 0;
	sign = 1;
	i = 0;
	while (str[i] == ' ' || str[i] == '\t' || str[i] == '\n' ||
			str[i] == '\r' || str[i] == '\v' || str[i] == '\f')
		i++;
	if (str[i] == '-' || str[i] == '+')
	{
		if (str[i] == '-')
			sign = -1;
		i++;
	}
	while (str[i] >= '0' && str[i] <= '9')
	{
		res = res * 10 + str[i] - '0';
		i++;
	}
	//printf("NUM: %ld", (long int)res * sign);
	return ((long double)(res * sign));
}

// Assembly:
xorl %eax, %eax
movabsq $0x100003e00, %rcx      # imm = 0x100003E00
movl %eax, %edx
movzbl (%rdi,%rdx), %edx
cmpq $0x2d, %rdx
ja 0x4a65
btq %rdx, %rcx
jae 0x4a42
incl %eax
jmp 0x4a2c
movabsq $0x280000000000, %rcx   # imm = 0x280000000000
btq %rdx, %rcx
jae 0x4a65
cmpb $0x2d, %dl
fld1
fld %st(0)
fchs
fxch %st(1)
fcmove %st(1), %st
fstp %st(1)
incl %eax
jmp 0x4a67
fld1
fldz
movl %eax, %ecx
movb (%rdi,%rcx), %cl
leal -0x30(%rcx), %edx
cmpb $0x9, %dl
ja 0x4a92
movsbl %cl, %ecx
movw %cx, -0xa(%rsp)
fmuls 0x8f8(%rip)             # 0x537c
fiadds -0xa(%rsp)
fadds 0x8f2(%rip)             # 0x5380
incl %eax
jmp 0x4a69
fmulp %st, %st(1)
fnstcw -0xe(%rsp)
movzwl -0xe(%rsp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0xc(%rsp)
fldcw -0xc(%rsp)
fistpll -0x8(%rsp)
fldcw -0xe(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_itoa.c
// Function: ft_itoa
char		*ft_itoa(int n)
{
	int		size;
	long int	aux;
	char		*num;

	aux = n;
	size = ft_size_num(aux);
	if (!(num = (char *)malloc((size + 1) * sizeof(char))))
		return (NULL);
	num[--size + 1] = '\0';
	if (aux < 0)
		aux = -aux;
	while (size >= 0)
	{
		num[size--] = (aux % 10) + '0';
		aux = aux / 10;
	}
	if (num[0] == '0' && num[1])
		num[0] = '-';
	return (num);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq %edi, %r14
pushq $0xa
popq %rbx
testl %r14d, %r14d
je 0x4b20
movq %r14, %r15
shrq $0x3f, %r15
movq %r14, %rax
negq %rax
cmovsq %r14, %rax
testq %rax, %rax
je 0x4b24
xorl %edx, %edx
divq %rbx
incl %r15d
jmp 0x4b11
pushq $0x1
popq %r15
leal 0x1(%r15), %eax
movslq %eax, %rdi
callq 0x1140
movq %rax, %rcx
testq %rax, %rax
je 0x4b6f
movslq %r15d, %rax
movb $0x0, (%rcx,%rax)
movq %r14, %rax
negq %rax
cmovsq %r14, %rax
movl %r15d, %esi
testl %esi, %esi
jle 0x4b61
xorl %edx, %edx
divq %rbx
orb $0x30, %dl
movb %dl, -0x1(%rcx,%rsi)
decq %rsi
jmp 0x4b4c
cmpb $0x30, (%rcx)
jne 0x4b6f
cmpb $0x0, 0x1(%rcx)
je 0x4b6f
movb $0x2d, (%rcx)
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_memset.c
// Function: ft_memset
void	*ft_memset(void *b, int c, size_t len)
{
	size_t i;

	i = 0;
	while (i < len)
		((unsigned char*)b)[i++] = c;
	return ((void*)b);
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x4b8b
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x4b7d
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_putendl_fd.c
// Function: ft_putendl_fd
void	ft_putendl_fd(char *s, int fd)
{
	char endl;

	if (s)
	{
		endl = '\n';
		write(fd, s, ft_strlen(s));
		write(fd, &endl, 1);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x4be8
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xf(%rsp), %r15
movb $0xa, (%r15)
callq 0x4f18
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1040
pushq $0x1
popq %rdx
movl %ebx, %edi
movq %r15, %rsi
callq 0x1040
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_split.c
// Function: ft_split
char			**ft_split(char const *s, char c)
{
	char	**matrix;
	size_t	i;
	size_t	matrix_size;;

	i = 0;
	if (!s)
		return (0);
	matrix_size = ft_count_words(s, c);
	if (!(matrix = (char **)malloc((matrix_size + 1) * sizeof(char*))))
		return (NULL);
	while (i < matrix_size)
	{
		while (*s == c)
			s++;		
		if (!(matrix[i] = ft_get_word(s, c)))
			return (ft_free_all(matrix, i));
		s += ft_strlen(matrix[i]);
		i++;
	}
	matrix[i] = 0;
	return (matrix);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4d11
movl %esi, %ebx
movq %rdi, %r14
movb (%rdi), %al
xorl %r13d, %r13d
testb %al, %al
je 0x4c67
cmpb %bl, %al
setne %r13b
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x4f18
decq %rax
cmpq %rax, %r15
jae 0x4c67
cmpb %bl, (%r14,%r15)
jne 0x4c62
xorl %eax, %eax
cmpb %bl, 0x1(%r14,%r15)
setne %al
addq %rax, %r13
incq %r15
jmp 0x4c3f
leaq 0x8(,%r13,8), %rdi
callq 0x1140
testq %rax, %rax
je 0x4d11
movq %rax, %rbp
xorl %r15d, %r15d
movq %r13, (%rsp)
cmpq %r13, %r15
je 0x4ce3
decq %r14
movq %r14, %rax
incq %r14
cmpb %bl, 0x1(%rax)
je 0x4c8f
xorl %r12d, %r12d
movb (%r14,%r12), %al
incq %r12
cmpb %bl, %al
je 0x4cac
testb %al, %al
jne 0x4c9d
movq %r12, %rdi
callq 0x1140
testq %rax, %rax
je 0x4ceb
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4ec0
movq %r13, (%rbp,%r15,8)
movq %r13, %rdi
callq 0x4f18
addq %rax, %r14
incq %r15
movq (%rsp), %r13
jmp 0x4c87
andq $0x0, (%rbp,%r13,8)
jmp 0x4d13
andq $0x0, (%rbp,%r15,8)
movq %r15, %rbx
subq $0x1, %rbx
jb 0x4d09
movq (%rbp,%r15,8), %rdi
callq 0x1030
movq %rbx, %r15
jmp 0x4cf4
movq %rbp, %rdi
callq 0x1030
xorl %ebp, %ebp
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strjoin.c
// Function: ft_strjoin
char	*ft_strjoin(char const *s1, char const *s2)
{
	char	*joint;
	size_t	l;
	size_t	i;
	size_t	j;
	
	if (!s1 || !s2)
		return (0);
	l = ft_strlen(s1) + ft_strlen(s2) + 1;
	if (!(joint = malloc(l * sizeof(char))))
		return (NULL);
	l = 0;
	i = 0;
	j = 0;
	while (l < (ft_strlen(s1) + ft_strlen(s2)))
	{
		if (l < ft_strlen(s1))
			joint[l++] = s1[i++];
		else
			joint[l++] = s2[j++];
	}
	joint[l] = '\0';
	return (joint);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x4e34
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4f18
movq %rax, %r15
movq %rbx, %rdi
callq 0x4f18
leaq (%r15,%rax), %rdi
incq %rdi
callq 0x1140
testq %rax, %rax
je 0x4e42
movq %rax, (%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x4f18
movq %rax, %r12
movq %rbx, %rdi
callq 0x4f18
addq %r12, %rax
cmpq %rax, %r13
jae 0x4e37
movq %r14, %rdi
callq 0x4f18
cmpq %rax, %r13
movq %rbp, %rcx
adcq $0x0, %rcx
cmpq %rax, %r13
movq %r15, %rdx
sbbq $-0x1, %rdx
addq %r14, %rbp
addq %rbx, %r15
cmpq %rax, %r13
cmovbq %rbp, %r15
movb (%r15), %al
movq (%rsp), %rsi
movb %al, (%rsi,%r13)
incq %r13
movq %rcx, %rbp
movq %rdx, %r15
jmp 0x4dda
xorl %eax, %eax
retq
movq (%rsp), %rax
movb $0x0, (%rax,%r13)
jmp 0x4e44
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strlcat.c
// Function: ft_strlcat
size_t	ft_strlcat(char *dst, const char *src, size_t dstsize)
{
	size_t i;
	size_t j;
	size_t l_dst;

	l_dst = ft_strlen(dst);
	j = 0;
	if (dstsize < l_dst)
		return (dstsize + ft_strlen(src));
	else
	{
		i = l_dst;
		while (src[j] != '\0' && i < dstsize - 1)
		{
			dst[i] = src[j];
			i++;
			j++;
		}
		dst[i] = '\0';
		return (l_dst + ft_strlen(src));
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
callq 0x4f18
cmpq %rbx, %rax
jbe 0x4e7c
movq %r14, %rdi
callq 0x4f18
addq %rbx, %rax
jmp 0x4eb1
movq %rax, %r15
decq %rbx
addq %rax, %r12
xorl %eax, %eax
movb (%r14,%rax), %cl
testb %cl, %cl
je 0x4ea1
leaq (%r15,%rax), %rdx
cmpq %rbx, %rdx
jae 0x4ea1
movb %cl, (%r12,%rax)
incq %rax
jmp 0x4e87
movb $0x0, (%rax,%r12)
movq %r14, %rdi
callq 0x4f18
addq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strlcpy.c
// Function: ft_strlcpy
size_t	ft_strlcpy(char *dest, const char *src, size_t size)
{
	size_t	i;
	size_t	j;

	i = 0;
	j = 0;
	if (!src || !dest)
		return (0);
	i = ft_strlen(src);
	if (size == 0)
		return (i);
	while (j < size - 1 && src[j])
	{ 
		dest[j] = src[j];
		j++;
	}
	dest[j] = '\0';
	return (i);
}

// Assembly:
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x4f06
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4f18
testq %rbx, %rbx
je 0x4f11
decq %rbx
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x4f0c
movb (%r15,%rcx), %dl
testb %dl, %dl
je 0x4f09
movb %dl, (%r14,%rcx)
incq %rcx
jmp 0x4ef0
xorl %eax, %eax
retq
movq %rcx, %rbx
movb $0x0, (%r14,%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strncmp.c
// Function: ft_strncmp
int	ft_strncmp(const char *s1, const char *s2, size_t n)
{
	size_t	i;
	size_t	aux;

	aux = 1;
	i = 0;
	while (i < n && aux == 1)
	{
		if (s1[i] != s2[i])
			return ((unsigned char)s1[i] - (unsigned char)s2[i]);
		else if (s1[i] == '\0' || s2[i] == '\0')
			aux = 0;
		i++;
	}
	return (0);
}

// Assembly:
movb $0x1, %r8b
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rdx, %rcx
jae 0x4f6b
testb $0x1, %r8b
je 0x4f6b
movzbl (%rdi,%rcx), %r8d
movzbl (%rsi,%rcx), %r9d
cmpb %r9b, %r8b
jne 0x4f65
testl %r8d, %r8d
setne %r8b
incq %rcx
jmp 0x4f3f
subl %r9d, %r8d
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strcmp.c
// Function: ft_strcmp
size_t	ft_strcmp(char *s1, char *s2)
{
	while (*s2)
	{
		if (*s1 != *s2)
			return (0);
		s1++;
		s2++;
	}
	if (*s1 != *s2)
		return (0);
	return (1);
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
movb (%rsi,%rcx), %r8b
movb (%rdi,%rcx), %dl
testb %r8b, %r8b
je 0x4f86
cmpb %r8b, %dl
jne 0x4f8d
incq %rcx
jmp 0x4f70
xorl %eax, %eax
testb %dl, %dl
sete %al
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vdedios[P]minishell/libft/ft_strnstr.c
// Function: ft_strnstr
char	*ft_strnstr(const char *haystack, const char *needle, size_t len)
{
	int i;
	int j;

	i = 0;
	while (haystack[i] != '\0' && i < (int)len)
	{
		j = 0;
		while (needle[j] && haystack[i + j] == needle[j] && (i + j) < (int)len)
			j++;
		if (!needle[j])
			return ((char *)&haystack[i]);
		j = 0;
		i++;
	}
	if (!needle[0])
		return ((char *)haystack);
	return (NULL);
}

// Assembly:
movslq %edx, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jge 0x4fcf
cmpb $0x0, (%rdi,%rax)
je 0x4fcf
movq %rax, %rdx
movq %rsi, %r8
movb (%r8), %r9b
testb %r9b, %r9b
je 0x4fc8
cmpq %rcx, %rdx
jge 0x4fc3
incq %r8
leaq 0x1(%rdx), %r10
cmpb %r9b, (%rdi,%rdx)
movq %r10, %rdx
je 0x4fa6
incq %rax
jmp 0x4f95
addq %rax, %rdi
movq %rdi, %rax
retq
xorl %eax, %eax
cmpb $0x0, (%rsi)
cmoveq %rdi, %rax
retq