LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/historic/history.c
// Function: history_add
char	**history_add(char **old_h, char *line)
{
  char	**new_h;
  int	i;

  if ((new_h = malloc(sizeof(char *) * (my_tablen(old_h) + 2))) == NULL)
    return (NULL);
  new_h[0] = my_strdup(line);
  i = 0;
  while (old_h[i] != NULL)
    {
      new_h[i + 1] = old_h[i];
      i += 1;
    }
  new_h[i + 1] = NULL;
  if (*old_h != NULL)
    free(old_h);
  return (new_h);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x43d0
cltq
leaq 0x10(,%rax,8), %rdi
callq 0x2130
movq %rax, %r14
testq %rax, %rax
je 0x42f4
movq %r15, %rdi
callq 0x4960
movq %rax, (%r14)
xorl %eax, %eax
movq (%rbx,%rax), %rcx
testq %rcx, %rcx
je 0x42e0
movq %rcx, 0x8(%r14,%rax)
addq $0x8, %rax
jmp 0x42cc
andq $0x0, 0x8(%r14,%rax)
cmpq $0x0, (%rbx)
je 0x42f4
movq %rbx, %rdi
callq 0x2030
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/historic/history.c
// Function: print_historic
int	print_historic(t_info_shell *shell)
{
  shell->historic = reverse_tab(shell->historic);
  my_printf("%t", shell->historic);
  shell->historic = reverse_tab(shell->historic);
  return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x3da9
movq %rax, 0x28(%rbx)
leaq 0x2d0b(%rip), %rdi      # 0x7020
movq %rax, %rsi
xorl %eax, %eax
callq 0x5648
movq 0x28(%rbx), %rdi
callq 0x3da9
movq %rax, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/function.c
// Function: free_all
void		free_all(char *str, char **tab)
{
  int		i;

  i = 0;
  while (tab[i] != NULL)
    {
      free(tab[i]);
      i += 1;
    }
  free(tab);
  free(str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x438c
callq 0x2030
addq $0x8, %r15
jmp 0x4379
movq %r14, %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/function.c
// Function: my_strcmp
int		my_strcmp(char *s1, char *s2)
{
  int		i;

  i = 0;
  if (s1 == NULL || s2 == NULL)
    return (1);
  while ((s1[i] != '\0' && s2[i] != '\0' && s1[i] == s2[i]))
    i += 1;
  if (s1[i] != s2[i])
    return (1);
  return (0);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x43b5
pushq $0x1
popq %rax
retq
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %dl
testb %cl, %cl
je 0x43c8
incq %rax
cmpb %dl, %cl
je 0x43b7
xorl %eax, %eax
cmpb %dl, %cl
setne %al
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/function_two.c
// Function: init_struct
void		init_struct(t_info_shell *shell)
{
  shell->exit_value = 0;
  shell->alias_value = 0;
  if ((shell->historic = malloc(sizeof(char *) * 1)) == NULL)
    return ;
  shell->historic[0] = NULL;
  shell->path_save = get_path(environ, "PATH");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andl $0x0, 0x3c(%rdi)
andl $0x0, 0x44(%rdi)
pushq $0x8
popq %rdi
callq 0x2130
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x444f
andq $0x0, (%rax)
movq 0x6bac(%rip), %rax      # 0xafe8
movq (%rax), %rdi
leaq 0x2ced(%rip), %rsi      # 0x7133
callq 0x45e9
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/function_two.c
// Function: free_struct
void		free_struct(t_info_shell *shell)
{
  free_all(shell->command, shell->tab);
  free_all(shell->mem, shell->tab_mem);
  free_all(shell->path_save, shell->historic);
  free_all(NULL, shell->alias_tab);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x18(%rbx), %rsi
callq 0x436b
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x436b
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x436b
movq 0x30(%rbx), %rsi
xorl %edi, %edi
popq %rbx
jmp 0x436b
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_epurstr.c
// Function: my_epurstr
char	*my_epurstr(char *str)
{
  int	i;
  int	x;
  char	*str2;

  i = 0;
  x = 0;
  if ((str == NULL)
      || ((str2 = malloc(sizeof(char) * my_strlen(str) + 1)) == NULL))
    return (NULL);
  while (str[i] != '\0')
    {
      while (((str[i] == ' ' || str[i] == '\t') &&
	      (str[i + 1] == ' ' || str[i + 1] == '\t')))
	i++;
      if (str[i] == '\t')
	str[i] = ' ';
      str2[x++] = str[i++];
    }
  str2[x] = '\0';
  if (str2[x - 1] == ' ' || str2[x - 1] == '\t')
    str2[x - 1] = '\0';
  if ((*str2 == ' ' || *str2 == '\t'))
    str2++;
  free(str);
  return (str2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4521
movq %rdi, %rbx
callq 0x435c
movslq %eax, %rdi
incq %rdi
callq 0x2130
testq %rax, %rax
je 0x4521
movq %rax, %r14
xorl %eax, %eax
xorl %ecx, %ecx
movslq %ecx, %rcx
movb (%rbx,%rcx), %dl
testb %dl, %dl
je 0x4526
incq %rcx
cmpb $0x20, %dl
je 0x44e9
movzbl %dl, %esi
cmpl $0x9, %esi
jne 0x44fe
movzbl (%rbx,%rcx), %esi
cmpl $0x20, %esi
je 0x44f7
cmpl $0x9, %esi
jne 0x4507
incq %rcx
movl %esi, %edx
jmp 0x44dc
leaq (%rbx,%rcx), %rsi
decq %rsi
jmp 0x4516
leaq (%rbx,%rcx), %rsi
decq %rsi
cmpb $0x9, %dl
jne 0x4516
movb $0x20, (%rsi)
movb (%rsi), %dl
movb %dl, (%r14,%rax)
incq %rax
jmp 0x44cf
xorl %r14d, %r14d
jmp 0x455c
movl %eax, %eax
movb $0x0, (%r14,%rax)
movzbl -0x1(%r14,%rax), %ecx
cmpl $0x20, %ecx
je 0x453d
cmpl $0x9, %ecx
jne 0x4543
movb $0x0, -0x1(%r14,%rax)
movzbl (%r14), %eax
cmpl $0x20, %eax
je 0x4551
cmpl $0x9, %eax
jne 0x4554
incq %r14
movq %rbx, %rdi
callq 0x2030
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_path.c
// Function: search_path
int		search_path(char **my_env, char *key)
{
  t_count	ct;
  char		*mem;

  ct.i = 0;
  while (my_env[ct.i] != NULL)
    {
      ct.j = 0;
      ct.k = 0;
      if ((mem = malloc(sizeof(char) * my_strlen(my_env[ct.i]))) == NULL)
	return (84);
      while (my_env[ct.i][ct.j] != '=')
	{
	  mem[ct.k++] = my_env[ct.i][ct.j++];
	}
      mem[ct.k] = '\0';
      if (my_strcmp(mem, key) == 0)
	{
	  free(mem);
	  return (ct.i);
	}
      free(mem);
      ct.i += 1;
    }
  return (84);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
pushq $0x54
popq %rbx
movq (%r15,%r13,8), %rdi
testq %rdi, %rdi
je 0x45dd
callq 0x435c
movslq %eax, %rdi
callq 0x2130
testq %rax, %rax
je 0x45dd
movq %rax, %r12
movq (%r15,%r13,8), %rcx
xorl %eax, %eax
movb (%rcx,%rax), %dl
cmpb $0x3d, %dl
je 0x45b2
movb %dl, (%r12,%rax)
incq %rax
jmp 0x45a1
movl %eax, %eax
movb $0x0, (%r12,%rax)
movq %r12, %rdi
movq %r14, %rsi
callq 0x43a1
movq %r12, %rdi
testl %eax, %eax
je 0x45d5
callq 0x2030
incq %r13
jmp 0x457d
callq 0x2030
movl %r13d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_path.c
// Function: get_path
char		*get_path(char **my_env, char *key)
{
  int		i;
  int		j;
  int		k;
  char		*tmp;

  i = search_path(my_env, key);
  if (i == 84)
    return (NULL);
  j = 0;
  k = 0;
  if ((tmp = malloc(sizeof(char) * my_strlen(my_env[i] + 1))) == NULL)
    return (NULL);
  while (my_env[i][j - 1] != '=')
    j += 1;
  while (my_env[i][j] != '\0')
    {
      tmp[k++] = my_env[i][j++];
    }
  tmp[k] = '\0';
  return (tmp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4568
cmpl $0x54, %eax
je 0x463a
movslq %eax, %r14
movq (%rbx,%r14,8), %rdi
incq %rdi
callq 0x435c
movslq %eax, %rdi
callq 0x2130
testq %rax, %rax
je 0x463a
movq (%rbx,%r14,8), %rcx
decq %rcx
cmpb $0x3d, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x461d
xorl %edx, %edx
movb (%rcx,%rdx), %sil
testb %sil, %sil
je 0x463e
movb %sil, (%rax,%rdx)
incq %rdx
jmp 0x4628
xorl %eax, %eax
jmp 0x4644
movl %edx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/get_next_line.c
// Function: get_next_line
char		*get_next_line(const int fd)
{
  static int	size = 1;
  static char	*mem = NULL;
  char		buff[READ_SIZE + 1];
  char		*line;

  line = NULL;
  while (size != 0 && my_str_contain(line, '\n') == -1)
    {
      if ((size = read(fd, buff, READ_SIZE)) == -1)
	return (NULL);
      buff[size] = '\0';
      if ((line = my_strcat(line, buff, 1)) == NULL)
	return (NULL);
    }
  if ((line = get_line(line, &mem)) == NULL)
    return (NULL);
  if (my_strlen(line) == 0 && size == 0)
    return (NULL);
  return (line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
xorl %r14d, %r14d
leaq 0x6(%rsp), %r15
pushq $0x1
popq %r12
pushq $0x1
popq %r13
xorl %ebx, %ebx
cmpl $0x0, 0x6a9e(%rip)      # 0xb110
je 0x46bf
movq %rbx, %rdi
callq 0x4766
cmpl $-0x1, %eax
jne 0x46bf
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2100
movl %eax, 0x6a7c(%rip)      # 0xb110
cmpl $-0x1, %eax
je 0x4754
cltq
movb $0x0, 0x6(%rsp,%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x4abc
movq %rax, %rbx
testq %rax, %rax
jne 0x466b
jmp 0x4754
cmpb $0x0, (%rbx)
je 0x4751
movq 0x6b39(%rip), %rdi      # 0xb208
testq %rdi, %rdi
je 0x46f1
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4abc
testq %rax, %rax
je 0x4754
movq %rax, %rbx
andq $0x0, 0x6b17(%rip)      # 0xb208
movq %rbx, %rdi
callq 0x4766
cltq
movb $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x435c
cltq
leaq (%rbx,%rax), %r15
incq %r15
movq %r15, %rdi
callq 0x435c
xorl %r14d, %r14d
testl %eax, %eax
cmoveq %r14, %r15
pushq $0x2
popq %rdx
xorl %edi, %edi
movq %r15, %rsi
callq 0x4abc
movq %rax, 0x6ad3(%rip)      # 0xb208
testq %rax, %rax
je 0x4754
movq %rbx, %rdi
callq 0x435c
xorl %r14d, %r14d
orl 0x69c5(%rip), %eax      # 0xb110
cmovneq %rbx, %r14
jmp 0x4754
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/get_next_line.c
// Function: my_str_contain
static int	my_str_contain(char *str, char rep)
{
  size_t	i;

  i = 0;
  if (str != NULL)
    while (str[i] != '\0')
      {
	if (str[i] == rep)
	  return (i);
	i += 1;
      }
  return (-1);
}

// Assembly:
pushq $-0x1
popq %rax
testq %rdi, %rdi
je 0x4784
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
testl %edx, %edx
je 0x4784
cmpl $0xa, %edx
je 0x4782
incq %rcx
jmp 0x4770
movl %ecx, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_str_to_wordtab.c
// Function: count_words
int		count_words(const char *str, char sep)
{
  int		words;
  int		i;

  i = 0;
  words = 1;
  while (str[0] == sep)
    str = str + 1;
  while (str[i] != '\0')
    {
      if (str[i] == sep)
	{
	  while (str[i] == sep)
	    i = i + 1;
	  words = words + 1;
	}
      if (str[i] != '\0')
	i = i + 1;
    }
  if (i != 0 && str[i - 1] == sep)
    words = words - 1;
  return (words);
}

// Assembly:
decq %rdi
movb 0x1(%rdi), %r9b
incq %rdi
cmpb %sil, %r9b
je 0x478b
xorl %edx, %edx
pushq $0x1
popq %rcx
movl %ecx, %eax
movslq %edx, %r8
testb %r9b, %r9b
je 0x47e2
cmpb %sil, %r9b
jne 0x47d3
leal -0x1(%r8), %edx
addq %rdi, %r8
incl %edx
leaq 0x1(%r8), %r9
cmpb %sil, (%r8)
movq %r9, %r8
je 0x47b2
incl %eax
movslq %edx, %r9
xorl %r8d, %r8d
cmpb $0x0, (%rdi,%r9)
setne %r8b
jmp 0x47d6
movl %ecx, %r8d
addl %r8d, %edx
movslq %edx, %r8
movb (%rdi,%r8), %r9b
jmp 0x479e
testl %edx, %edx
je 0x47f2
xorl %ecx, %ecx
cmpb %sil, -0x1(%r8,%rdi)
sete %cl
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_str_to_wordtab.c
// Function: alloc_line
char		*alloc_line(const char *str, char sep, int *i)
{
  char		*line;
  int		tmp;
  int		len;

  tmp = *i;
  len = 0;
  while (str[*i] != '\0' && str[*i] != sep)
    {
      *i = *i + 1;
      len = len + 1;
    }
  if ((line = malloc(sizeof(char) * (len + 1))) == NULL)
    return (NULL);
  len = 0;
  while (tmp < *i)
    line[len++] = str[tmp++];
  line[len] = '\0';
  if (str[*i] != '\0')
    *i = *i + 1;
  return (line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl (%rdx), %r12d
movslq %r12d, %r13
movq %r12, %rbp
shlq $0x20, %rbp
leaq (%rdi,%r13), %rax
pushq $0x1
popq %r14
movabsq $0x100000000, %rcx      # imm = 0x100000000
movb -0x1(%rax,%r14), %r15b
testb %r15b, %r15b
je 0x483d
cmpb %sil, %r15b
je 0x483d
leal (%r12,%r14), %edx
movl %edx, (%rbx)
addq %rcx, %rbp
incq %r14
jmp 0x4820
movq %rdi, (%rsp)
movq %r14, %rdi
callq 0x2130
testq %rax, %rax
je 0x487a
sarq $0x20, %rbp
movq %rax, %rcx
movq (%rsp), %rsi
cmpq %rbp, %r13
jge 0x486c
movb (%rsi,%r13), %dl
incq %r13
movb %dl, (%rcx)
incq %rcx
jmp 0x4859
movb $0x0, (%rcx)
testb %r15b, %r15b
je 0x487a
addl %r12d, %r14d
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_str_to_wordtab.c
// Function: my_str_to_wordtab
char		**my_str_to_wordtab(const char *str, char sep)
{
  char		**tab;
  int		words;
  int		i;
  int		j;

  i = 0;
  j = 0;
  if (str == NULL)
    return (NULL);
  words = count_words(str, sep);
  if ((tab = malloc(sizeof(char *) * (words + 1))) == NULL)
    return (NULL);
  while (i < words)
    {
      while (str[j] == sep)
	j = j + 1;
      if ((tab[i] = alloc_line(str, sep, &j)) == NULL)
	return (NULL);
      i = i + 1;
    }
  tab[i] = NULL;
  return (tab);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andl $0x0, 0x4(%rsp)
testq %rdi, %rdi
je 0x490f
movl %esi, %ebx
movq %rdi, %r14
movsbl %bl, %ebp
movl %ebp, %esi
callq 0x4788
movl %eax, %r12d
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2130
movq %rax, %r15
xorl %eax, %eax
testq %r15, %r15
je 0x490f
testl %r12d, %r12d
cmovlel %eax, %r12d
xorl %r13d, %r13d
cmpq %r12, %r13
je 0x4924
movslq 0x4(%rsp), %rax
leal -0x1(%rax), %ecx
addq %r14, %rax
incl %ecx
leaq 0x1(%rax), %rdx
cmpb %bl, (%rax)
movq %rdx, %rax
je 0x48e3
movl %ecx, 0x4(%rsp)
movq %r14, %rdi
movl %ebp, %esi
leaq 0x4(%rsp), %rdx
callq 0x47f3
movq %rax, (%r15,%r13,8)
incq %r13
testq %rax, %rax
jne 0x48d3
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, (%r15,%r12,8)
jmp 0x4912
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_strdup.c
// Function: my_strdup
char	*my_strdup(char *src)
{
  int	i;
  char	*copy;

  i = 0;
  if (src == NULL)
    return (NULL);
  if ((copy = malloc(sizeof(char) * (my_strlen(src) + 1))) == NULL)
    return (NULL);
  while (src[i] != '\0')
    {
      copy[i] = src[i];
      i = i + 1;
    }
  copy[i] = '\0';
  return (copy);
}

// Assembly:
testq %rdi, %rdi
je 0x4994
pushq %rbx
movq %rdi, %rbx
callq 0x435c
incl %eax
movslq %eax, %rdi
callq 0x2130
testq %rax, %rax
je 0x4997
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
testb %dl, %dl
je 0x498e
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x497f
movb $0x0, (%rax,%rcx)
jmp 0x4999
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/read_file.c
// Function: read_file
char		*read_file(char *path)
{
  char		*my_file;
  int		fd;
  char		buffer[2];

  buffer[1] = '\0';
  my_file = NULL;
  if ((fd = open(path, O_RDONLY)) == -1)
    {
      my_printf("%s: %s", path, NO_SUCH_FILE);
      return (NULL);
    }
  while (read(fd, buffer, 1) != 0)
    my_file = my_strcat(my_file, buffer, 1);
  close(fd);
  return (my_file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movb $0x0, 0xf(%rsp)
xorl %esi, %esi
xorl %eax, %eax
callq 0x2150
cmpl $-0x1, %eax
je 0x49fd
movl %eax, %ebp
xorl %ebx, %ebx
leaq 0xe(%rsp), %r14
pushq $0x1
popq %r15
pushq $0x1
popq %r12
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2100
testq %rax, %rax
je 0x49f4
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x4abc
movq %rax, %rbx
jmp 0x49cf
movl %ebp, %edi
callq 0x20d0
jmp 0x4a17
leaq 0x27e0(%rip), %rdi      # 0x71e4
leaq 0x2663(%rip), %rdx      # 0x706e
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x5648
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/command_verif.c
// Function: pipe_verif
int		pipe_verif(t_info_shell *shell)
{
  int		i;
  char		*command;

  i = 0;
  command = shell->command;
  while (command[i] != '\0')
    {
      if (command[i] != '|')
        return (0);
      i += 1;
    }
  my_printf("%s", INVALID_NULL);
  shell->exit_value = 1;
  return (1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %ecx
cmpl $0x7c, %ecx
jne 0x4a3c
incq %rax
jmp 0x4a2f
testl %ecx, %ecx
jne 0x4a61
leaq 0x27a1(%rip), %rdi      # 0x71e8
leaq 0x287d(%rip), %rsi      # 0x72cb
xorl %eax, %eax
callq 0x5648
movl $0x1, 0x3c(%rbx)
pushq $0x1
popq %rax
jmp 0x4a63
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_strcat.c
// Function: my_strcat
char		*my_strcat(char *dest, char *src, int bhv)
{
  size_t	i;
  size_t	j;
  char		*new;

  i = (dest != NULL) ? my_strlen(dest) : 0;
  j = (src != NULL) ? my_strlen(src) : 0;
  if ((new = malloc(sizeof(char) * (i + j + 1))) == NULL)
    return (NULL);
  i = 0;
  j = 0;
  if (dest != NULL)
    while (dest[i] != '\0')
      {
        new[i] = dest[i];
        i += 1;
      }
  new[i] = '\0';
  if (src != NULL)
    while (src[j] != '\0')
      new[i++] = src[j++];
  new[i] = '\0';
  if (bhv == 2)
    return (new);
  (bhv == 0) ? (free(dest), free(src)) : (free(dest));
  return (new);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x4ae0
movq %r14, %rdi
callq 0x435c
movslq %eax, %r15
incq %r15
jmp 0x4ae4
pushq $0x1
popq %r15
testq %rbx, %rbx
je 0x4af5
movq %rbx, %rdi
callq 0x435c
cltq
jmp 0x4af7
xorl %eax, %eax
addq %rax, %r15
movq %r15, %rdi
callq 0x2130
movq %rax, %r15
testq %rax, %rax
je 0x4b64
xorl %eax, %eax
testq %r14, %r14
jne 0x4b1a
jmp 0x4b22
movb %cl, (%r15,%rax)
incq %rax
movb (%r14,%rax), %cl
testb %cl, %cl
jne 0x4b13
movb $0x0, (%r15,%rax)
testq %rbx, %rbx
je 0x4b41
movq %rbx, %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x4b41
movb %dl, (%r15,%rax)
incq %rax
incq %rcx
jmp 0x4b2f
movb $0x0, (%r15,%rax)
cmpl $0x2, %ebp
je 0x4b64
testl %ebp, %ebp
jne 0x4b59
movq %r14, %rdi
callq 0x2030
jmp 0x4b5c
movq %r14, %rbx
movq %rbx, %rdi
callq 0x2030
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/command_normed.c
// Function: command_normed
char		*command_normed(char *command, char sep)
{
  int		i;
  int		j;
  char		*str;

  if ((str = malloc(sizeof(char) * my_strlen(command)
                    + my_count(command, sep) + 1)) == NULL)
    return (NULL);
  i = -1;
  j = 0;
  while (command[++i] != '\0')
    {
      if ((command[i] == sep) && i != 0 &&(command[i - 1] != ' '))
        str[j++] = ' ';
      str[j] = command[i];
      if ((command[i] == sep) && (command[i + 1] != ' ') && command[i + 1] != 0)
        str[j++ + 1] = ' ';
      j += 1;
    }
  str[j] = '\0';
  if ((str = clean_pipes(str, '|')) == NULL)
    return (NULL);
  if ((str = clean_pipes(str, '&')) == NULL)
    return (NULL);
  return (str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x435c
movslq %eax, %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x43e8
cltq
leaq (%r15,%rax), %rdi
incq %rdi
callq 0x2130
testq %rax, %rax
je 0x4c22
xorl %ecx, %ecx
xorl %edx, %edx
movb (%r14,%rcx), %sil
movslq %edx, %rdi
testb %sil, %sil
je 0x4bfe
cmpb %bl, %sil
setne %r8b
testq %rcx, %rcx
sete %r9b
orb %r8b, %r9b
jne 0x4bd5
cmpb $0x20, -0x1(%r14,%rcx)
je 0x4bd5
leal 0x1(%rdi), %edx
movb $0x20, (%rax,%rdi)
movslq %edx, %rdi
movb %sil, (%rax,%rdi)
cmpb %bl, %sil
jne 0x4bf7
movzbl 0x1(%r14,%rcx), %esi
testb $-0x21, %sil
je 0x4bf7
movb $0x20, 0x1(%rax,%rdi)
incq %rdi
movl %edi, %edx
incl %edx
incq %rcx
jmp 0x4ba7
movb $0x0, (%rax,%rdi)
pushq $0x7c
popq %rsi
movq %rax, %rdi
callq 0x531b
testq %rax, %rax
je 0x4c22
pushq $0x26
popq %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x531b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/tab/tabulation.c
// Function: sort_dir
char		**sort_dir(char *command)
{
  int		i;
  int		j;
  int		size;
  char		**dir;
  char		**new_tab;

  i = 0;
  size = 0;
  j = 0;
  if (((dir = my_ls(".", &size)) == NULL)
      || ((new_tab = malloc(sizeof(char *) * size + 1)) == NULL))
    return (NULL);
  while (dir[i] != NULL)
    {
      if (my_find_str(dir[i], command) == 1)
	new_tab[j++] = my_strdup(dir[i]);
      i += 1;
    }
  new_tab[j] = NULL;
  free_all(NULL, dir);
  return (new_tab);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x2406(%rip), %rdi      # 0x704f
callq 0x4d7e
testq %rax, %rax
je 0x4ca6
movq %rax, %r15
movslq 0x4(%rsp), %rax
leaq 0x1(,%rax,8), %rdi
callq 0x2130
xorl %r13d, %r13d
testq %rax, %rax
je 0x4ca6
movq %rax, %r14
movq %r15, %r12
movq (%r12), %rdi
movslq %r13d, %rbp
testq %rdi, %rdi
je 0x4cab
movq %rbx, %rsi
callq 0x4330
cmpl $0x1, %eax
jne 0x4ca0
movq (%r12), %rdi
callq 0x4960
leal 0x1(%rbp), %r13d
movq %rax, (%r14,%rbp,8)
addq $0x8, %r12
jmp 0x4c76
xorl %r14d, %r14d
jmp 0x4cba
andq $0x0, (%r14,%rbp,8)
xorl %edi, %edi
movq %r15, %rsi
callq 0x436b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/tab/tabulation.c
// Function: tabulation
void		tabulation(char *command)
{
  char		**tab;
  int		i;

  i = 0;
  tab = sort_dir(command);
  if (my_tablen(tab) == 1)
    {
      while (command[i] == *tab[i])
	i += 1;
      while (*tab[i] != '\0')
	{
	  write(0, &(*tab[i]), 1);
	  i += 1;
	}
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x4c2c
movq %rax, %rbx
movq %rax, %rdi
callq 0x43d0
cmpl $0x1, %eax
jne 0x4d1a
movq (%rbx), %rsi
movb (%rsi), %al
addq $0x8, %rbx
leaq 0x1(%r14), %rcx
cmpb %al, (%r14)
movq %rcx, %r14
je 0x4ce8
pushq $0x1
popq %r14
testb %al, %al
je 0x4d1a
xorl %edi, %edi
movq %r14, %rdx
callq 0x2070
movq (%rbx), %rsi
movb (%rsi), %al
addq $0x8, %rbx
jmp 0x4d01
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/tab/my_ls.c
// Function: dir_len
int		dir_len(char *path, int nb)
{
  struct dirent *ptr;
  int		i;
  DIR		*dir;

  i = 0;
  if (((dir = opendir(path)) == NULL) || ((ptr = readdir(dir)) == NULL))
    return (84);
  while (ptr != NULL)
    {
      if (nb != 0)
	{
	  if ((ptr->d_name)[0] != '.')
	    i += 1;
	}
      else if (nb == 0)
	i += 1;
      ptr = readdir(dir);
    }
  return (i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
callq 0x2080
pushq $0x54
popq %rbp
testq %rax, %rax
je 0x4d71
movq %rax, %r14
movq %rax, %rdi
callq 0x2120
testq %rax, %rax
je 0x4d71
xorl %ebp, %ebp
pushq $0x1
popq %r15
testq %rax, %rax
je 0x4d71
movl %r15d, %ecx
testl %ebx, %ebx
je 0x4d65
xorl %ecx, %ecx
cmpb $0x2e, 0x13(%rax)
setne %cl
addl %ecx, %ebp
movq %r14, %rdi
callq 0x2120
jmp 0x4d50
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/tab/my_ls.c
// Function: my_ls
char		**my_ls(char *path, int *size)
{
  struct dirent *ptr;
  int		i;
  DIR		*dir;
  char		**tab;
  int		len;

  i = 0;
  if ((len = dir_len(path, 0) + 1) == 84)
    return (NULL);
  *size = len;
  if ((tab = malloc(sizeof(char *) * len + 1)) == NULL)
    return (NULL);
  if (((dir = opendir(path)) == NULL) || ((ptr = readdir(dir)) == NULL))
    return (NULL);
  while (ptr != NULL)
    {
      tab[i++] = my_strdup(ptr->d_name);
      ptr = readdir(dir);
    }
  closedir(dir);
  tab[i] = NULL;
  return (tab);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x4d24
incl %eax
cmpl $0x54, %eax
je 0x4e09
movl %eax, (%r15)
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2130
testq %rax, %rax
je 0x4df5
movq %rax, %rbx
movq %r14, %rdi
callq 0x2080
testq %rax, %rax
je 0x4df5
movq %rax, %r14
movq %rax, %rdi
callq 0x2120
testq %rax, %rax
je 0x4df5
xorl %r15d, %r15d
testq %rax, %rax
je 0x4df9
addq $0x13, %rax
movq %rax, %rdi
callq 0x4960
movq %rax, (%rbx,%r15,8)
incq %r15
movq %r14, %rdi
callq 0x2120
jmp 0x4dd3
xorl %ebx, %ebx
jmp 0x4e09
movq %r14, %rdi
callq 0x20f0
movl %r15d, %eax
andq $0x0, (%rbx,%rax,8)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/command_bonus/repeat.c
// Function: repeat_check
int		repeat_check(t_info_shell *shell)
{
  int		i;

  i = my_tablen(shell->tab);
  if ((i == 1) || (i == 2))
    {
      my_printf("repeat: Too few arguments.\n");
      shell->exit_value = 1;
      return (84);
    }
  if (my_strcmp("repeat", shell->tab[0]) != 0)
    return (84);
  if (my_strisnum(shell->tab[1]) != 0)
    {
      my_printf("repeat: Badly formed number.\n");
      shell->exit_value = 1;
      return (84);
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x43d0
decl %eax
pushq $0x54
popq %rbp
cmpl $0x2, %eax
jae 0x4e5c
leaq 0x2496(%rip), %rdi      # 0x72e2
xorl %eax, %eax
callq 0x5648
movl $0x1, 0x3c(%rbx)
jmp 0x4e73
movq 0x18(%rbx), %rax
movq (%rax), %rsi
leaq 0x2365(%rip), %rdi      # 0x71cf
callq 0x43a1
testl %eax, %eax
je 0x4e7c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x4e14
testl %eax, %eax
je 0x4e96
leaq 0x246a(%rip), %rdi      # 0x72fe
jmp 0x4e4c
xorl %ebp, %ebp
jmp 0x4e73
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/command_bonus/repeat.c
// Function: cut_my_string
char		*cut_my_string(char *command)
{
  int		i;
  int		j;
  char		*new_command;

  new_command = malloc(sizeof(char) * my_strlen(command) + 1);
  i = 7;
  j = 0;
  while (command[i] != ' ')
    i += 1;
  while (command[i] != '\0')
    {
      new_command[j] = command[i];
      i += 1;
      j += 1;
    }
  new_command[j] = '\0';
  return (new_command);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x435c
movslq %eax, %rdi
incq %rdi
callq 0x2130
addq $0x7, %rbx
cmpb $0x20, (%rbx)
leaq 0x1(%rbx), %rbx
jne 0x4eb2
movb $0x20, %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x4ece
movb %dl, (%rax,%rcx)
movb (%rbx,%rcx), %dl
incq %rcx
jmp 0x4ebf
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/command_bonus/repeat.c
// Function: repeat
int		repeat(t_info_shell *shell)
{
  int		i;
  int		nb;
  char		**save_tab;
  char		*save_string;

  i = 0;
  if ((repeat_check(shell)) != 0)
    return (84);
  nb = atoi(shell->tab[1]);
  if ((nb == 0) || (nb < 0))
    return (0);
  save_tab = cut_my_tab(shell->tab);
  save_string = cut_my_string(shell->command);
  while (i < nb)
    {
      shell->command = save_string;
      shell->tab = save_tab;
      execution_in_chain(shell);
      i += 1;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4e2c
testl %eax, %eax
je 0x4f01
pushq $0x54
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %r12
movq 0x8(%r12), %rdi
callq 0x2180
xorl %ebp, %ebp
testl %eax, %eax
jle 0x4ef0
movl %eax, %r14d
movq %r12, %rdi
callq 0x43d0
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x2130
movq %rax, %r15
testq %rax, %rax
je 0x4f57
xorl %r13d, %r13d
movq 0x10(%r12,%r13,8), %rdi
testq %rdi, %rdi
je 0x4f4f
callq 0x4960
movq %rax, (%r15,%r13,8)
incq %r13
jmp 0x4f37
movl %r13d, %eax
andq $0x0, (%r15,%rax,8)
movq (%rbx), %rdi
callq 0x4e9a
movq %rax, %r12
subl $0x1, %r14d
jb 0x4ef0
movq %r12, (%rbx)
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0x3185
jmp 0x4f62
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/command_bonus/which.c
// Function: verif_path
void		verif_path(t_info_shell *shell, int ptr)
{
  char		*path;

  if (my_strcmp(shell->tab[0], "echo") == 0)
    {
      my_printf("echo: shell built-in command.\n");
      ptr = 1;
    }
  if (ptr == 0)
    {
      if ((path = is_valid_command(shell)) != NULL)
	my_printf("%s\n", path);
      else
	{
	  my_printf("%s: %s", shell->tab[0], COMMAND_ERROR);
	  shell->exit_value = 1;
	}
    }
  ptr = 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq (%rax), %rdi
leaq 0x2375(%rip), %rsi      # 0x7337
callq 0x43a1
testl %eax, %eax
je 0x4fd6
testl %ebp, %ebp
je 0x4fea
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x235f(%rip), %rdi      # 0x733c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5648
movq %rbx, %rdi
callq 0x2efc
testq %rax, %rax
je 0x500e
leaq 0x23b1(%rip), %rdi      # 0x73af
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5648
movq 0x18(%rbx), %rax
movq (%rax), %rsi
leaq 0x21c8(%rip), %rdi      # 0x71e4
leaq 0x21c8(%rip), %rdx      # 0x71eb
xorl %eax, %eax
callq 0x5648
movl $0x1, 0x3c(%rbx)
jmp 0x4fcf
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/command_bonus/which.c
// Function: which
int		which(t_info_shell *shell)
{
  int		i;
  int		ptr;

  ptr = 0;
  if ((which_verif(shell)) != 0)
    return (84);
  while (1)
    {
      i = 0;
      if ((shell->tab = cut_my_tab(shell)) == NULL)
	break ;
      while (i < 10)
	{
	  if (my_strcmp(shell->tab[0], g_key[i].code) == 0)
	    {
	      my_printf("%s: shell built-in comand.\n", g_key[i].code);
	      ptr = 1;
	    }
	  i += 1;
	}
      verif_path(shell, ptr);
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4f7c
testl %eax, %eax
je 0x5052
pushq $0x54
popq %rax
jmp 0x510c
leaq 0x5c57(%rip), %r12      # 0xacb0
pushq $0x1
popq %r13
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
callq 0x43d0
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2130
testq %rax, %rax
je 0x5105
movq %rax, %r15
movq 0x18(%rbx), %rax
cmpq $0x0, 0x8(%rax)
je 0x5105
xorl %r14d, %r14d
movq 0x8(%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x50ad
callq 0x4960
movq %rax, (%r15,%r14,8)
incq %r14
movq 0x18(%rbx), %rax
jmp 0x5091
movl %r14d, %eax
andq $0x0, (%r15,%rax,8)
movq %r15, 0x18(%rbx)
xorl %r14d, %r14d
cmpq $0xa0, %r14
je 0x50f6
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movq (%r14,%r12), %r15
movq %r15, %rsi
callq 0x43a1
testl %eax, %eax
jne 0x50f0
leaq 0x2278(%rip), %rdi      # 0x735b
movq %r15, %rsi
xorl %eax, %eax
callq 0x5648
movl %r13d, %ebp
addq $0x10, %r14
jmp 0x50bc
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4fac
jmp 0x505f
andq $0x0, 0x18(%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/MaxenceEpitech[P]42sh/command_bonus/where.c
// Function: where
int		where(t_info_shell *shell)
{
  int		i;
  char		*path;

  if ((where_verif(shell)) != 0)
    return (84);
  while (1)
    {
      i = 0;
      if ((shell->tab = cut_my_tab(shell)) == NULL)
	break ;
      while (i < 10)
	{
	  if (my_strcmp(shell->tab[0], g_key[i].code) == 0)
	    my_printf("%s: shell built-in comand.\n", g_key[i].code);
	  i += 1;
	}
      if (my_strcmp(shell->tab[0], "echo") == 0)
	my_printf("echo is a shell built-in\n");
      if ((path = is_valid_command(shell)) != NULL)
	my_printf("%s\n%s\n", path, cut_string(path));
      else
	shell->exit_value = 1;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x511c
testl %eax, %eax
je 0x516b
pushq $0x54
popq %rax
jmp 0x52b1
leaq 0x21c5(%rip), %r14      # 0x7337
leaq 0x5bd7(%rip), %r15      # 0xad50
leaq 0x21db(%rip), %r13      # 0x735b
movq 0x18(%rbx), %rdi
callq 0x43d0
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2130
testq %rax, %rax
je 0x52aa
movq %rax, %rbp
movq 0x18(%rbx), %rax
cmpq $0x0, 0x8(%rax)
je 0x52aa
xorl %r12d, %r12d
movq 0x8(%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x51d3
callq 0x4960
movq %rax, (%rbp,%r12,8)
incq %r12
movq 0x18(%rbx), %rax
jmp 0x51b6
movl %r12d, %eax
andq $0x0, (%rbp,%rax,8)
movq %rbp, 0x18(%rbx)
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq (%rax), %rdi
cmpq $0xa0, %r12
je 0x5216
movq (%r12,%r15), %rbp
movq %rbp, %rsi
callq 0x43a1
testl %eax, %eax
jne 0x5210
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x5648
addq $0x10, %r12
jmp 0x51e3
movq %r14, %rsi
callq 0x43a1
testl %eax, %eax
jne 0x5230
leaq 0x2169(%rip), %rdi      # 0x7392
xorl %eax, %eax
callq 0x5648
movq %rbx, %rdi
callq 0x2efc
testq %rax, %rax
je 0x529e
movq %rax, %rbp
movq %rax, %rdi
callq 0x435c
movslq %eax, %rdi
callq 0x2130
testq %rax, %rax
je 0x5285
xorl %ecx, %ecx
cmpb $0x2f, 0x1(%rbp,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x5257
addq %rbp, %rcx
incq %rcx
movb $0x2f, %sil
xorl %edx, %edx
testb %sil, %sil
je 0x527f
movb %sil, (%rax,%rdx)
movb (%rcx,%rdx), %sil
incq %rdx
jmp 0x526d
movl %edx, %ecx
movb $0x0, (%rax,%rcx)
leaq 0x2120(%rip), %rdi      # 0x73ac
movq %rbp, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5648
jmp 0x5180
movl $0x1, 0x3c(%rbx)
jmp 0x5180
andq $0x0, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_clean_pipes.c
// Function: add_a_space
char	*add_a_space(char *str, int pos)
{
  char	*new_str;
  int	i;

  i = 0;
  if ((new_str = malloc(sizeof(char)
			* (my_strlen(str) + 2))) == NULL)
    return (NULL);
  while (i != pos)
    {
      new_str[i] = str[i];
      i++;
    }
  new_str[i] = ' ';
  while (str[i] != 0)
    {
      new_str[i + 1] = str[i];
      i++;
    }
  new_str[i + 1] = 0;
  free(str);
  return (new_str);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x435c
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2130
movq %rax, %r14
testq %rax, %rax
je 0x5313
movl %ebp, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x52f6
movb (%rbx,%rcx), %dl
movb %dl, (%r14,%rcx)
incq %rcx
jmp 0x52e5
movb $0x20, %cl
movb %cl, (%r14,%rax)
movb (%rbx,%rax), %cl
incq %rax
testb %cl, %cl
jne 0x52f8
movb $0x0, (%r14,%rax)
movq %rbx, %rdi
callq 0x2030
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_clean_pipes.c
// Function: clean_pipes
char	*clean_pipes(char *str, char c)
{
  int	i;

  i = 0;
  while (str[i + 1] != 0)
    {
      if ((str[i] == c && str[i + 1] != c && str[i + 1] != ' '))
	if ((str = add_a_space(str, i + 1)) == NULL)
	  return (NULL);
      if ((i > 0 && str[i] == c && str[i - 1] != c && str[i - 1] != ' '))
	if ((str = add_a_space(str, i)) == NULL)
	  return (NULL);
      i++;
    }
  if ((str[i] == '|' && str[i + 1] == 0))
    if ((str = add_a_space(str, i)) == NULL)
      return (NULL);
  return (str);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rax
xorl %ebx, %ebx
movb 0x1(%rax,%rbx), %cl
testb %cl, %cl
je 0x5380
cmpb $0x20, %cl
je 0x534d
cmpb %bpl, %cl
je 0x534d
cmpb %bpl, (%rax,%rbx)
jne 0x534d
leal 0x1(%rbx), %esi
movq %rax, %rdi
callq 0x52c0
testq %rax, %rax
je 0x5398
testq %rbx, %rbx
je 0x537b
cmpb %bpl, (%rax,%rbx)
jne 0x537b
movb -0x1(%rax,%rbx), %cl
cmpb %bpl, %cl
sete %dl
cmpb $0x20, %cl
sete %cl
orb %dl, %cl
jne 0x537b
movq %rax, %rdi
movl %ebx, %esi
callq 0x52c0
testq %rax, %rax
je 0x5398
incq %rbx
jmp 0x5325
movl %ebx, %ecx
cmpb $0x7c, (%rax,%rcx)
jne 0x539a
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x52c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: special_strdup
char		*special_strdup(char *str)
{
  int		i;
  int		j;
  char		*new_str;

  if ((new_str = malloc(sizeof(char)
			* (my_strlen(str) - 2) + 1)) == NULL)
    return (NULL);
  i = 1;
  j = 0;
  while (str[i + 1] != '\0')
    {
      new_str[j] = str[i];
      i += 1;
      j += 1;
    }
  new_str[j] = '\0';
  return (new_str);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x435c
movslq %eax, %rdi
decq %rdi
callq 0x2130
testq %rax, %rax
je 0x53f6
xorl %ecx, %ecx
cmpb $0x0, 0x2(%rbx,%rcx)
je 0x53f0
movb 0x1(%rbx,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x53dd
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: check_magic_quote
int		check_magic_quote(t_info_shell *shell, char *str)
{
  char		**tab;
  char		**save;

  if ((tab = malloc(sizeof(char *) * 2)) == NULL)
    return (84);
  if ((tab[0] = special_strdup(str)) == NULL)
    return (84);
  tab[1] = NULL;
  save = shell->tab;
  shell->tab = tab;
  if (is_valid_command(shell) == NULL)
    my_printf("%s: %s", tab[0], COMMAND_ERROR);
  shell->tab = save;
  free_all(NULL, tab);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x2130
pushq $0x54
popq %r15
testq %rax, %rax
je 0x546d
movq %rax, %r14
movq %r12, %rdi
callq 0x53c2
movq %rax, (%r14)
testq %rax, %rax
je 0x546d
andq $0x0, 0x8(%r14)
movq 0x18(%rbx), %r15
movq %r14, 0x18(%rbx)
movq %rbx, %rdi
callq 0x2efc
testq %rax, %rax
jne 0x545c
movq (%r14), %rsi
leaq 0x1d96(%rip), %rdi      # 0x71e4
leaq 0x1d96(%rip), %rdx      # 0x71eb
xorl %eax, %eax
callq 0x5648
movq %r15, 0x18(%rbx)
xorl %r15d, %r15d
xorl %edi, %edi
movq %r14, %rsi
callq 0x436b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: my_magic_quote
int		my_magic_quote(t_info_shell *shell)
{
  int		i;

  i = 0;
  while (shell->tab[i] != NULL)
    {
      if ((detect_magic_quote(shell->tab[i])) == 1)
	if ((check_magic_quote(shell, shell->tab[i])) == 84)
	  return (84);
      i += 1;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x54
popq %rbp
xorl %r12d, %r12d
movq 0x18(%r14), %rax
movq (%rax,%r12), %r15
testq %r15, %r15
je 0x54c0
movq %r15, %rdi
callq 0x53a4
testl %eax, %eax
je 0x54b8
movq %r14, %rdi
movq %r15, %rsi
callq 0x53f8
cmpl $0x54, %eax
je 0x54be
addq $0x8, %r12
jmp 0x548f
movl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/free/test/test_free.c
// Function: main
int  main() {
    boolean pass = T;

    mp_init(16 * sizeof(int), &err);

    int *array_1 = (int *)mp_new(sizeof(int) * 8);
    for (int i = 0; i < 8; ++i) {
        array_1[i] = i;
    }

    int *array_2 = (int *)mp_new(sizeof(int) * 8);
    for (int i = 0; i < 8; ++i) {
        array_2[i] = 10 + i;
    }

    int *array_3 = (int *)mp_new(sizeof(int) * 8);
    if (array_3 != NULL) {
        pass = F;
        print_err("want error, but it seems works good.\n");
    }

    for (int i = 0; i < 8; ++i) {
        if (array_1[i] != i) {
            pass = F;
            print_err("array_1[%d] = %d, excepted %d\n", i, array_1[i], i);
        }
    }
    for (int i = 0; i < 8; ++i) {
        if (array_2[i] != 10 + i) {
            pass = F;
            print_err("array_2[%d] = %d, excepted %d\n", i, array_2[i], 10 + i);
        }
    }

    if (pass) {
        print_ok("All testcase passed\n");
        return 0;
    } else {
        print_err("Some error\n");
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9bd(%rip), %rax       # 0x2004
movl (%rax), %ebp
leaq -0x1c(%rip), %rsi       # 0x1634
pushq $0x40
popq %rdi
callq 0x13c1
pushq $0x20
popq %rdi
callq 0x15ad
movq %rax, %r14
xorl %eax, %eax
cmpq $0x8, %rax
je 0x1674
movl %eax, (%r14,%rax,4)
incq %rax
jmp 0x1665
pushq $0x20
popq %rdi
callq 0x15ad
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x8, %rax
je 0x1692
leal 0xa(%rax), %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0x1681
pushq $0x20
popq %rdi
callq 0x15ad
leaq 0x967(%rip), %rcx       # 0x2008
movl (%rcx), %r13d
testq %rax, %rax
je 0x16ba
leaq 0xaa5(%rip), %rdi       # 0x2155
xorl %eax, %eax
callq 0x1248
movl %r13d, %ebp
leaq 0xaba(%rip), %r15       # 0x217b
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x16eb
movl (%r14,%r12,4), %edx
cmpq %rdx, %r12
je 0x16e6
movq %r15, %rdi
movl %r12d, %esi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1248
movl %r13d, %ebp
incq %r12
jmp 0x16c4
leaq 0xaa8(%rip), %r14       # 0x219a
xorl %esi, %esi
cmpq $0x8, %rsi
je 0x171f
movl (%rbx,%rsi,4), %edx
leaq 0xa(%rsi), %r15
cmpq %rdx, %r15
je 0x1716
leal 0xa(%rsi), %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1248
movl %r13d, %ebp
addq $-0x9, %r15
movq %r15, %rsi
jmp 0x16f4
testl %ebp, %ebp
je 0x1735
leaq 0xa8f(%rip), %rdi       # 0x21b9
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1300
jmp 0x1746
leaq 0xa92(%rip), %rdi       # 0x21ce
xorl %eax, %eax
callq 0x1248
pushq $0x1
popq %rbx
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_O2/samtools[P]htslib/vcfutils.c
// Function: bcf_remove_alleles
int bcf_remove_alleles(const bcf_hdr_t *header, bcf1_t *line, int rm_mask)
{
    int i;
    kbitset_t *rm_set = kbs_init(line->n_allele);
    for (i=1; i<line->n_allele; i++)
        if ( rm_mask & 1<<i ) kbs_insert(rm_set, i);

    bcf_remove_allele_set(header, line, rm_set);
    kbs_destroy(rm_set);

    return 0; // FIXME: check for errs in this function
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x1a(%rsi), %edi
callq 0x5d82e
movq %rax, %r15
movzwl 0x1a(%rbx), %eax
pushq $0x1
popq %rdx
movq %rdx, %rcx
cmpq %rax, %rcx
jae 0x5f422
btl %ecx, %ebp
jae 0x5f41d
movq %rdx, %rsi
shlq %cl, %rsi
movq %rcx, %rdi
shrq $0x6, %rdi
orq %rsi, 0x10(%r15,%rdi,8)
incq %rcx
jmp 0x5f401
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x16140
movq %r15, %rdi
callq 0x14e30
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_external.c
// Function: cram_container_get_coords
void cram_container_get_coords(cram_container *c,
                               int *refid, hts_pos_t *start, hts_pos_t *span) {
    if (refid)
        *refid = c->ref_seq_id;
    if (start)
        *start = c->ref_seq_start;
    if (span)
        *span  = c->ref_seq_span;
}

// Assembly:
testq %rsi, %rsi
je 0x754a8
movl 0x4(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0x754b4
movq 0x8(%rdi), %rax
movq %rax, (%rdx)
testq %rcx, %rcx
je 0x754c0
movq 0x10(%rdi), %rax
movq %rax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_external.c
// Function: cram_block_compression_hdr_decoder2encoder
int cram_block_compression_hdr_decoder2encoder(cram_fd *fd,
                                               cram_block_compression_hdr *ch) {
    int i;

    if (!ch)
        return -1;

    for (i = 0; i < DS_END; i++) {
        cram_codec *co = ch->codecs[i];
        if (!co)
            continue;

        if (-1 == cram_codec_decoder2encoder(fd, co))
            return -1;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testq %rsi, %rsi
je 0x75542
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
cmpq $0x2f, %r12
je 0x75540
movq 0x280(%r14,%r12,8), %rsi
testq %rsi, %rsi
je 0x7553b
movq %r15, %rdi
callq 0x152f0
cmpl $-0x1, %eax
je 0x75542
incq %r12
jmp 0x7551b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_external.c
// Function: cram_cid2ds_free
void cram_cid2ds_free(cram_cid2ds_t *cid2ds) {
    if (cid2ds) {
        if (cid2ds->hash)
            kh_destroy(cid, cid2ds->hash);
        free(cid2ds->ds);
        free(cid2ds->ds_a);
        free(cid2ds);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x755a8
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x75588
movq 0x18(%r14), %rdi
callq 0x14e30
movq 0x10(%r14), %rdi
callq 0x14e30
movq 0x20(%r14), %rdi
callq 0x14e30
movq %r14, %rdi
callq 0x14e30
movq (%rbx), %rdi
callq 0x14e30
movq 0x18(%rbx), %rdi
callq 0x14e30
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14e30
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_external.c
// Function: cram_codec_iter_next
static cram_codec *cram_codec_iter_next(cram_codec_iter *iter,
                                        int *key) {
    cram_codec *cc = NULL;
    cram_block_compression_hdr *hdr = iter->hdr;

    if (!iter->is_tag) {
        // 1: Iterating through main data-series
        do {
            cc = hdr->codecs[iter->idx++];
        } while(!cc && iter->idx < DS_END);
        if (cc) {
            *key = cram_ds_to_key(iter->idx-1);
            return cc;
        }

        // Reset index for phase 2
        iter->idx = 0;
        iter->is_tag = 1;
    }

    do {
        if (!iter->curr_map)
            iter->curr_map = hdr->tag_encoding_map[iter->idx++];

        cc = iter->curr_map ? iter->curr_map->codec : NULL;
        if (cc) {
            *key = iter->curr_map->key;
            iter->curr_map = iter->curr_map->next;
            return cc;
        }
    } while (iter->idx < CRAM_MAP_HASH);

    // End of codecs
    return NULL;
}

// Assembly:
movq (%rdi), %rcx
cmpl $0x0, 0x14(%rdi)
je 0x75898
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
jne 0x7587e
movslq 0x10(%rdi), %rdx
leal 0x1(%rdx), %eax
movl %eax, 0x10(%rdi)
movq 0x180(%rcx,%rdx,8), %rdx
movq %rdx, 0x8(%rdi)
testq %rdx, %rdx
je 0x75891
movq 0x10(%rdx), %rax
testq %rax, %rax
jne 0x758d3
movl 0x10(%rdi), %eax
cmpl $0x20, %eax
jl 0x7585e
jmp 0x75895
xorl %edx, %edx
jmp 0x7588a
xorl %eax, %eax
retq
movslq 0x10(%rdi), %rdx
movq %rdx, %r8
movq 0x280(%rcx,%rdx,8), %rax
incq %rdx
cmpq $0x2d, %r8
jg 0x758b5
testq %rax, %rax
je 0x7589c
movl %edx, 0x10(%rdi)
testq %rax, %rax
je 0x758e0
addl $-0xc, %edx
cmpl $0x23, %edx
ja 0x758f3
movl %edx, %ecx
leaq 0x363a2(%rip), %rdx     # 0xabc70
movl (%rdx,%rcx,4), %ecx
jmp 0x758f6
movl (%rdx), %ecx
movl %ecx, (%rsi)
movq 0x18(%rdx), %rcx
movq %rcx, 0x8(%rdi)
retq
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rdi)
jmp 0x7585a
pushq $-0x1
popq %rcx
movl %ecx, (%rsi)
retq