LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/main.c
// Function: main
int		main(int ac, char **av)
{
  t_list	list;
  t_anthill	anthill;
  t_ant		*ants;

  if (ac != 1 || av[1] != NULL)
    return (my_printf("USAGE:\n\t ./lem_in < map\n"));
  init(&anthill, &list);
  if (recup_info(&list, &anthill) == ERROR ||
      anthill.entry == NULL || anthill.exit == NULL)
    {
      printf_info(&list, &anthill);
      return (ERROR);
    }
  anthill.entry->ants = anthill.ants;
  check_graph(&anthill);
  if (anthill.entry->mark == FALSE)
    {
      printf_info(&list, &anthill);
      return (ERROR);
    }
  printf_info(&list, &anthill);
  if (!(ants = get_ants(anthill.entry->ants, &anthill)))
    return (1);
  move_ants(ants, &anthill);
  return (0);
}

// Assembly:
cmpl $0x1, %edi
jne 0x118c
cmpq $0x0, 0x8(%rsi)
je 0x119a
leaq 0x1e71(%rip), %rdi      # 0x3004
xorl %eax, %eax
jmp 0x24a4
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movups %xmm0, 0x8(%rsi)
andq $0x0, 0x18(%rsi)
leaq 0x20(%rsp), %rdi
andl $0x0, (%rdi)
movups %xmm0, 0x8(%rdi)
callq 0x20dc
cmpl $0x1, %eax
je 0x1240
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x1240
cmpq $0x0, 0x10(%rsp)
je 0x1240
movq %rsp, %rbx
movl (%rbx), %ecx
movl %ecx, (%rax)
movq %rbx, %rdi
callq 0x206c
movq 0x8(%rbx), %rax
movl 0xc(%rax), %ebp
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x1a1c
pushq $0x1
popq %rbx
testl %ebp, %ebp
je 0x125f
movq 0x8(%rsp), %r14
movslq (%r14), %r15
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x1060
testq %rax, %rax
je 0x125f
xorl %ecx, %ecx
testl %r15d, %r15d
cmovlel %ecx, %r15d
shlq $0x4, %r15
cmpq %rcx, %r15
je 0x1252
movq %r14, (%rax,%rcx)
andq $0x0, 0x8(%rax,%rcx)
addq $0x10, %rcx
jmp 0x122b
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x1a1c
pushq $0x1
popq %rbx
jmp 0x125f
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1d04
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/tools2.c
// Function: free_tab
void	free_tab(char **tab)
{
  int	i;

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

// Assembly:
testq %rdi, %rdi
je 0x129d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0x128e
callq 0x1030
addq $0x8, %r14
jmp 0x127b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/tools.c
// Function: my_putstr_error
int	my_putstr_error(const char *str)
{
  int	i;

  i = -1;
  while (str[++i])
    write(2, &str[i], i);
  return (ERROR);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x2
popq %rbp
cmpb $0x0, (%rbx,%r14)
je 0x12c7
leaq (%rbx,%r14), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x1040
incq %r14
jmp 0x12ad
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/tools.c
// Function: my_strcmp
int     my_strcmp(const char *s1, const char *s2)
{
  int   character;

  if (!s1 || !s2)
    return ((s1) ? 1 : (s2) ? -1 : 0);
  character = 0;
  while (s1[character] == s2[character] && s1[character] && s2[character])
    character = character + 1;
  if (s1[character] > s2[character])
    return (1);
  else if (s1[character] < s2[character])
    return (-1);
  else
    return (0);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x12fe
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %dl
testb %dl, %dl
je 0x12f6
testb %cl, %cl
je 0x12f6
incq %rax
cmpb %dl, %cl
je 0x12e1
cmpb %dl, %cl
jle 0x130f
pushq $0x1
popq %rax
retq
xorl %ecx, %ecx
negq %rsi
sbbl %ecx, %ecx
testq %rdi, %rdi
pushq $0x1
popq %rax
cmovel %ecx, %eax
retq
setl %al
movzbl %al, %eax
negl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/tools.c
// Function: my_strdup
char    *my_strdup(const char *src)
{
  char  *dest;
  int   i;
  int   n;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22e0
movl %eax, %r14d
leal 0x1(%r14), %eax
movslq %eax, %rdi
callq 0x1060
testq %rax, %rax
je 0x1356
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
cmpq %rcx, %r14
je 0x1351
movb (%rbx,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x1341
movb $0x0, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/tools.c
// Function: my_compare
int     my_compare(char *s1, char *s2, int i)
{
  int	nb;

  nb = 0;
  while (i > 0 && s1[nb] != '\0' && s2[nb] != '\0')
    {
      if (s1[nb] != s2[nb])
	return (1);
      nb++;
      i--;
    }
  if (i == 0)
    return (0);
  if (my_strlen(s1) != my_strlen(s2))
    return (1);
  return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %ecx, %ecx
pushq $0x1
popq %rax
movl %edx, %esi
testl %esi, %esi
jle 0x138d
movb (%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x1393
movb (%rbx,%rcx), %r9b
testb %r9b, %r9b
je 0x1393
cmpb %r9b, %r8b
jne 0x13ab
incq %rcx
decl %esi
jmp 0x136b
xorl %eax, %eax
testl %edx, %edx
jns 0x13ab
callq 0x22e0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x22e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/get_next_line.c
// Function: get_next_line
char		*get_next_line(const int fd)
{
  int		i;
  char		read_c;
  char		*str;
  int		check;

  i = 0;
  read_c = 0;
  if ((check = read_char(fd, &read_c)) == -1)
    return (NULL);
  if ((str = malloc(sizeof(char) * (READ_SIZE + 1))) == NULL)
    return (NULL);
  my_memset(str, 0, READ_SIZE + 1 * sizeof(char));
  while (read_c != '\n')
    {
      str[i++] = read_c;
      if (read_char(fd, &read_c) < 0)
	break;
      if (i > (READ_SIZE + 1))
	if ((str = my_realloc(str, (i + (READ_SIZE + 1) * sizeof(*str)))) == NULL)
	  return (NULL);
    }
  if (str[i])
    str[i] = '\0';
  return (str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x7(%rsp), %rsi
movb $0x0, (%rsi)
callq 0x150c
cmpl $-0x1, %eax
je 0x14d9
movl $0x1001, %edi           # imm = 0x1001
callq 0x1060
testq %rax, %rax
je 0x14d9
movq %rax, %rbx
movq $-0x1001, %rax          # imm = 0xEFFF
testq %rax, %rax
je 0x142a
movb $0x0, 0x1001(%rbx,%rax)
incq %rax
jmp 0x1418
leaq 0x7(%rsp), %r14
xorl %r12d, %r12d
addq $0x1001, %r12           # imm = 0x1001
movb 0x7(%rsp), %al
cmpb $0xa, %al
je 0x14dd
movb %al, -0x1001(%rbx,%r12)
movl %ebp, %edi
movq %r14, %rsi
callq 0x150c
testl %eax, %eax
js 0x14e6
leaq 0x1(%r12), %r13
addq $-0x1001, %r12          # imm = 0xEFFF
cmpq $0x1001, %r12           # imm = 0x1001
movq %r13, %r12
jb 0x1439
movq %rbx, %rdi
callq 0x22e0
movslq %eax, %rdi
addq %r13, %rdi
callq 0x1060
testq %rax, %rax
je 0x14d9
movq %rax, %r15
leaq -0x1001(%r13), %r12
movq %rbx, %rdi
callq 0x22e0
cltq
addq %r13, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x14b7
movb $0x0, (%r15,%rcx)
incq %rcx
jmp 0x14a8
xorl %eax, %eax
movb (%rbx,%rax), %cl
testb %cl, %cl
je 0x14c9
movb %cl, (%r15,%rax)
incq %rax
jmp 0x14b9
movq %rbx, %rdi
callq 0x1030
movq %r15, %rbx
jmp 0x1432
xorl %ebx, %ebx
jmp 0x14fa
addq $-0x1001, %r12          # imm = 0xEFFF
jmp 0x14ed
addq $-0x1000, %r12          # imm = 0xF000
movslq %r12d, %rax
cmpb $0x0, (%rbx,%rax)
je 0x14fa
movb $0x0, (%rbx,%rax)
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_O2/Vatoth[P]CPE_2016_Lemin/src/get_next_line.c
// Function: read_char
static int	read_char(const int fd, char *read_c)
{
  static char	buffer[READ_SIZE];
  static int	bytes_reads = 0;
  static int	y = 0;

  if (bytes_reads == 0)
    {
      if ((bytes_reads = read(fd, buffer, READ_SIZE)) <= 0)
	return (-1);
      y = 0;
    }
  *read_c = buffer[y];
  y = y + 1;
  bytes_reads = bytes_reads - 1;
  return (0);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl 0x4b4a(%rip), %eax      # 0x6060
testl %eax, %eax
je 0x1522
movl 0x4b44(%rip), %ecx      # 0x6064
jmp 0x153f
leaq 0x3b37(%rip), %rsi      # 0x5060
movl $0x1000, %edx           # imm = 0x1000
callq 0x1050
movl %eax, 0x4b27(%rip)      # 0x6060
xorl %ecx, %ecx
testl %eax, %eax
jle 0x1562
movslq %ecx, %rcx
leaq 0x3b17(%rip), %rdx      # 0x5060
movb (%rcx,%rdx), %dl
movb %dl, (%rbx)
incl %ecx
movl %ecx, 0x4b0e(%rip)      # 0x6064
decl %eax
movl %eax, 0x4b02(%rip)      # 0x6060
xorl %eax, %eax
popq %rbx
retq
pushq $-0x1
popq %rax
jmp 0x1560
nop
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/clear_file.c
// Function: epur_str
void    epur_str(char *str)
{
  int   i;
  int   j;

  i = 0;
  j = 0;
  while (str[i] != '\0')
    {
      if (str[i] != ' ' && str[i] != '\t')
        {
          str[j++] = str[i];
          if (str[i + 1] != '\0' && (str[i + 1] == ' ' || str[i + 1] == '\t'))
            str[j++] = ' ';
        }
      i++;
    }
  if (j != 0 && (str[j - 1] == ' ' || str[j - 1] == '\t'))
    str[j - 1] = '\0';
  str[j] = '\0';
}

// Assembly:
leaq 0x1(%rdi), %rcx
xorl %edx, %edx
movzbl -0x1(%rcx), %esi
cmpl $0x9, %esi
je 0x159e
cmpl $0x20, %esi
je 0x159e
movslq %edx, %rax
testl %esi, %esi
je 0x15a7
movb %sil, (%rdi,%rax)
incq %rax
movzbl (%rcx), %esi
cmpl $0x20, %esi
je 0x1597
cmpl $0x9, %esi
jne 0x15a0
addl $0x2, %edx
movb $0x20, (%rdi,%rax)
movl %edx, %eax
incq %rcx
movl %eax, %edx
jmp 0x156e
testl %edx, %edx
je 0x15c1
movzbl -0x1(%rdi,%rax), %ecx
cmpl $0x20, %ecx
je 0x15ba
cmpl $0x9, %ecx
jne 0x15c3
movb $0x0, -0x1(%rdi,%rax)
jmp 0x15c3
xorl %eax, %eax
movb $0x0, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/parse.c
// Function: parse_info
int              parse_info(t_list *list, t_anthill *anthill)
{
  t_line	*element;

  element = list->first;
  if (check_number(element->line) == ERROR)
    return (ERROR);
  list->first->bool = TRUE;
  anthill->ants = my_getnbr(element->line);
  if (get_info(anthill, element, 0, 0) == ERROR ||
      anthill->entry == NULL || anthill->exit == NULL)
    return (ERROR);
  return (create_link(list, anthill));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x8(%rdi), %r12
movq (%r12), %rdi
callq 0x1900
cmpl $0x1, %eax
jne 0x1604
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movl $0x1, 0x8(%rax)
movq (%r12), %rdi
callq 0x2080
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
leaq 0x19dd(%rip), %r15      # 0x301d
xorl %ebx, %ebx
testq %r12, %r12
je 0x1765
movq (%r12), %rdi
movq %r15, %rsi
callq 0x12cf
testl %eax, %eax
je 0x171a
movq (%r12), %rdi
leaq 0x19bb(%rip), %rsi      # 0x3025
callq 0x12cf
testl %eax, %eax
je 0x173c
movq (%r12), %rdi
pushq $0x20
popq %rsi
callq 0x21a4
testq %rax, %rax
je 0x15f2
movq %rax, %r13
movq %rax, %rdi
callq 0x13b2
cmpl $0x3, %eax
jne 0x1710
pushq $0x30
popq %rdi
callq 0x1060
testq %rax, %rax
je 0x15f2
movq %rax, %rbp
movq (%r13), %rdi
callq 0x1318
movq %rax, 0x10(%rbp)
testq %rax, %rax
je 0x15f2
movq %r13, %rdi
movq 0x18(%rsp), %rsi
movq %rbp, %rdx
callq 0x1992
cmpl $0x1, %eax
je 0x15f2
andl $0x0, 0xc(%rbp)
cmpl $0x1, %r14d
jne 0x16f4
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1704
cmpl $0x1, %ebx
jne 0x1707
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1707
movq %rbp, (%rax)
movl $0x1, 0x8(%r12)
movq %r13, %rdi
callq 0x126c
jmp 0x175b
cmpl $0x2, %ebx
jl 0x172e
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x15f2
testl %r14d, %r14d
jg 0x15f2
incl %r14d
jmp 0x175b
cmpl $0x2, %r14d
jl 0x1751
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x15f2
testl %ebx, %ebx
jg 0x15f2
incl %ebx
movq 0x10(%r12), %r12
jmp 0x1642
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x15f2
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x15f2
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17a0
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/create_edge.c
// Function: create_link
int		create_link(t_list *list, t_anthill *anthill)
{
  t_line        *element;
  char          **tab;
  char          *temp;

  element = list->first;
  while (element)
    {
      if (!(tab = my_str_to_wordtab(element->line, EDGE_CHAR)))
        return (ERROR);
      if (count_tab(tab) == 2)
        {
          if (create_edge(tab, anthill, 0, 0) == ERROR)
            return (ERROR);
          temp = tab[0];
          tab[0] = tab[1];
          tab[1] = temp;
          if (create_edge(tab, anthill, 0, 0) == ERROR)
            return (ERROR);
          element->bool = TRUE;
        }
      free_tab(tab);
      element = element->next;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x8, %r15
pushq $0x2d
popq %rbp
pushq $0x1
popq %rbx
movq (%r15), %r15
testq %r15, %r15
je 0x1824
movq (%r15), %rdi
movl %ebp, %esi
callq 0x21a4
testq %rax, %rax
je 0x1826
movq %rax, %r12
movq %rax, %rdi
callq 0x13b2
cmpl $0x2, %eax
jne 0x1816
movq %r12, %rdi
movq %r14, %rsi
callq 0x1831
testl %eax, %eax
jne 0x1826
movdqu (%r12), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, (%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0x1831
testl %eax, %eax
jne 0x1826
movl $0x1, 0x8(%r15)
movq %r12, %rdi
callq 0x126c
addq $0x10, %r15
jmp 0x17b8
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/create_edge.c
// Function: create_edge
static int	create_edge(char **tab, t_anthill *anthill,
			    int found_first, int found_second)
{
  t_room        *room;
  t_room        *to_link;
  t_edge        *edge;
  t_edge        *edge_link;

  room = anthill->first;
  to_link = anthill->first;
  while (room && to_link && (found_first == 0 || found_second == 0))
    {
      if (my_strcmp(room->name, tab[0]) == 0)
        found_first = 1;
      else
        room = room->next;
      if (my_strcmp(to_link->name, tab[1]) == 0)
        found_second = 1;
      else
        to_link = to_link->next;
    }
  if (found_first == 0 || found_second == 0 ||
      !(edge = malloc(sizeof(*edge)))
      || !(edge_link = malloc(sizeof(*edge_link))))
    return (ERROR);
  linking(room, to_link, edge, edge_link);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rsi), %r15
xorl %r14d, %r14d
movb $0x1, %bpl
pushq $0x1
popq %r13
movq %r15, %r12
testl %r14d, %r14d
sete %al
testq %r15, %r15
je 0x189d
testq %r12, %r12
je 0x189d
orb %bpl, %al
testb $0x1, %al
je 0x189d
movq 0x10(%r15), %rdi
movq (%rbx), %rsi
callq 0x12cf
testl %eax, %eax
je 0x187d
movq 0x28(%r15), %r15
jmp 0x1880
movl %r13d, %r14d
movq 0x10(%r12), %rdi
movq 0x8(%rbx), %rsi
callq 0x12cf
testl %eax, %eax
je 0x1899
movq 0x28(%r12), %r12
jmp 0x1850
xorl %ebp, %ebp
jmp 0x1850
testl %r14d, %r14d
sete %al
orb %bpl, %al
pushq $0x1
popq %rbx
testb $0x1, %al
jne 0x18ec
pushq $0x10
popq %rdi
callq 0x1060
testq %rax, %rax
je 0x18ec
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x1060
testq %rax, %rax
je 0x18ec
movq %r15, (%rax)
movq 0x20(%r12), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x20(%r12)
movq %r12, (%r14)
movq 0x20(%r15), %rax
movq %rax, 0x8(%r14)
movq %r14, 0x20(%r15)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/check_info.c
// Function: check_twice
int             check_twice(t_anthill *anthill,
			    const char *name,
			    const int x, const int y)
{
  t_room	*room;

  room = anthill->first;
  while (room)
    {
      if ((my_strcmp(room->name, name) == 0 ||
           (x == room->x && y == room->y)))
        return (ERROR);
      room = room->next;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
addq $0x18, %r12
pushq $0x1
popq %rbx
movq (%r12), %r12
testq %r12, %r12
je 0x1960
movq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0x12cf
testl %eax, %eax
je 0x1962
cmpl %r14d, 0x18(%r12)
jne 0x195a
cmpl %ebp, 0x1c(%r12)
je 0x1962
addq $0x28, %r12
jmp 0x1932
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/check_info.c
// Function: setup_room
int     setup_room(char **tab, t_anthill *anthill,
		   t_room *room)
{
  room->ants = 0;
  room->mark = FALSE;
  room->distance = -1;
  if ((check_pos(tab[1]) == ERROR) ||
      (check_pos(tab[2]) == ERROR))
    return (ERROR);
  room->x = my_getnbr(tab[1]);
  room->y = my_getnbr(tab[2]);
  if (check_twice(anthill, room->name,
		  room->x, room->y) == ERROR)
    return (0);
  room->next = anthill->first;
  anthill->first = room;
  room->edges = NULL;
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
andl $0x0, (%rdx)
movq %rdi, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rdx)
movq 0x8(%rdi), %r12
movq %r12, %rdi
callq 0x196d
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x1a0e
movq 0x10(%r15), %rdi
callq 0x196d
testl %eax, %eax
jne 0x1a0e
movq %r12, %rdi
callq 0x2080
movl %eax, 0x18(%rbx)
movq 0x10(%r15), %rdi
callq 0x2080
movl %eax, 0x1c(%rbx)
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
movq %r14, %rdi
movl %eax, %ecx
callq 0x1918
xorl %ebp, %ebp
testl %eax, %eax
jne 0x1a0e
movq 0x18(%r14), %rax
movq %rax, 0x28(%rbx)
movq %rbx, 0x18(%r14)
andq $0x0, 0x20(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/print_info.c
// Function: printf_info
void	printf_info(t_list *list, t_anthill *anthill)
{
  my_printf("#number_of_ants\n");
  my_printf("%i\n", anthill->ants);
  my_printf("#rooms\n");
  print_rooms(anthill->first, anthill);
  my_printf("#tunnels\n");
  print_tunnels(list);
  my_printf("#moves\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x15fe(%rip), %rdi      # 0x302b
xorl %eax, %eax
callq 0x24a4
movl (%r14), %esi
leaq 0x162e(%rip), %rdi      # 0x306c
xorl %eax, %eax
callq 0x24a4
leaq 0x15f0(%rip), %rdi      # 0x303c
xorl %eax, %eax
callq 0x24a4
movq 0x18(%r14), %rdi
movq %r14, %rsi
callq 0x1ae1
leaq 0x15de(%rip), %rdi      # 0x3044
xorl %eax, %eax
callq 0x24a4
addq $0x8, %rbx
leaq 0x15f8(%rip), %r14      # 0x3070
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1acc
movq (%rbx), %rsi
xorl %ecx, %ecx
movq %rsi, %rdx
xorl %eax, %eax
movzbl (%rdx), %edi
cmpl $0x2d, %edi
je 0x1a98
testl %edi, %edi
jne 0x1a9a
jmp 0x1aad
incl %ecx
xorl %r8d, %r8d
cmpb $0x20, %dil
sete %r8b
addl %r8d, %eax
incq %rdx
jmp 0x1a8a
cmpl $0x1, %ecx
jne 0x1ac6
testl %eax, %eax
jne 0x1ac6
cmpl $0x1, 0x8(%rbx)
jne 0x1ac6
movq %r14, %rdi
xorl %eax, %eax
callq 0x24a4
addq $0x10, %rbx
jmp 0x1a78
leaq 0x157b(%rip), %rdi      # 0x304e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24a4
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/print_info.c
// Function: print_rooms
static void	print_rooms(t_room *room, t_anthill *anthill)
{
  if (room && anthill)
    {
      if (room->next)
	print_rooms(room->next, anthill);
      if (room == anthill->entry)
	my_printf("##start\n");
      else if (room == anthill->exit)
	my_printf("##end\n");
      my_printf("%s %i %i\n", room->name, room->x, room->y);
    }
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1b21
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x1b0c
movq %r14, %rsi
callq 0x1ae1
cmpq %rbx, 0x8(%r14)
je 0x1b22
cmpq %rbx, 0x10(%r14)
jne 0x1b30
leaq 0x1540(%rip), %rdi      # 0x305f
jmp 0x1b29
retq
leaq 0x152d(%rip), %rdi      # 0x3056
xorl %eax, %eax
callq 0x24a4
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x1525(%rip), %rdi      # 0x3066
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24a4
nop
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/clear_list.c
// Function: del_in_list
t_line		*del_in_list(t_list *list, t_line *element)
{
  t_line	*temp;

  temp = NULL;
  if (element->next == NULL)
    {
      list->last = element->prev;
      if (list->last != NULL)
	list->last->next = NULL;
    }
  else if (element->prev == NULL)
    {
      list->first = element->next;
      if (list->first != NULL)
	list->first->prev = NULL;
    }
  else
    {
      element->next->prev = element->prev;
      element->prev->next = element->next;
    }
  temp = element->next;
  free(element->line);
  list->len--;
  return (temp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
movq 0x18(%rsi), %rax
testq %rcx, %rcx
je 0x1b77
testq %rax, %rax
je 0x1b87
movq %rax, 0x18(%rcx)
movq 0x18(%rsi), %rax
movq %rcx, 0x10(%rax)
jmp 0x1b90
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1b90
andq $0x0, 0x10(%rax)
jmp 0x1b90
movq %rcx, 0x8(%rbx)
andq $0x0, 0x18(%rcx)
movq (%rsi), %rdi
movq 0x10(%rsi), %r14
callq 0x1030
decl (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/clear_list.c
// Function: get_without_hashtag
char	*get_without_hashtag(char *str)
{
  int	i;

  i = 0;
  while (str[i] != '#' && str[i] != '\0')
    i++;
  if (str[i] == '\0')
    return (str);
  if (my_compare("##start", str + i, 3) == 0)
    i = i + 7;
  else if (my_compare("##end", str + i, 3) == 0)
    i = i + 5;
  while (str[i] != '\0')
    {
      if (str[i] == '#')
	{
	  str[i] = '\0';
	  return (str);
	}
      i++;
    }
  return (str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movzbl (%rbx,%r15), %eax
testl %eax, %eax
je 0x1c1d
cmpl $0x23, %eax
je 0x1bc7
incq %r15
jmp 0x1bb4
leaq (%rbx,%r15), %r14
leaq 0x144b(%rip), %rdi      # 0x301d
pushq $0x3
popq %rdx
movq %r14, %rsi
callq 0x135e
testl %eax, %eax
je 0x1bff
leaq 0x143d(%rip), %rdi      # 0x3025
pushq $0x3
popq %rdx
movq %r14, %rsi
callq 0x135e
leaq 0x5(%r15), %rcx
testl %eax, %eax
cmoveq %rcx, %r15
jmp 0x1c03
addq $0x7, %r15
movslq %r15d, %rax
addq %rbx, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x1c1d
cmpl $0x23, %ecx
je 0x1c1a
incq %rax
jmp 0x1c09
movb $0x0, (%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/clear_list.c
// Function: clear_list
int             clear_list(t_list *list)
{
  t_line     *element;

  if (list != NULL)
    {
      element = list->first;
      while (element)
        {
	  if (my_strlen(element->line) == 0)
	    del_in_list(list, element);
          else if (element->line[0] == '#' &&
		   my_compare(element->line, "##start", 7) != 0
		   && my_compare(element->line, "##end", 5) != 0)
	    del_in_list(list, element);
	  else
	    element->line = get_without_hashtag(element->line);
	  element = element->next;
        }
    }
  return (0);
}

// Assembly:
testq %rdi, %rdi
je 0x1cc6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x13d5(%rip), %r15      # 0x301d
pushq $0x7
popq %rbp
pushq $0x5
popq %r13
movq (%r14), %r14
testq %r14, %r14
je 0x1cb8
movq (%r14), %rdi
callq 0x22e0
testl %eax, %eax
je 0x1c97
movq (%r14), %r12
cmpb $0x23, (%r12)
jne 0x1ca7
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x135e
movq (%r14), %r12
testl %eax, %eax
je 0x1ca7
movq %r12, %rdi
leaq 0x139a(%rip), %rsi      # 0x3025
movl %r13d, %edx
callq 0x135e
testl %eax, %eax
je 0x1ca4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b50
jmp 0x1cb2
movq (%r14), %r12
movq %r12, %rdi
callq 0x1ba9
movq %r12, (%r14)
addq $0x10, %r14
jmp 0x1c4f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/free_list.c
// Function: free_list
int		free_list(t_list *list)
{
  t_line	*element;
  t_line	*element_prev;

  if (list)
    {
      element = list->first;
      while (element)
	{
	  element_prev = element;
	  element = element->next;
	  free(element_prev->line);
	  free(element_prev);
	}
    }
  return (0);
}

// Assembly:
testq %rdi, %rdi
je 0x1cfe
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x1cf7
movq (%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
jmp 0x1cd9
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/algo.c
// Function: move_ants
int      move_ants(t_ant *ants, t_anthill *anthill)
{
  int	i;
  int	is_beginning;

  while (is_end(ants, anthill) == FALSE)
    {
      i = 0;
      is_beginning = TRUE;
      while (i < anthill->entry->ants)
	{
	  if (ants[i].now != anthill->exit)
	    is_beginning = find_a_way(ants, anthill, is_beginning, i);
	  i += 1;
	}
      if (is_beginning == TRUE)
	return (84);
      my_printf("\n");
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbp
movq %rdi, %r15
movq %rdi, 0x18(%rsp)
movq %rsi, 0x30(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x1f24
testl %eax, %eax
jne 0x1ee1
xorl %ecx, %ecx
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
movq 0x8(%rbp), %rax
movslq (%rax), %rdx
movq %rdx, 0x20(%rsp)
cmpq %rdx, %rcx
jge 0x1ec7
movq %rcx, %rbx
shlq $0x4, %rbx
movq (%r15,%rbx), %r14
cmpq 0x10(%rbp), %r14
je 0x1ebf
movq %rcx, 0x8(%rsp)
addq %r15, %rbx
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x1da3
movq %r15, %rdi
movq 0x20(%rsp), %rdx
movq %rbp, %rcx
callq 0x1f65
movq 0x8(%rbx), %rcx
cmpl $0x1, %eax
jne 0x1daa
movq %rcx, (%rbx)
andq $0x0, 0x8(%rbx)
movq 0x10(%rcx), %rdx
jmp 0x1e90
movq %rbx, 0x10(%rsp)
jmp 0x1dcb
testq %rcx, %rcx
movq 0x8(%rsp), %rcx
jne 0x1ebf
movq %rbx, 0x10(%rsp)
movq (%rbx), %r14
movq 0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, 0x20(%rsp)
addq $0x20, %r14
pushq $-0x1
popq %r15
movq (%r14), %r14
testq %r14, %r14
je 0x1e51
movq (%r14), %r12
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq 0x20(%rsp), %r13
movl %r13d, %edx
movq %rbp, %rcx
callq 0x1f65
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x1fa5
cmpl $0x1, %ebp
movq 0x30(%rsp), %rbp
movq (%r14), %rcx
movl 0x8(%rcx), %edx
adcl %edx, %eax
cmpl $-0x1, %r15d
sete %sil
cmpl %eax, %r15d
setg %dil
orb %sil, %dil
cmpl $-0x1, %edx
cmovel %r15d, %eax
movq 0x28(%rsp), %rdx
cmoveq %rdx, %rcx
testb %dil, %dil
cmovnel %eax, %r15d
cmovneq %rcx, %rdx
movq %rdx, 0x28(%rsp)
addq $0x8, %r14
jmp 0x1dd3
cmpl $-0x1, %r15d
je 0x1eaa
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
movq 0x18(%rsp), %r15
je 0x1eba
movq 0x8(%rbp), %rax
movl (%rax), %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x1f65
cmpl $0x1, %eax
jne 0x1eb1
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
andq $0x0, 0x8(%rax)
movq 0x10(%rbx), %rdx
movq 0x8(%rsp), %rbx
leal 0x1(%rbx), %esi
movl 0x4(%rsp), %edi
callq 0x1ef7
movq %rbx, %rcx
movl %eax, 0x4(%rsp)
jmp 0x1ebf
movq 0x18(%rsp), %r15
jmp 0x1eba
movq 0x10(%rsp), %rax
movq %rbx, 0x8(%rax)
movq 0x8(%rsp), %rcx
incq %rcx
jmp 0x1d3e
cmpl $0x1, 0x4(%rsp)
je 0x1ee5
leaq 0x118f(%rip), %rdi      # 0x3064
xorl %eax, %eax
callq 0x24a4
jmp 0x1d22
xorl %eax, %eax
jmp 0x1ee8
pushq $0x54
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/algo_fcts.c
// Function: is_empty
int      is_empty(t_ant *ants, t_room *room, int nb, t_anthill *anthill)
{
  int	i;

  if (!ants || !room)
    return (TRUE);
  if (room == anthill->exit)
    return (TRUE);
  i = 0;
  while (i < nb)
    {
      if (ants[i].now == room)
	return (FALSE);
      i += 1;
    }
  return (TRUE);
}

// Assembly:
testq %rdi, %rdi
sete %r8b
testq %rsi, %rsi
sete %r9b
pushq $0x1
popq %rax
orb %r8b, %r9b
jne 0x1fa4
cmpq %rsi, 0x10(%rcx)
je 0x1fa4
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
shlq $0x4, %rdx
addq $0x10, %rdx
leaq 0x10(%rcx), %r8
cmpq %r8, %rdx
je 0x1fa4
cmpq %rsi, (%rdi,%rcx)
movq %r8, %rcx
jne 0x1f90
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/algo_fcts.c
// Function: nb_in_next
int      nb_in_next(t_ant *ants, t_room *room, int nb)
{
  int	i;
  int	nb_in_next;

  if (!ants || !room)
    return (-1);
  i = 0;
  nb_in_next = 0;
  while (i < nb)
    {
      if (ants[i].next == room)
	nb_in_next++;
      i += 1;
    }
  return (nb_in_next);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1fdc
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
shlq $0x4, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
je 0x1fdf
xorl %r8d, %r8d
cmpq %rsi, 0x8(%rdi,%rcx)
sete %r8b
addl %r8d, %eax
addq $0x10, %rcx
jmp 0x1fc2
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/resolve.c
// Function: explore
void		explore(t_room *room, int i,
			t_anthill *anthill)
{
  t_edge	*edge;

  room->mark = TRUE;
  edge = room->edges;
  if (anthill->exit == room)
    room->distance = 0;
  while (edge)
    {
      if (i != -1 && (edge->connect->distance > i ||
		      edge->connect->distance == -1))
	edge->connect->distance = i;
      edge = edge->next;
    }
  edge = room->edges;
  while (edge)
    {
      if (edge->connect->mark == FALSE ||
	  edge->connect->distance >= i)
	{
	  edge->connect->mark = TRUE;
	  explore(edge->connect, i + 1, anthill);
	}
      edge = edge->next;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movl $0x1, 0xc(%rdi)
cmpq %rdi, 0x10(%rdx)
jne 0x1ffe
andl $0x0, 0x8(%rdi)
movq 0x20(%rdi), %r15
movq %r15, %rax
testq %rax, %rax
je 0x2032
cmpl $-0x1, %r14d
je 0x202c
movq (%rax), %rcx
movl 0x8(%rcx), %edx
cmpl %r14d, %edx
setle %sil
cmpl $-0x1, %edx
setne %dl
testb %dl, %sil
jne 0x202c
movl %r14d, 0x8(%rcx)
movq 0x8(%rax), %rax
jmp 0x2005
leal 0x1(%r14), %ebp
testq %r15, %r15
je 0x2061
movq (%r15), %rdi
cmpl $0x0, 0xc(%rdi)
je 0x204a
cmpl %r14d, 0x8(%rdi)
jl 0x205b
movl $0x1, 0xc(%rdi)
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fe0
movq 0x8(%r15), %r15
jmp 0x2036
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/my_getnbr.c
// Function: my_getnbr
int	my_getnbr(const char *str)
{
  int	var;
  int	inv;
  int	i;

  if (!str)
    return (0);
  inv = 1;
  var = 0;
  i = 0;
  while ((str[i] < 48 || str[i] > 57) && str[i] != 0)
    i = i + 1;
  if (i > 0 && str[i - 1] == 45)
    inv = -1;
  while (str[i] != 0 && str[i] >= '0' && str[i] <= '9')
    {
      var = var * 10;
      var = var + str[i] - 48;
      i = i + 1;
    }
  var = var * inv;
  return (var);
}

// Assembly:
testq %rdi, %rdi
je 0x20a4
xorl %eax, %eax
movb (%rdi,%rax), %cl
incq %rax
testb %cl, %cl
je 0x2099
leal -0x30(%rcx), %edx
cmpb $0x9, %dl
ja 0x2087
cmpq $0x1, %rax
jne 0x20a7
pushq $0x1
popq %rdx
jmp 0x20b8
xorl %eax, %eax
retq
xorl %edx, %edx
cmpb $0x2d, -0x2(%rdi,%rax)
setne %dl
leal -0x1(,%rdx,2), %edx
addq %rax, %rdi
xorl %eax, %eax
leal -0x30(%rcx), %esi
cmpb $0x9, %sil
ja 0x20d8
movzbl %cl, %ecx
imull $0xa, %eax, %eax
addl %ecx, %eax
addl $-0x30, %eax
movb (%rdi), %cl
incq %rdi
jmp 0x20bd
imull %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/recup_info.c
// Function: recup_info
int		recup_info(t_list *list, t_anthill *anthill)
{
  t_line	*new_element;
  char		*s;

  while ((s = get_next_line(0)))
    {
      if (s[0] == 0)
	return (ERROR);
      epur_str(s);
      if (!(new_element = malloc(sizeof(*new_element))) ||
	  (!(new_element->line = my_strdup(s))))
	return (ERROR);
      setup_list(new_element, list);
      free(s);
    }
  clear_list(list);
  if (list->first == NULL)
    return (ERROR);
  return (parse_info(list, anthill));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbp
pushq $0x20
popq %r15
xorl %edi, %edi
callq 0x13d8
testq %rax, %rax
je 0x2167
movq %rax, %r12
cmpb $0x0, (%rax)
je 0x218f
movq %r12, %rdi
callq 0x1568
movq %r15, %rdi
callq 0x1060
testq %rax, %rax
je 0x218f
movq %rax, %r13
movq %r12, %rdi
callq 0x1318
movq %rax, (%r13)
testq %rax, %rax
je 0x218f
incl (%r14)
andl $0x0, 0x8(%r13)
movq 0x10(%r14), %rax
movq %rax, 0x18(%r13)
andq $0x0, 0x10(%r13)
leaq 0x10(%rax), %rcx
testq %rax, %rax
cmoveq %rbp, %rcx
movq %r13, (%rcx)
movq %r13, 0x10(%r14)
movq %r12, %rdi
callq 0x1030
jmp 0x20f5
movq %r14, %rdi
callq 0x1c26
cmpq $0x0, 0x8(%r14)
je 0x218f
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15c8
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/src/my_str_to_wordtab.c
// Function: my_str_to_wordtab
char    **my_str_to_wordtab(char *str, const char s)
{
  t_tab	tab;

  tab.i = 0;
  tab.y = 0;
  tab.k = 0;
  if ((tab.array = malloc(sizeof(*tab.array) * count_words(str, s))) == NULL)
    return (NULL);
  tab.nb = 0;
  while (str[tab.i])
    {
      tab.nb = tab.i;
      while (str[tab.nb] && str[tab.nb] != s && str[tab.nb])
	tab.nb++;
      if ((tab.array[tab.k] = malloc(sizeof(tab.array) * tab.nb)) == NULL)
	return (NULL);
      tab.nb = 0;
      tab.y = 0;
      while (str[tab.i] && str[tab.i] != s)
	tab.array[tab.k][tab.y++] = str[tab.i++];
      tab.array[tab.k++][tab.y] = '\0';
      while (str[tab.i] && str[tab.i] == s)
	tab.i++;
    }
  tab.array[tab.k] = NULL;
  return (tab.array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %eax, %eax
movslq %ecx, %rdx
cmpb $0x0, (%r14,%rdx)
je 0x21ef
decq %rdx
movq %rdx, %rcx
movb 0x1(%r14,%rdx), %sil
testb %sil, %sil
je 0x21db
leaq 0x1(%rcx), %rdx
cmpb %bl, %sil
jne 0x21c5
movb 0x1(%r14,%rcx), %dl
incq %rcx
testb %dl, %dl
je 0x21eb
cmpb %bl, %dl
je 0x21db
incl %eax
jmp 0x21b8
movl %eax, %eax
leaq 0x8(,%rax,8), %rdi
callq 0x1060
testq %rax, %rax
je 0x2281
movq %rax, %r15
xorl %r12d, %r12d
xorl %ecx, %ecx
movslq %ecx, %r13
movb (%r14,%r13), %bpl
testb %bpl, %bpl
je 0x2286
leaq -0x8(,%r13,8), %rdi
leaq (%r14,%r13), %rax
movb (%rax), %cl
addq $0x8, %rdi
testb %cl, %cl
je 0x2234
incq %rax
cmpb %bl, %cl
jne 0x2223
callq 0x1060
movq %rax, (%r15,%r12,8)
testq %rax, %rax
je 0x2281
leaq -0x1(%r13), %rcx
xorl %edx, %edx
testb %bpl, %bpl
je 0x2266
cmpb %bl, %bpl
je 0x2266
movb %bpl, (%rax,%rdx)
incq %rdx
movb 0x1(%r14,%r13), %bpl
incq %r13
incq %rcx
jmp 0x2248
movl %edx, %edx
movb $0x0, (%rax,%rdx)
movb 0x1(%r14,%rcx), %al
incq %rcx
testb %al, %al
je 0x227c
cmpb %bl, %al
je 0x226c
incq %r12
jmp 0x220b
xorl %r15d, %r15d
jmp 0x228e
movl %r12d, %eax
andq $0x0, (%r15,%rax,8)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_put_nbr.c
// Function: my_put_nbr
int	my_put_nbr(int nb)
{
  int	modulo;

  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb == 0)
    {
      my_putchar('0');
      return (0);
    }
  if (nb > 0)
    {
      if (nb > 9)
	{
	  modulo = nb % 10;
	  nb = (nb - modulo) / 10;
	  my_put_nbr(nb);
	  my_putchar(48 + modulo);
	}
      else
	my_putchar(nb + 48);
    }
  return (0);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
testl %edi, %edi
js 0x23e1
jne 0x23eb
movb $0x30, %bl
jmp 0x2405
pushq $0x2d
popq %rdi
callq 0x22a0
negl %ebx
cmpl $0x9, %ebx
jbe 0x2402
pushq $0xa
popq %rcx
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebx
movl %eax, %edi
callq 0x23d4
orb $0x30, %bl
movsbl %bl, %edi
callq 0x22a0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_put_long.c
// Function: my_put_long
static long	my_put_long(long nb)
{
  long		modulo;

  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb > 0)
    {
      if (nb > 9)
	{
	  modulo = nb % 10;
	  nb = (nb - modulo) / 10;
	  my_put_long(nb);
	  my_putchar(48 + modulo);
	}
      else
	my_putchar(nb + 48);
    }
  return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
js 0x2470
jne 0x247b
popq %rbx
retq
pushq $0x2d
popq %rdi
callq 0x22a0
negq %rbx
cmpq $0x9, %rbx
jbe 0x2497
pushq $0xa
popq %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rbx
movq %rax, %rdi
callq 0x2463
orb $0x30, %bl
movsbl %bl, %edi
popq %rbx
jmp 0x22a0
nop
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_printf.c
// Function: my_printf
int		my_printf(const char *flag, ...)
{
  va_list	ap;
  int		i;

  i = 0;
  va_start(ap, flag);
  if (flag == NULL)
    return (0);
  else
    while (flag[i] != '\0')
      {
	while (flag[i] == '%')
	  {
	    i++;
	    my_flag(flag[i++], ap, "dilcsboxSpy");
	  }
	if (flag[i] == '\0')
	  return (0);
	else if (flag[i] != '%')
	  my_putchar(flag[i]);
	i++;
      }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
leaq 0x90(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2518
movaps %xmm0, 0xc0(%rsp)
movaps %xmm1, 0xd0(%rsp)
movaps %xmm2, 0xe0(%rsp)
movaps %xmm3, 0xf0(%rsp)
movaps %xmm4, 0x100(%rsp)
movaps %xmm5, 0x110(%rsp)
movaps %xmm6, 0x120(%rsp)
movaps %xmm7, 0x130(%rsp)
movq %rdi, 0x20(%rsp)
leaq 0x180(%rsp), %rax
movq %rax, 0x18(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, 0x10(%rsp)
testq %rbx, %rbx
je 0x2648
xorl %r15d, %r15d
pushq $0x25
popq %rbp
leaq 0xb3f(%rip), %r13       # 0x308e
leaq 0x10(%rsp), %r14
movq %rbx, (%rsp)
movslq %r15d, %r15
movb (%rbx,%r15), %al
testb %al, %al
je 0x2648
cmpb $0x25, %al
jne 0x2631
movq %r15, 0x8(%rsp)
movb 0x1(%rbx,%r15), %bl
leaq -0x16f(%rip), %rax      # 0x2411
movq %rax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
leaq -0x155(%rip), %rax      # 0x243c
movq %rax, 0x40(%rsp)
leaq -0x2e7(%rip), %rax      # 0x22b6
movq %rax, 0x48(%rsp)
leaq -0x200(%rip), %rax      # 0x23a9
movq %rax, 0x50(%rsp)
leaq 0x10a(%rip), %rax       # 0x26bf
movq %rax, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq -0x2db(%rip), %rax      # 0x22f0
movq %rax, 0x70(%rsp)
leaq 0x171(%rip), %rax       # 0x2748
movq %rax, 0x78(%rsp)
leaq 0x23a(%rip), %rax       # 0x281d
movq %rax, 0x80(%rsp)
movsbl %bl, %r15d
xorl %r12d, %r12d
cmpq $0xa, %r12
je 0x261a
cmpb $0x25, %bl
jne 0x2604
movl %ebp, %edi
callq 0x22a0
cmpb %bl, (%r12,%r13)
jne 0x2615
movq %r14, %rdi
movl %r15d, %esi
callq *0x30(%rsp,%r12,8)
incq %r12
jmp 0x25f2
movq (%rsp), %rbx
movq 0x8(%rsp), %r15
movb 0x2(%rbx,%r15), %al
addq $0x2, %r15
jmp 0x2567
movzbl %al, %ecx
testl %ecx, %ecx
je 0x2648
movsbl %al, %edi
callq 0x22a0
incq %r15
jmp 0x2558
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_base.c
// Function: my_base
int	my_base(int nb, const char *base)
{
  int	result;
  int	modulo;

  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  result = nb / my_strlen(base);
  modulo = nb % my_strlen(base);
  if (result > 0)
    my_base(result, base);
  my_putchar(base[modulo]);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
testl %edi, %edi
jns 0x2676
pushq $0x2d
popq %rdi
callq 0x22a0
negl %ebp
movq %rbx, %rdi
callq 0x22e0
movl %eax, %ecx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %r15d
movq %rbx, %rdi
callq 0x22e0
movl %eax, %r14d
testl %r15d, %r15d
jle 0x26a3
movl %r15d, %edi
movq %rbx, %rsi
callq 0x265c
movl %ebp, %eax
cltd
idivl %r14d
movsbl (%rbx,%rdx), %edi
callq 0x22a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_base.c
// Function: my_base_pointer
void	my_base_pointer(va_list ap, char flag)
{
  if ('x' == flag)
    my_base(va_arg(ap, int), "0123456789abcdef");
  else if ('o' == flag)
    my_base(va_arg(ap, int), "01234567");
  else
    my_base(va_arg(ap, int), "01");
}

// Assembly:
movl (%rdi), %ecx
cmpl $0x6f, %esi
je 0x26de
cmpl $0x78, %esi
jne 0x26f1
cmpl $0x28, %ecx
ja 0x2704
movq 0x10(%rdi), %rax
addq %rcx, %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x2710
cmpl $0x28, %ecx
ja 0x2719
movq 0x10(%rdi), %rax
addq %rcx, %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x2725
cmpl $0x28, %ecx
ja 0x272e
movq %rcx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x273a
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x983(%rip), %rsi       # 0x309a
jmp 0x2741
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x954(%rip), %rsi       # 0x3080
jmp 0x2741
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x96a(%rip), %rsi       # 0x30ab
movl (%rax), %edi
jmp 0x265c
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_put_pointers.c
// Function: my_base_pointers
static long	my_base_pointers(long nb, const char *base)
{
  long		result;
  long		modulo;

  if (nb < 0)
    {
      my_putchar('-');
      nb = -nb;
    }
  result = nb / my_strlen(base);
  modulo = nb % my_strlen(base);
  if (result > 0)
    my_base_pointers(result, base);
  my_putchar(base[modulo]);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jns 0x279a
pushq $0x2d
popq %rdi
callq 0x22a0
negq %rbx
leaq 0x910(%rip), %r14       # 0x30b1
movq %r14, %rdi
callq 0x22e0
movslq %eax, %rcx
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %r15
movq %r14, %rdi
callq 0x22e0
movl %eax, %ebp
testq %r15, %r15
jle 0x27ce
movq %r15, %rdi
callq 0x2780
movslq %ebp, %rcx
movq %rbx, %rax
cqto
idivq %rcx
movsbl (%rdx,%r14), %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Vatoth[P]CPE_2016_Lemin/my_printf/my_put_unsigned.c
// Function: my_put_unsigned
int     my_put_unsigned(unsigned int nb)
{
  int   modulo;

  if (nb > 0)
    {
      if (nb > 9)
	{
	  modulo = nb % 10;
	  nb = (nb - modulo) / 10;
	  my_put_nbr(nb);
	  my_putchar(48 + modulo);
	}
      else
	{
	  my_putchar(nb + 48);
	}
    }
  return (0);
}

// Assembly:
testl %edi, %edi
je 0x281a
pushq %rbx
movl %edi, %ebx
cmpl $0xa, %edi
jb 0x280e
pushq $0xa
popq %rcx
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebx
movl %eax, %edi
callq 0x23d4
orb $0x30, %bl
movsbl %bl, %edi
callq 0x22a0
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Carben-dev[P]ext2fs-simple-utilities/ext2_rm.c
// Function: main
int main(int argc, const char * argv[]) {
    if(argc != 3) {
        fprintf(stderr, "Usage: <image file name> <absolute path of rm file>\n");
        exit(1);
    }
    int fd = open(argv[1], O_RDWR);
    
    // map disk img into memory
    disk = mmap(NULL, 128 * 1024, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
    if(disk == MAP_FAILED) {
        perror("mmap");
        exit(1);
    }
    
    // Init utils
    ext2_utils_init();
    
    //
    unsigned long path_len = strlen(argv[2]) + 1;
    char path[path_len];
    char path_parent[path_len];
    char path_name[EXT2_NAME_LEN];
    
    strcpy(path, argv[2]);
    clear_end_slash(path);
    cut_path(path, path_parent, path_name);
    
    // check if exist
    int parent_inode_num = get_inode_number_by_path(path_parent);
    int file_inode_num = get_inode_number_by_path(path);
    if (file_inode_num < 0) {
        return ENOENT;
    }
    
    struct ext2_inode *parent_inode = inode_table + parent_inode_num - 1;
    struct ext2_inode *file_inode = inode_table + file_inode_num - 1;
    if (file_inode->i_mode & EXT2_S_IFDIR) {
        return EISDIR;
    }
    
    remove_from_dir_entry(parent_inode, path_name);
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
cmpl $0x3, %edi
jne 0x132f
movq %rsi, %r14
movq 0x8(%rsi), %rdi
pushq $0x2
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x10f0
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
movl $0x20000, %esi          # imm = 0x20000
xorl %edi, %edi
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x1080
movq %rax, 0x3e37(%rip)      # 0x50b0
cmpq $-0x1, %rax
je 0x134d
callq 0x1364
movq 0x10(%r14), %r15
movq %r15, %rdi
callq 0x1070
movq %rsp, %r14
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq %r14, %rdi
movq %r15, %rsi
callq 0x1060
movq %r14, %rdi
callq 0x1f9f
leaq -0x120(%rbp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1fb6
movq %r12, %rdi
callq 0x15eb
movl %eax, %r15d
movq %r14, %rdi
callq 0x15eb
testl %eax, %eax
js 0x1320
movq 0x3dc7(%rip), %rcx      # 0x50b8
movl %eax, %eax
shlq $0x7, %rax
testb $0x40, -0x7f(%rcx,%rax)
jne 0x131d
movslq %r15d, %rax
shlq $0x7, %rax
leaq (%rcx,%rax), %rdi
addq $-0x80, %rdi
leaq -0x120(%rbp), %rsi
callq 0x19a4
xorl %ebx, %ebx
jmp 0x1320
pushq $0x15
popq %rbx
movl %ebx, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3cc2(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x1cc4(%rip), %rdi      # 0x3004
pushq $0x34
popq %rsi
pushq $0x1
popq %rdx
callq 0x1120
jmp 0x1359
leaq 0x1ce5(%rip), %rdi      # 0x3039
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1110
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/C.c
// Function: skip_string
void
skip_string(key)
	int	key;
{
	int	c,
		skip;

	for (skip = NO; GETC(!=, EOF); )
		switch (c) {
		case '\\':		/* a backslash escapes anything */
			skip = !skip;	/* we toggle in case it's "\\" */
			break;
		case '\n':
			SETLINE;
			/*FALLTHROUGH*/
		default:
			if (c == key && !skip)
				return;
			skip = NO;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0x3785(%rip), %r14      # 0x5150
leaq 0x3c9e(%rip), %r12      # 0x5670
leaq 0x44a7(%rip), %r13      # 0x5e80
movq (%r14), %rdi
callq 0x11d0
movl %eax, %ebp
cmpl $0xa, %eax
je 0x19fa
cmpl $0x5c, %ebp
je 0x19f4
cmpl $-0x1, %ebp
jne 0x1a0a
jmp 0x1a17
xorl $0x1, %r15d
jmp 0x19d9
incl (%r12)
movq (%r14), %rdi
callq 0x1110
movq %rax, (%r13)
xorl %ebx, %ebp
orl %r15d, %ebp
movl $0x0, %r15d
jne 0x19d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/C.c
// Function: skip_comment
void
skip_comment()
{
	int	c;			/* character read */
	int	star;			/* '*' flag */

	for (star = 0; GETC(!=, EOF);)
		switch(c) {
		/* comments don't nest, nor can they be escaped. */
		case '*':
			star = YES;
			break;
		case '/':
			if (star)
				return;
			break;
		case '\n':
			SETLINE;
			/*FALLTHROUGH*/
		default:
			star = NO;
			break;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %cl
leaq 0x371a(%rip), %rbx      # 0x5150
leaq 0x3c33(%rip), %r14      # 0x5670
leaq 0x443c(%rip), %r15      # 0x5e80
movl %ecx, %ebp
movq (%rbx), %rdi
callq 0x11d0
cmpl $0xa, %eax
je 0x1a66
xorl %ecx, %ecx
cmpl $0x2a, %eax
je 0x1a44
cmpl $0x2f, %eax
je 0x1a78
cmpl $-0x1, %eax
jne 0x1a74
jmp 0x1a80
incl (%r14)
movq (%rbx), %rdi
callq 0x1110
movq %rax, (%r15)
movb $0x1, %cl
jmp 0x1a44
movb $0x1, %cl
testb $0x1, %bpl
jne 0x1a44
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq