LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/double_right_redi.c
// Function: double_right_chevron
int		double_right_chevron(t_info_shell *shell)
{
  int		i;
  char		*file_name;

  i = 0;
  shell->flags_value = 1;
  while (my_strcmp(shell->tab[i], ">>") != 0)
    i += 1;
  if (((file_name = my_strdup(shell->tab[i + 1])) == NULL)
      || ((shell->tab = cut_tab(shell->tab, ">>")) == NULL)
      || ((double_right_redi(file_name, shell)) == 84))
    return (84);
  free(file_name);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
xorl %r15d, %r15d
leaq 0x3433(%rip), %r14      # 0x72bd
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
movq %r14, %rsi
callq 0x478e
addq $0x8, %r15
testl %eax, %eax
jne 0x3e8a
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x4dec
movl $0x54, %ebp
testq %rax, %rax
je 0x3eef
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0x33f6(%rip), %rsi      # 0x72bd
callq 0x3868
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3eef
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3dd8
cmpl $0x54, %eax
je 0x3eef
movq %r14, %rdi
callq 0x2030
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/double_right_redi.c
// Function: double_error_chevron
int		double_error_chevron(t_info_shell *shell)
{
  int		i;
  char		*file_name;

  i = 0;
  shell->flags_value = 1;
  while (my_strcmp(shell->tab[i], "2>>") != 0)
    i += 1;
  if (((file_name = my_strdup(shell->tab[i + 1])) == NULL)
      || ((shell->tab = cut_tab(shell->tab, "2>>")) == NULL)
      || ((double_error_redi(file_name, shell)) == 84))
    return (84);
  free(file_name);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
xorl %r15d, %r15d
leaq 0x331a(%rip), %r14      # 0x72bc
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
movq %r14, %rsi
callq 0x478e
addq $0x8, %r15
testl %eax, %eax
jne 0x3fa2
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x4dec
movl $0x54, %ebp
testq %rax, %rax
je 0x4007
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0x32dd(%rip), %rsi      # 0x72bc
callq 0x3868
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x4007
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3efc
cmpl $0x54, %eax
je 0x4007
movq %r14, %rdi
callq 0x2030
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/and.c
// Function: copy_my_tab
char		**copy_my_tab(char **tab)
{
  int		i;
  char		**new;

  i = 0;
  if ((new = malloc(sizeof(char *) * (my_tablen(tab) + 1))) == NULL)
    return (NULL);
  while (tab[i] != NULL)
    {
      new[i] = my_strdup(tab[i]);
      i += 1;
    }
  new[i] = NULL;
  return (new);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x47c2
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x4060
movq %rax, %rbx
movq (%r14), %rdi
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x4056
callq 0x4dec
movq %rax, (%rbx,%r15,8)
movq 0x8(%r14,%r15,8), %rdi
incq %r15
jmp 0x403e
movq $0x0, (%rbx,%r15,8)
jmp 0x4062
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/and.c
// Function: reverse_tab
char		**reverse_tab(char **tab)
{
  int		i;
  int		j;
  char		*tmp;

  i = 0;
  j = 0;
  while (tab[j] != NULL)
    j += 1;
  j -= 1;
  while (i <= j)
    {
      tmp = my_strdup(tab[i]);
      tab[i] = my_strdup(tab[j]);
      tab[j] = my_strdup(tmp);
      i += 1;
      j -= 1;
    }
  free(tmp);
  return (tab);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $-0x2, %r15
cmpq $0x0, 0x10(%rbx,%r15,8)
leaq 0x1(%r15), %r15
jne 0x407d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
callq 0x4dec
movq %rax, %r14
movq (%rbx,%r15,8), %rdi
callq 0x4dec
movq %rax, (%rbx,%r12,8)
movq %r14, %rdi
callq 0x4dec
movq %rax, (%rbx,%r15,8)
incq %r12
leaq -0x1(%r15), %rax
cmpq %r15, %r12
movq %rax, %r15
jl 0x408c
movq %r14, %rdi
callq 0x2030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/and.c
// Function: and
int		and(t_info_shell *shell)
{
  char		**mem;
  int		mark;

  mark = 0;
  shell->flags_value = 1;
  mem = copy_my_tab(shell->tab);
  while (1)
    {
      if (my_tablen(shell->tab) != 1)
	shell->tab = cut(shell->tab, &mem);
      execute_command(shell);
      if ((shell->exit_value == 1) || (mark == 1))
	break ;
      shell->tab = mem;
      if (my_tablen(mem) == 1)
	mark = 1;
    }
  free_all(NULL, mem);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
movq 0x18(%rdi), %rdi
callq 0x4014
movq %rax, %r14
addq $-0x10, %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
leaq 0x31a4(%rip), %r15      # 0x72b1
movq %rbx, (%rsp)
movq 0x18(%rbx), %rdi
callq 0x47c2
cmpl $0x1, %eax
je 0x424d
movq 0x18(%rbx), %r13
movq %r13, %rdi
callq 0x47c2
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x4181
movq %rax, %r12
movq (%r13), %rdi
movq %r15, %rsi
callq 0x478e
testl %eax, %eax
movq %rbp, 0x10(%rsp)
je 0x4189
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rdi
callq 0x4dec
movq %rax, (%r12,%rbx,8)
movq 0x8(%r13,%rbx,8), %rdi
incq %rbx
movq %r15, %rsi
callq 0x478e
testl %eax, %eax
jne 0x415d
jmp 0x418b
xorl %r12d, %r12d
jmp 0x4249
xorl %ebx, %ebx
movq $0x0, (%r12,%rbx,8)
movq %r14, %rdi
callq 0x406b
movq $-0x2, %rcx
movl $0x2, %edx
movq 0x8(%rsp), %rax
movq %rdx, %r13
cmpq $0x0, 0x10(%r14,%rcx,8)
movq %rax, %rbp
leaq 0x1(%rcx), %rcx
leaq -0x1(%rdx), %rdx
leaq 0x8(%rax), %rax
jne 0x41ac
movslq %ecx, %r15
leaq (%r14,%r15,8), %rbx
movq (%r14,%r15,8), %rdi
leaq 0x30d9(%rip), %rsi      # 0x72b1
callq 0x478e
testl %r15d, %r15d
je 0x421d
testl %eax, %eax
je 0x421d
leaq 0x30c4(%rip), %r15      # 0x72b1
movq (%rbx), %rdi
movq %rbp, %rbx
callq 0x2030
movq (%rbp), %rdi
movq %r15, %rsi
callq 0x478e
addq $-0x8, %rbp
testq %r13, %r13
je 0x4214
incq %r13
testl %eax, %eax
jne 0x41ed
addq $0x8, %rbp
movq %rbp, %rbx
jmp 0x4224
leaq 0x308d(%rip), %r15      # 0x72b1
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x47c2
cmpl $0x1, %eax
movq 0x10(%rsp), %rbp
je 0x4245
movq %r14, %rdi
callq 0x406b
movq (%rsp), %rbx
movq %r12, 0x18(%rbx)
movq %rbx, %rdi
callq 0x30e1
cmpl $0x1, 0x3c(%rbx)
sete %al
orb %al, %bpl
testb $0x1, %bpl
jne 0x427d
movq %r14, 0x18(%rbx)
movq %r14, %rdi
callq 0x47c2
cmpl $0x1, %eax
sete %bpl
jmp 0x4111
xorl %edi, %edi
movq %r14, %rsi
callq 0x4751
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/or.c
// Function: or
int		or(t_info_shell *shell)
{
  char		**mem;
  int		mark;

  mark = 0;
  shell->flags_value = 1;
  mem = copy_my_tab(shell->tab);
  while (1)
    {
      if (my_tablen(shell->tab) != 1)
	shell->tab = cut(shell->tab, &mem);
      execute_command(shell);
      if ((shell->exit_value == 0) || (mark == 1))
	break ;
      shell->tab = mem;
      if (my_tablen(mem) == 1)
	mark = 1;
    }
  free_all(NULL, mem);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
movq 0x18(%rdi), %rdi
callq 0x4014
movq %rax, %r14
xorl %ebp, %ebp
leaq 0x2fef(%rip), %r15      # 0x72b4
movq %rbx, 0x8(%rsp)
movq 0x18(%rbx), %rdi
callq 0x47c2
cmpl $0x1, %eax
je 0x4407
movq 0x18(%rbx), %r13
movq %r13, %rdi
callq 0x47c2
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x43ce
movq %rax, %r12
movq (%r13), %rdi
movq %r15, %rsi
callq 0x478e
xorl %ebx, %ebx
testl %eax, %eax
je 0x4335
movq (%r13,%rbx,8), %rdi
callq 0x4dec
movq %rax, (%r12,%rbx,8)
movq 0x8(%r13,%rbx,8), %rdi
incq %rbx
movq %r15, %rsi
callq 0x478e
jmp 0x4311
movq %rbp, 0x10(%rsp)
movq $0x0, (%r12,%rbx,8)
movq %r14, %rdi
callq 0x406b
movq %rax, %r14
addq $-0x10, %rax
movq $-0x2, %rcx
movl $0x2, %edx
movq %rdx, %r13
cmpq $0x0, 0x10(%r14,%rcx,8)
movq %rax, %rbp
leaq 0x1(%rcx), %rcx
leaq -0x1(%rdx), %rdx
leaq 0x8(%rax), %rax
jne 0x435d
movslq %ecx, %r15
leaq (%r14,%r15,8), %rbx
movq (%r14,%r15,8), %rdi
leaq 0x2f2b(%rip), %rsi      # 0x72b4
callq 0x478e
testl %r15d, %r15d
je 0x43d3
testl %eax, %eax
je 0x43d3
leaq 0x2f16(%rip), %r15      # 0x72b4
movq (%rbx), %rdi
movq %rbp, %rbx
callq 0x2030
movq (%rbp), %rdi
movq %r15, %rsi
callq 0x478e
addq $-0x8, %rbp
testq %r13, %r13
je 0x43c5
incq %r13
testl %eax, %eax
jne 0x439e
addq $0x8, %rbp
movq %rbp, %rbx
jmp 0x43da
xorl %r12d, %r12d
jmp 0x4403
leaq 0x2eda(%rip), %r15      # 0x72b4
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x47c2
cmpl $0x1, %eax
movq 0x10(%rsp), %rbp
je 0x43fe
movq %r14, %rdi
callq 0x406b
movq %rax, %r14
movq 0x8(%rsp), %rbx
movq %r12, 0x18(%rbx)
movq %rbx, %rdi
callq 0x30e1
cmpl $0x0, 0x3c(%rbx)
sete %al
orb %al, %bpl
testb $0x1, %bpl
jne 0x4437
movq %r14, 0x18(%rbx)
movq %r14, %rdi
callq 0x47c2
cmpl $0x1, %eax
sete %bpl
jmp 0x42ca
xorl %edi, %edi
movq %r14, %rsi
callq 0x4751
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/redi_all.c
// Function: all_redi
int		all_redi(char *file_name, t_info_shell *shell)
{
  int		fd;
  pid_t		pid;
  int		statues;

  if ((pid = fork()) == -1)
    return (84);
  else if (pid == 0)
    {
      fd = open(file_name, O_CREAT | O_RDWR | O_TRUNC, 0644);
      dup2(fd, STANDARD_OUTPUT);
      dup2(fd, 2);
      execution_in_chain(shell);
      close(fd);
      exit(0);
    }
  else
    wait(&statues);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x54, %ebp
callq 0x21f0
cmpl $-0x1, %eax
je 0x4481
testl %eax, %eax
je 0x448c
leaq 0xc(%rsp), %rdi
callq 0x21e0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl $0x242, %esi            # imm = 0x242
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x2160
movl %eax, %ebp
movl %eax, %edi
movl $0x1, %esi
callq 0x20b0
movl %ebp, %edi
movl $0x2, %esi
callq 0x20b0
movq %rbx, %rdi
callq 0x3338
movl %ebp, %edi
callq 0x20d0
xorl %edi, %edi
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/redi_all.c
// Function: all_chevron
int		all_chevron(t_info_shell *shell)
{
  int		i;
  char		*file_name;

  i = 0;
  shell->flags_value = 1;
  while (my_strcmp(shell->tab[i], "2>&1") != 0)
    i += 1;
  if (((file_name = my_strdup(shell->tab[i + 1])) == NULL)
      || ((shell->tab = cut_tab(shell->tab, "2>&1")) == NULL)
      || ((all_redi(file_name, shell)) == 84))
    return (84);
  free(file_name);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
xorl %r15d, %r15d
leaq 0x2dd5(%rip), %r14      # 0x72c0
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
movq %r14, %rsi
callq 0x478e
addq $0x8, %r15
testl %eax, %eax
jne 0x44eb
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x4dec
movl $0x54, %ebp
testq %rax, %rax
je 0x4550
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0x2d98(%rip), %rsi      # 0x72c0
callq 0x3868
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x4550
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4454
cmpl $0x54, %eax
je 0x4550
movq %r14, %rdi
callq 0x2030
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/redi_all.c
// Function: error_redi
int		error_redi(char *file_name, t_info_shell *shell)
{
  int		fd;
  pid_t		pid;
  int		statues;

  if ((pid = fork()) == -1)
    return (84);
  else if (pid == 0)
    {
      fd = open(file_name, O_CREAT | O_RDWR | O_TRUNC, 0644);
      dup2(fd, 2);
      execution_in_chain(shell);
      close(fd);
      exit(0);
    }
  else
    wait(&statues);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x54, %ebp
callq 0x21f0
cmpl $-0x1, %eax
je 0x458a
testl %eax, %eax
je 0x4595
leaq 0xc(%rsp), %rdi
callq 0x21e0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl $0x242, %esi            # imm = 0x242
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x2160
movl %eax, %ebp
movl %eax, %edi
movl $0x2, %esi
callq 0x20b0
movq %rbx, %rdi
callq 0x3338
movl %ebp, %edi
callq 0x20d0
xorl %edi, %edi
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/flags/redi_all.c
// Function: error_chevron
int		error_chevron(t_info_shell *shell)
{
  int		i;
  char		*file_name;

  i = 0;
  shell->flags_value = 1;
  while (my_strcmp(shell->tab[i], "2>") != 0)
    i += 1;
  if (((file_name = my_strdup(shell->tab[i + 1])) == NULL)
      || ((shell->tab = cut_tab(shell->tab, "2>")) == NULL)
      || ((error_redi(file_name, shell)) == 84))
    return (84);
  free(file_name);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x40(%rdi)
xorl %r15d, %r15d
leaq 0x2cd1(%rip), %r14      # 0x72b9
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
movq %r14, %rsi
callq 0x478e
addq $0x8, %r15
testl %eax, %eax
jne 0x45e8
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x4dec
movl $0x54, %ebp
testq %rax, %rax
je 0x464d
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0x2c94(%rip), %rsi      # 0x72b9
callq 0x3868
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x464d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x455d
cmpl $0x54, %eax
je 0x464d
movq %r14, %rdi
callq 0x2030
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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, %r14
callq 0x47c2
cltq
leaq 0x10(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x46b0
movq %rax, %rbx
movq %r15, %rdi
callq 0x4dec
movq %rax, (%rbx)
movq (%r14), %rax
testq %rax, %rax
je 0x46b4
xorl %edx, %edx
leaq 0x1(%rdx), %rcx
movq %rax, 0x8(%rbx,%rdx,8)
movq 0x8(%r14,%rdx,8), %rax
movq %rcx, %rdx
testq %rax, %rax
jne 0x4698
jmp 0x46b6
xorl %ebx, %ebx
jmp 0x46cd
xorl %ecx, %ecx
movq $0x0, 0x8(%rbx,%rcx,8)
cmpq $0x0, (%r14)
je 0x46cd
movq %r14, %rdi
callq 0x2030
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x406b
movq %rax, 0x28(%rbx)
leaq 0x2932(%rip), %rdi      # 0x7020
movq %rax, %rsi
xorl %eax, %eax
callq 0x5bde
movq 0x28(%rbx), %rdi
callq 0x406b
movq %rax, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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), %rdi
testq %rdi, %rdi
je 0x4779
leaq 0x8(%r14), %r15
callq 0x2030
movq (%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x4768
movq %r14, %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %eax
jne 0x47c1
movb (%rdi), %cl
xorl %edx, %edx
testb %cl, %cl
je 0x47b9
cmpb (%rsi,%rdx), %cl
jne 0x47b9
movb 0x1(%rdi,%rdx), %cl
incq %rdx
jmp 0x47a7
xorl %eax, %eax
cmpb (%rsi,%rdx), %cl
setne %al
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/function_two.c
// Function: my_count
int		my_count(char *str, char sep)
{
  int		i;
  int		j;

  i = 0;
  j = 0;
  while (str[i] != '\0')
    {
      if (str[i] == sep)
	j += 1;
      i += 1;
    }
  j = j * 2;
  return (j);
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x47fd
incq %rdi
xorl %eax, %eax
xorl %edx, %edx
cmpb %sil, %cl
sete %dl
addl %edx, %eax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x47e7
addl %eax, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorl %eax, %eax
movl %eax, 0x3c(%rdi)
movl %eax, 0x44(%rdi)
movl $0x8, %edi
callq 0x2140
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x4855
movq $0x0, (%rax)
movq 0x67a6(%rip), %rax      # 0xafe8
movq (%rax), %rdi
leaq 0x28e7(%rip), %rsi      # 0x7133
callq 0x4a0a
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4751
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x4751
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x4751
movq 0x30(%rbx), %rsi
xorl %edi, %edi
popq %rbx
jmp 0x4751
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_epurstr.c
// Function: little_verif
char	*little_verif(char *str)
{
  int	i;

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

// Assembly:
testq %rdi, %rdi
je 0x48af
movq %rdi, %rax
leaq -0x2(%rdi), %rcx
cmpb $0x0, 0x2(%rcx)
leaq 0x1(%rcx), %rcx
jne 0x489c
cmpb $0x3b, (%rcx)
jne 0x48b1
movb $0x0, (%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4965
movq %rdi, %rbx
callq 0x4740
movslq %eax, %rdi
incq %rdi
callq 0x2140
testq %rax, %rax
je 0x4965
movq %rax, %r14
xorl %eax, %eax
cmpb $0x0, (%rbx)
je 0x492f
xorl %ecx, %ecx
movslq %eax, %rdx
leal 0x1(%rdx), %eax
addq %rbx, %rdx
movzbl (%rdx), %esi
cmpl $0x20, %esi
je 0x48fd
cmpl $0x9, %esi
jne 0x491b
movzbl 0x1(%rdx), %edi
cmpl $0x20, %edi
je 0x490b
cmpl $0x9, %edi
jne 0x4912
incl %eax
incq %rdx
jmp 0x48f0
cmpb $0x9, %sil
jne 0x491b
movb $0x20, (%rdx)
movb (%rdx), %dl
movb %dl, (%r14,%rcx)
incq %rcx
movslq %eax, %rdx
cmpb $0x0, (%rbx,%rdx)
jne 0x48e7
movl %ecx, %eax
movb $0x0, (%r14,%rax)
movzbl -0x1(%r14,%rax), %ecx
cmpl $0x20, %ecx
je 0x4944
cmpl $0x9, %ecx
jne 0x494a
movb $0x0, -0x1(%r14,%rax)
movzbl (%r14), %eax
cmpl $0x20, %eax
je 0x4958
cmpl $0x9, %eax
jne 0x495b
incq %r14
movq %rbx, %rdi
callq 0x2030
jmp 0x4968
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %r15
movq (%rdi), %rdi
movl $0x54, %ebx
testq %rdi, %rdi
je 0x49fe
movq %rsi, %r14
xorl %r13d, %r13d
callq 0x4740
movslq %eax, %rdi
callq 0x2140
testq %rax, %rax
je 0x49fe
movq %rax, %r12
movq (%r15,%r13,8), %rax
movb (%rax), %cl
cmpb $0x3d, %cl
jne 0x49b7
xorl %eax, %eax
jmp 0x49cb
xorl %edx, %edx
movb %cl, (%r12,%rdx)
movb 0x1(%rax,%rdx), %cl
incq %rdx
cmpb $0x3d, %cl
jne 0x49b9
movl %edx, %eax
movb $0x0, (%r12,%rax)
movq %r12, %rdi
movq %r14, %rsi
callq 0x478e
movq %r12, %rdi
testl %eax, %eax
je 0x49f6
callq 0x2030
movq 0x8(%r15,%r13,8), %rdi
incq %r13
testq %rdi, %rdi
jne 0x4993
jmp 0x49fe
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_O1/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 0x4974
cmpl $0x54, %eax
je 0x4a74
movslq %eax, %r14
movq (%rbx,%r14,8), %rdi
incq %rdi
callq 0x4740
movslq %eax, %rdi
callq 0x2140
testq %rax, %rax
je 0x4a74
movq (%rbx,%r14,8), %rcx
movq $-0x1, %rdx
cmpb $0x3d, (%rcx,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x4a42
movl %edx, %esi
movb (%rcx,%rsi), %dil
testb %dil, %dil
je 0x4a78
xorl %esi, %esi
movq %rsi, %r8
incq %rsi
movb %dil, (%rax,%r8)
addq %rcx, %r8
movb 0x1(%rdx,%r8), %dil
testb %dil, %dil
jne 0x4a59
movl %esi, %ecx
jmp 0x4a7a
xorl %eax, %eax
jmp 0x4a7e
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
movl %edi, %ebp
xorl %r14d, %r14d
leaq 0x6(%rsp), %r15
xorl %ebx, %ebx
cmpl $0x0, 0x666e(%rip)      # 0xb110
je 0x4b04
testq %rbx, %rbx
je 0x4ac2
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
testl %ecx, %ecx
je 0x4ac2
cmpl $0xa, %ecx
je 0x4abd
incq %rax
jmp 0x4aab
cmpl $-0x1, %eax
jne 0x4b04
movl $0x1, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x2100
movl %eax, 0x6639(%rip)      # 0xb110
cmpl $-0x1, %eax
je 0x4bc7
cltq
movb $0x0, 0x6(%rsp,%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4f64
movq %rax, %rbx
testq %rax, %rax
jne 0x4a9b
jmp 0x4bc7
cmpb $0x0, (%rbx)
je 0x4b55
movq 0x66f8(%rip), %rdi      # 0xb208
testq %rdi, %rdi
je 0x4b32
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4f64
testq %rax, %rax
je 0x4b55
movq %rax, %rbx
movq $0x0, 0x66d6(%rip) # 0xb208
xorl %eax, %eax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rbx, %rdx
movzbl (%rdx), %esi
testl %esi, %esi
je 0x4b5f
cmpl $0xa, %esi
je 0x4b59
addq %rcx, %rax
incq %rdx
jmp 0x4b41
xorl %ebx, %ebx
jmp 0x4ba8
sarq $0x20, %rax
jmp 0x4b66
movq $-0x1, %rax
movb $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x4740
cltq
leaq (%rbx,%rax), %r14
incq %r14
movq %r14, %rdi
callq 0x4740
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %rcx, %r14
xorl %edi, %edi
movq %r14, %rsi
movl $0x2, %edx
callq 0x4f64
movq %rax, 0x6667(%rip)      # 0xb208
testq %rax, %rax
cmoveq %rax, %rbx
testq %rbx, %rbx
je 0x4bc4
movq %rbx, %rdi
callq 0x4740
xorl %r14d, %r14d
orl 0x6552(%rip), %eax      # 0xb110
cmovneq %rbx, %r14
jmp 0x4bc7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %rax
incq %rdi
cmpb %sil, 0x1(%rax)
je 0x4bdb
movb (%rdi), %dl
testb %dl, %dl
je 0x4c31
movl $0x1, %eax
xorl %ecx, %ecx
cmpb %sil, %dl
jne 0x4c12
movslq %ecx, %rdx
leal -0x1(%rdx), %ecx
addq %rdi, %rdx
incl %ecx
leaq 0x1(%rdx), %r8
cmpb %sil, (%rdx)
movq %r8, %rdx
je 0x4c02
incl %eax
movslq %ecx, %rdx
xorl %r8d, %r8d
cmpb $0x0, (%rdi,%rdx)
setne %r8b
leal (%rdx,%r8), %ecx
addq %rdx, %r8
movb (%rdi,%r8), %dl
testb %dl, %dl
jne 0x4bf4
jmp 0x4c38
xorl %ecx, %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x4c4b
movslq %ecx, %rcx
xorl %edx, %edx
cmpb %sil, -0x1(%rcx,%rdi)
sete %dl
subl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %r14
movl (%rdx), %r15d
movslq %r15d, %rdx
movb (%rdi,%rdx), %al
testb %al, %al
sete %r13b
cmpb %sil, %al
sete %al
orb %r13b, %al
movl $0x1, %edi
movl %r15d, %ebp
jne 0x4c9d
leaq (%r14,%rdx), %rax
movl %r15d, %ebp
incl %ebp
movl %ebp, (%rbx)
movb (%rax,%rdi), %cl
incq %rdi
testb %cl, %cl
sete %r13b
je 0x4c9d
cmpb %sil, %cl
jne 0x4c86
movq %rdx, (%rsp)
callq 0x2140
testq %rax, %rax
je 0x4cd3
movq %rax, %r12
movq %r14, %rsi
movl %ebp, %r14d
subl %r15d, %r14d
jle 0x4cd8
addq (%rsp), %rsi
notl %r15d
addl %ebp, %r15d
incq %r15
movq %r12, %rdi
movq %r15, %rdx
callq 0x2120
jmp 0x4cdb
xorl %r12d, %r12d
jmp 0x4ce9
xorl %r14d, %r14d
movb $0x0, (%r12,%r14)
testb %r13b, %r13b
jne 0x4ce9
incl %ebp
movl %ebp, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x0, 0x4(%rsp)
testq %rdi, %rdi
je 0x4d8c
movl %esi, %ebp
movq %rdi, %r14
movsbl %bpl, %r15d
movl %r15d, %esi
callq 0x4bd8
movl %eax, %r12d
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x4d8c
movq %rax, %rbx
testl %r12d, %r12d
jle 0x4d90
movl %r12d, %r13d
xorl %r12d, %r12d
movslq 0x4(%rsp), %rax
leal -0x1(%rax), %ecx
addq %r14, %rax
incl %ecx
leaq 0x1(%rax), %rdx
cmpb %bpl, (%rax)
movq %rdx, %rax
je 0x4d54
movl %ecx, 0x4(%rsp)
movq %r14, %rdi
movl %r15d, %esi
leaq 0x4(%rsp), %rdx
callq 0x4c4c
movq %rax, (%rbx,%r12,8)
testq %rax, %rax
je 0x4d8c
incq %r12
cmpq %r13, %r12
jne 0x4d49
movl %r12d, %eax
jmp 0x4d92
xorl %ebx, %ebx
jmp 0x4d9a
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_str_isalpha.c
// Function: my_str_isalpha
int		my_str_isalpha(char *str)
{
  int		i;

  i = 0;
  while (str[i] != '\0')
    {
      if ((str[i] < '0' || str[i] > '9')
	  && (str[i] < 'A' || str[i] > 'Z')
	  && (str[i] < 'a' || str[i] > 'z'))
	return (1);
      i += 1;
    }
  return (0);
}

// Assembly:
movb (%rdi), %cl
xorl %eax, %eax
testb %cl, %cl
je 0x4dd3
incq %rdi
leal -0x3a(%rcx), %edx
cmpb $-0xb, %dl
ja 0x4dca
andb $-0x21, %cl
addb $-0x5b, %cl
cmpb $-0x1b, %cl
jbe 0x4dd4
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x4db7
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4e23
pushq %rbx
movq %rdi, %rbx
callq 0x4740
incl %eax
movslq %eax, %rdi
callq 0x2140
testq %rax, %rax
je 0x4e26
movb (%rbx), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x4e1d
movb %dl, (%rax,%rcx)
movb 0x1(%rbx,%rcx), %dl
incq %rcx
jmp 0x4e0d
movb $0x0, (%rax,%rcx)
jmp 0x4e28
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
movb $0x0, 0xf(%rsp)
xorl %esi, %esi
xorl %eax, %eax
callq 0x2160
cmpl $-0x1, %eax
je 0x4e9b
movl %eax, %ebx
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
movl %eax, %edi
callq 0x2100
xorl %r14d, %r14d
testq %rax, %rax
je 0x4e92
leaq 0xe(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4f64
movq %rax, %r14
movl $0x1, %edx
movl %ebx, %edi
movq %r15, %rsi
callq 0x2100
testq %rax, %rax
jne 0x4e6b
movl %ebx, %edi
callq 0x20d0
jmp 0x4eb6
leaq 0x2342(%rip), %rdi      # 0x71e4
leaq 0x21c5(%rip), %rdx      # 0x706e
xorl %r14d, %r14d
movq %r15, %rsi
xorl %eax, %eax
callq 0x5bde
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4ed8
incq %rax
jmp 0x4ecb
testl %ecx, %ecx
jne 0x4eff
leaq 0x2305(%rip), %rdi      # 0x71e8
leaq 0x23e1(%rip), %rsi      # 0x72cb
xorl %eax, %eax
callq 0x5bde
movl $0x1, 0x3c(%rbx)
movl $0x1, %eax
jmp 0x4f01
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4f88
movq %r14, %rdi
callq 0x4740
movslq %eax, %r15
incq %r15
jmp 0x4f8e
movl $0x1, %r15d
testq %rbx, %rbx
je 0x4f9f
movq %rbx, %rdi
callq 0x4740
cltq
jmp 0x4fa1
xorl %eax, %eax
addq %rax, %r15
movq %r15, %rdi
callq 0x2140
testq %rax, %rax
je 0x5012
movq %rax, %r15
testq %r14, %r14
je 0x4fd4
movb (%r14), %cl
testb %cl, %cl
je 0x4fd4
xorl %eax, %eax
movb %cl, (%r15,%rax)
movb 0x1(%r14,%rax), %cl
incq %rax
testb %cl, %cl
jne 0x4fc2
jmp 0x4fd6
xorl %eax, %eax
movb $0x0, (%r15,%rax)
testq %rbx, %rbx
je 0x4ffa
movb (%rbx), %cl
testb %cl, %cl
je 0x4ffa
leaq 0x1(%rbx), %rdx
movb %cl, (%r15,%rax)
incq %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x4fea
movb $0x0, (%r15,%rax)
cmpl $0x2, %ebp
je 0x5022
testl %ebp, %ebp
jne 0x5017
movq %r14, %rdi
callq 0x2030
jmp 0x501a
xorl %r15d, %r15d
jmp 0x5022
movq %r14, %rbx
movq %rbx, %rdi
callq 0x2030
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4740
movslq %eax, %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x47dc
cltq
leaq (%r15,%rax), %rdi
incq %rdi
callq 0x2140
testq %rax, %rax
je 0x50ef
movb (%r14), %sil
xorl %ecx, %ecx
testb %sil, %sil
je 0x50c7
xorl %edx, %edx
cmpb %bl, %sil
setne %dil
testq %rdx, %rdx
sete %r8b
orb %dil, %r8b
jne 0x5093
cmpb $0x20, -0x1(%r14,%rdx)
je 0x5093
movslq %ecx, %rdi
incl %ecx
movb $0x20, (%rax,%rdi)
movslq %ecx, %rdi
movb %sil, (%rax,%rdi)
cmpb %bl, %sil
jne 0x50b5
movzbl 0x1(%r14,%rdx), %esi
testb $-0x21, %sil
je 0x50b5
movb $0x20, 0x1(%rax,%rdi)
incq %rdi
movl %edi, %ecx
incl %ecx
movb 0x1(%r14,%rdx), %sil
incq %rdx
testb %sil, %sil
jne 0x506f
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq %rax, %rdi
movl $0x7c, %esi
callq 0x5886
testq %rax, %rax
je 0x50ef
movq %rax, %rdi
movl $0x26, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x5886
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x1f35(%rip), %rdi      # 0x704f
callq 0x525d
testq %rax, %rax
je 0x5197
movq %rax, %r14
movslq 0xc(%rsp), %rax
leaq 0x1(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x5197
movq %rax, %rbx
movq (%r14), %rdi
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x5183
movq %r14, %r13
addq $0x8, %r13
movq %r15, %rsi
callq 0x470c
cmpl $0x1, %eax
jne 0x5173
movq -0x8(%r13), %rdi
callq 0x4dec
movslq %r12d, %rcx
incl %r12d
movq %rax, (%rbx,%rcx,8)
movq (%r13), %rdi
addq $0x8, %r13
testq %rdi, %rdi
jne 0x5153
movslq %r12d, %r12
movq $0x0, (%rbx,%r12,8)
xorl %edi, %edi
movq %r14, %rsi
callq 0x4751
jmp 0x5199
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x50f8
movq %rax, %r14
movq %rax, %rdi
callq 0x47c2
cmpl $0x1, %eax
jne 0x5203
movq $-0x1, %rax
movq %r14, %r15
movb 0x1(%rbx,%rax), %cl
movq (%r15), %rdx
addq $0x8, %r15
incq %rax
cmpb (%rdx), %cl
je 0x51d1
movl %eax, %eax
movq (%r14,%rax,8), %rsi
cmpb $0x0, (%rsi)
je 0x5203
movl $0x1, %edx
xorl %edi, %edi
callq 0x2070
movq (%r15), %rsi
addq $0x8, %r15
jmp 0x51e9
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movl %esi, %ebx
callq 0x2080
movl $0x54, %ebp
testq %rax, %rax
je 0x5256
movq %rax, %r14
movq %rax, %rdi
callq 0x2130
testq %rax, %rax
je 0x5256
xorl %ebp, %ebp
testl %ebx, %ebx
je 0x5242
xorl %ecx, %ecx
cmpb $0x2e, 0x13(%rax)
setne %cl
jmp 0x5247
movl $0x1, %ecx
addl %ecx, %ebp
movq %r14, %rdi
callq 0x2130
testq %rax, %rax
jne 0x5233
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x520c
incl %eax
cmpl $0x54, %eax
je 0x52e9
movl %eax, (%r15)
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x52e7
movq %rax, %rbx
movq %r14, %rdi
callq 0x2080
testq %rax, %rax
je 0x52e7
movq %rax, %r14
movq %rax, %rdi
callq 0x2130
testq %rax, %rax
je 0x52e7
xorl %r15d, %r15d
addq $0x13, %rax
movq %rax, %rdi
callq 0x4dec
movq %rax, (%rbx,%r15,8)
incq %r15
movq %r14, %rdi
callq 0x2130
testq %rax, %rax
jne 0x52b2
movq %r14, %rdi
callq 0x20f0
movl %r15d, %eax
movq $0x0, (%rbx,%rax,8)
jmp 0x52e9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x47c2
decl %eax
cmpl $0x2, %eax
jae 0x5347
leaq 0x1fb0(%rip), %rdi      # 0x72e2
xorl %eax, %eax
callq 0x5bde
movl $0x1, 0x3c(%rbx)
movl $0x54, %eax
jmp 0x5365
movq 0x18(%rbx), %rax
movq (%rax), %rsi
leaq 0x1e7a(%rip), %rdi      # 0x71cf
callq 0x478e
movl %eax, %ecx
movl $0x54, %eax
testl %ecx, %ecx
je 0x5367
popq %rbx
retq
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rcx
movb (%rcx), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x5365
incq %rcx
leaq 0x1f7d(%rip), %rdi      # 0x72fe
addb $-0x3a, %dl
cmpb $-0xb, %dl
jbe 0x5332
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x5381
jmp 0x5365
// File: /workspace/github_c_makefile_star2_O1/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 0x4740
movslq %eax, %rdi
incq %rdi
callq 0x2140
movl $0x6, %ecx
cmpb $0x20, 0x1(%rbx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x53ad
movl %ecx, %edx
movb (%rbx,%rdx), %sil
testb %sil, %sil
je 0x53de
xorl %edx, %edx
movb %sil, (%rax,%rdx)
leaq (%rbx,%rdx), %rsi
incq %rdx
movb 0x1(%rcx,%rsi), %sil
testb %sil, %sil
jne 0x53c5
movl %edx, %ecx
jmp 0x53e0
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5317
movl %eax, %ecx
movl $0x54, %eax
testl %ecx, %ecx
jne 0x549c
movq 0x18(%rbx), %r15
movq 0x8(%r15), %rdi
callq 0x2190
testl %eax, %eax
jle 0x549a
movl %eax, %ebp
movq %r15, %rdi
callq 0x47c2
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x2140
testq %rax, %rax
je 0x545f
movq %rax, %r14
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x5464
xorl %r12d, %r12d
callq 0x4dec
movq %rax, (%r14,%r12,8)
movq 0x18(%r15,%r12,8), %rdi
incq %r12
testq %rdi, %rdi
jne 0x5444
movl %r12d, %eax
jmp 0x5466
xorl %r14d, %r14d
jmp 0x546e
xorl %eax, %eax
movq $0x0, (%r14,%rax,8)
movq (%rbx), %rdi
callq 0x5394
movq %rax, %r15
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
movq %r15, (%rbx)
movq %r14, 0x18(%rbx)
movq %rbx, %rdi
callq 0x3338
decl %r12d
jne 0x5486
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x1e47(%rip), %rsi      # 0x7337
callq 0x478e
testl %eax, %eax
jne 0x550c
leaq 0x1e3c(%rip), %rdi      # 0x733c
xorl %eax, %eax
callq 0x5bde
movl $0x1, %ebp
testl %ebp, %ebp
je 0x5517
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x3040
testq %rax, %rax
je 0x553b
leaq 0x1e84(%rip), %rdi      # 0x73af
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5bde
movq 0x18(%rbx), %rax
movq (%rax), %rsi
leaq 0x1c9b(%rip), %rdi      # 0x71e4
leaq 0x1c9b(%rip), %rdx      # 0x71eb
xorl %eax, %eax
callq 0x5bde
movl $0x1, 0x3c(%rbx)
jmp 0x5510
// File: /workspace/github_c_makefile_star2_O1/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 0x54a8
movl %eax, %ecx
movl $0x54, %eax
testl %ecx, %ecx
jne 0x5640
leaq 0x5727(%rip), %r12      # 0xacb0
leaq 0x1dcb(%rip), %r14      # 0x735b
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
callq 0x47c2
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x55e9
movq %rax, %r15
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x55e9
xorl %r13d, %r13d
callq 0x4dec
movq %rax, (%r15,%r13,8)
movq 0x18(%rbx), %rax
movq 0x10(%rax,%r13,8), %rdi
incq %r13
testq %rdi, %rdi
jne 0x55c2
movl %r13d, %eax
movq $0x0, (%r15,%rax,8)
jmp 0x55ec
xorl %r15d, %r15d
movq %r15, 0x18(%rbx)
testq %r15, %r15
je 0x563e
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movq (%r13,%r12), %r15
movq %r15, %rsi
callq 0x478e
testl %eax, %eax
jne 0x5622
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x5bde
movl $0x1, %ebp
addq $0x10, %r13
cmpq $0xa0, %r13
jne 0x55f8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x54da
jmp 0x5592
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop