LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x18(%rsi), %r15
testq %r15, %r15
je 0x191e
movq %rdi, %rbx
xorl %ebp, %ebp
movq %r15, %r14
xorl %r12d, %r12d
testl %ebp, %ebp
sete %al
testl %r12d, %r12d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1909
movq 0x10(%r14), %rdi
movq (%rbx), %rsi
callq 0x1325
testl %eax, %eax
je 0x18dd
movq 0x28(%r14), %r14
jmp 0x18e2
movl $0x1, %ebp
movq 0x10(%r15), %rdi
movq 0x8(%rbx), %rsi
callq 0x1325
testl %eax, %eax
je 0x18f9
movq 0x28(%r15), %r15
jmp 0x18ff
movl $0x1, %r12d
testq %r14, %r14
je 0x1909
testq %r15, %r15
jne 0x18b5
movq %r15, %r13
testl %ebp, %ebp
sete %cl
testl %r12d, %r12d
sete %al
orb %cl, %al
movq %r14, %r15
jmp 0x1923
movb $0x1, %al
movq %r15, %r13
movl $0x1, %ebx
testb %al, %al
jne 0x196d
movl $0x10, %edi
callq 0x1080
testq %rax, %rax
je 0x196d
movq %rax, %r14
movl $0x10, %edi
callq 0x1080
testq %rax, %rax
je 0x196d
movq %r15, (%rax)
movq 0x20(%r13), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x20(%r13)
movq %r13, (%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
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x19e6
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x1325
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x19e8
cmpl %ebp, 0x18(%r15)
jne 0x19dd
cmpl %ebx, 0x1c(%r15)
je 0x19e8
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x19ba
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x0, (%rdx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rdx)
movq 0x8(%rdi), %rdi
movb (%rdi), %cl
testb %cl, %cl
je 0x1a68
leaq 0x1(%rdi), %rax
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
cmpb $0x2d, %cl
sete %cl
orb %dl, %cl
je 0x1ad4
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x1a4c
movq 0x10(%r15), %rax
movb (%rax), %cl
testb %cl, %cl
je 0x1a91
incq %rax
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
cmpb $0x2d, %cl
sete %cl
orb %dl, %cl
je 0x1ad4
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x1a75
callq 0x216c
movl %eax, 0x18(%rbx)
movq 0x10(%r15), %rdi
callq 0x216c
movl %eax, 0x1c(%rbx)
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
movq %r14, %rdi
movl %eax, %ecx
callq 0x19a3
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x1ad9
movq 0x18(%r14), %rcx
movq %rcx, 0x28(%rbx)
movq %rbx, 0x18(%r14)
movq $0x0, 0x20(%rbx)
jmp 0x1ad9
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x153a(%rip), %rdi      # 0x302b
xorl %eax, %eax
callq 0x26c4
movl (%r14), %esi
leaq 0x156a(%rip), %rdi      # 0x306c
xorl %eax, %eax
callq 0x26c4
leaq 0x152c(%rip), %rdi      # 0x303c
xorl %eax, %eax
callq 0x26c4
movq 0x18(%r14), %rdi
movq %r14, %rsi
callq 0x1ba6
leaq 0x151a(%rip), %rdi      # 0x3044
xorl %eax, %eax
callq 0x26c4
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1b91
leaq 0x152f(%rip), %rbx      # 0x3070
movq (%r14), %rsi
movq %rsi, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%rdx), %edi
cmpl $0x2d, %edi
je 0x1b59
testl %edi, %edi
jne 0x1b5b
jmp 0x1b6e
incl %ecx
xorl %r8d, %r8d
cmpb $0x20, %dil
sete %r8b
addl %r8d, %eax
incq %rdx
jmp 0x1b4b
cmpl $0x1, %ecx
jne 0x1b88
testl %eax, %eax
jne 0x1b88
cmpl $0x1, 0x8(%r14)
jne 0x1b88
movq %rbx, %rdi
xorl %eax, %eax
callq 0x26c4
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1b41
leaq 0x14b6(%rip), %rdi      # 0x304e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x26c4
// File: /workspace/github_c_makefile_star2_O1/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 0x1be6
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x1bd1
movq %r14, %rsi
callq 0x1ba6
cmpq %rbx, 0x8(%r14)
je 0x1be7
cmpq %rbx, 0x10(%r14)
jne 0x1bf5
leaq 0x147b(%rip), %rdi      # 0x305f
jmp 0x1bee
retq
leaq 0x1468(%rip), %rdi      # 0x3056
xorl %eax, %eax
callq 0x26c4
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x1460(%rip), %rdi      # 0x3066
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x26c4
// File: /workspace/github_c_makefile_star2_O1/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 0x1c3b
testq %rax, %rax
je 0x1c4e
movq %rax, 0x18(%rcx)
movq 0x18(%rsi), %rax
movq %rcx, 0x10(%rax)
jmp 0x1c5a
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1c5a
movq $0x0, 0x10(%rax)
jmp 0x1c5a
movq %rcx, 0x8(%rbx)
movq $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_O1/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 0x1ceb
cmpl $0x23, %eax
je 0x1c91
incq %r15
jmp 0x1c7e
leaq (%rbx,%r15), %r14
leaq 0x1381(%rip), %rdi      # 0x301d
movq %r14, %rsi
movl $0x3, %edx
callq 0x13c2
testl %eax, %eax
je 0x1ccd
leaq 0x1371(%rip), %rdi      # 0x3025
movq %r14, %rsi
movl $0x3, %edx
callq 0x13c2
leaq 0x5(%r15), %rcx
testl %eax, %eax
cmoveq %rcx, %r15
jmp 0x1cd1
addq $0x7, %r15
movslq %r15d, %rax
addq %rbx, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x1ceb
cmpl $0x23, %ecx
je 0x1ce8
incq %rax
jmp 0x1cd7
movb $0x0, (%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1d86
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x1d7d
leaq 0x1304(%rip), %r15      # 0x301d
leaq 0x1305(%rip), %r12      # 0x3025
movq (%r14), %rdi
callq 0x24a8
testl %eax, %eax
je 0x1d59
movq (%r14), %rdi
cmpb $0x23, (%rdi)
jne 0x1d66
movq %r15, %rsi
movl $0x7, %edx
callq 0x13c2
testl %eax, %eax
je 0x1d66
movq (%r14), %rdi
movq %r12, %rsi
movl $0x5, %edx
callq 0x13c2
testl %eax, %eax
je 0x1d66
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c14
jmp 0x1d74
movq (%r14), %r13
movq %r13, %rdi
callq 0x1c73
movq %r13, (%r14)
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1d20
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x1dc1
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x1dba
movq (%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x1d9e
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rdi, %rbx
callq 0x1ffc
movl $0x0, 0x4(%rsp)
testl %eax, %eax
je 0x1dfc
movl 0x4(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, 0x10(%rsp)
movq %r12, 0x30(%rsp)
movq 0x8(%r12), %rax
movl (%rax), %edx
movl $0x54, 0x4(%rsp)
testl %edx, %edx
jle 0x1de9
movl $0x1, %ebp
xorl %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
movq (%rbx,%rax), %rcx
cmpq 0x10(%r12), %rcx
je 0x1f7e
leaq (%rbx,%rax), %r13
movq 0x8(%rbx,%rax), %rsi
testq %rsi, %rsi
je 0x1e6e
movq %rbx, %rdi
movq %r12, %rcx
callq 0x203a
cmpl $0x1, %eax
jne 0x1e6e
movq 0x8(%r13), %rax
movq %rax, (%r13)
movq $0x0, 0x8(%r13)
movq 0x10(%rax), %rdx
jmp 0x1f71
cmpq $0x0, 0x8(%r13)
jne 0x1f7e
movq (%r13), %rax
movq 0x20(%rax), %r14
testq %r14, %r14
je 0x1f3f
movq %r13, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
movq %r15, 0x28(%rsp)
movq 0x8(%r12), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq (%r14), %rbp
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %r13d
movl %r13d, %edx
movq %r12, %rcx
callq 0x203a
movl %eax, %r12d
movq %r15, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x207f
cmpl $0x1, %r12d
adcl $0x0, %eax
cmpl $-0x1, %ebx
je 0x1eef
movq (%r14), %rcx
movl 0x8(%rcx), %ecx
addl %eax, %ecx
cmpl %ecx, %ebx
jle 0x1f0b
movq (%r14), %rcx
movl 0x8(%rcx), %edx
addl %edx, %eax
cmpl $-0x1, %edx
cmovnel %eax, %ebx
movq 0x18(%rsp), %rax
cmovneq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %r14
testq %r14, %r14
movq 0x30(%rsp), %r12
jne 0x1ea8
cmpl $-0x1, %ebx
movl $0x0, %eax
movq 0x18(%rsp), %r14
cmoveq %rax, %r14
movq 0x10(%rsp), %rbx
movq 0x28(%rsp), %r15
movl 0x8(%rsp), %ebp
movq 0x20(%rsp), %r13
jmp 0x1f42
xorl %r14d, %r14d
testq %r14, %r14
je 0x1f7e
movq 0x8(%r12), %rax
movl (%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0x203a
cmpl $0x1, %eax
jne 0x1f94
movq %r14, (%r13)
movq $0x0, 0x8(%r13)
movq 0x10(%r14), %rdx
leal 0x1(%r15), %esi
movl %ebp, %edi
callq 0x1fd1
movl %eax, %ebp
incq %r15
movq 0x8(%r12), %rax
movslq (%rax), %rdx
cmpq %rdx, %r15
jl 0x1e21
jmp 0x1f9a
movq %r14, 0x8(%r13)
jmp 0x1f7e
cmpl $0x1, %ebp
je 0x1de9
movl $0x0, 0x4(%rsp)
leaq 0x10b2(%rip), %rdi      # 0x3064
xorl %eax, %eax
callq 0x26c4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ffc
testl %eax, %eax
je 0x1e06
jmp 0x1de9
// File: /workspace/github_c_makefile_star2_O1/Vatoth[P]CPE_2016_Lemin/src/algo_fcts.c
// Function: is_end
int      is_end(t_ant *ants, t_anthill *anthill)
{
  int	i;

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

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movl $0x1, %eax
orb %cl, %dl
jne 0x2036
movq 0x8(%rsi), %rcx
movslq (%rcx), %rcx
testq %rcx, %rcx
jle 0x2036
movq 0x10(%rsi), %rdx
shlq $0x4, %rcx
xorl %esi, %esi
cmpq %rdx, (%rdi,%rsi)
jne 0x2037
addq $0x10, %rsi
cmpq %rsi, %rcx
jne 0x2027
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %eax
orb %r8b, %r9b
jne 0x207b
cmpq %rsi, 0x10(%rcx)
sete %cl
testl %edx, %edx
setle %r8b
orb %cl, %r8b
jne 0x207b
movl %edx, %ecx
shlq $0x4, %rcx
xorl %edx, %edx
cmpq %rsi, (%rdi,%rdx)
je 0x207c
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x206c
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %cl
testq %rsi, %rsi
sete %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orb %cl, %r8b
jne 0x20bc
testl %edx, %edx
jle 0x20bd
movl %edx, %ecx
shlq $0x4, %rcx
xorl %edx, %edx
xorl %eax, %eax
xorl %r8d, %r8d
cmpq %rsi, 0x8(%rdi,%rdx)
sete %r8b
addl %r8d, %eax
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x20a4
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movq 0x20(%rdi), %rax
cmpq %rdi, 0x10(%rdx)
jne 0x210d
movl $0x0, 0x8(%rdi)
jmp 0x210d
cmpl $-0x1, %r14d
je 0x2109
movq (%rax), %rcx
movl 0x8(%rcx), %edx
cmpl %r14d, %edx
setle %sil
cmpl $-0x1, %edx
setne %dl
testb %dl, %sil
jne 0x2109
movl %r14d, 0x8(%rcx)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x20e7
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x2148
leal 0x1(%r14), %ebp
movq (%r15), %rdi
cmpl $0x0, 0xc(%rdi)
je 0x212e
cmpl %r14d, 0x8(%rdi)
jl 0x213f
movl $0x1, 0xc(%rdi)
movl %ebp, %esi
movq %rbx, %rdx
callq 0x20c0
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x211f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x21a6
movq $-0x1, %rax
movq %rdi, %rcx
movb (%rcx), %dl
incq %rcx
incq %rax
testb %dl, %dl
je 0x218f
addb $-0x30, %dl
cmpb $0x9, %dl
ja 0x217b
testq %rax, %rax
je 0x21a9
xorl %edx, %edx
cmpb $0x2d, -0x2(%rcx)
setne %dl
leal -0x1(,%rdx,2), %edx
jmp 0x21ae
xorl %eax, %eax
retq
movl $0x1, %edx
movl %eax, %eax
movb (%rdi,%rax), %sil
leal -0x30(%rsi), %edi
xorl %eax, %eax
cmpb $0x9, %dil
ja 0x21dd
xorl %eax, %eax
movsbl %sil, %esi
leal (%rax,%rax,4), %eax
leal (%rsi,%rax,2), %eax
addl $-0x30, %eax
movb (%rcx), %sil
leal -0x30(%rsi), %edi
incq %rcx
cmpb $0xa, %dil
jb 0x21c1
imull %edx, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x1449
testq %rax, %rax
je 0x2286
movq %rax, %r15
leaq 0x8(%r14), %r13
cmpb $0x0, (%r15)
je 0x22a9
movq %r15, %rdi
callq 0x15cc
movl $0x20, %edi
callq 0x1080
testq %rax, %rax
je 0x22a9
movq %rax, %r12
movq %r15, %rdi
callq 0x1371
movq %rax, (%r12)
testq %rax, %rax
je 0x22a9
incl (%r14)
movl $0x0, 0x8(%r12)
movq 0x10(%r14), %rax
movq %rax, 0x18(%r12)
movq $0x0, 0x10(%r12)
leaq 0x10(%rax), %rcx
testq %rax, %rax
cmoveq %r13, %rcx
movq %r12, (%rcx)
movq %r12, 0x10(%r14)
movq %r15, %rdi
callq 0x1030
xorl %edi, %edi
callq 0x1449
movq %rax, %r15
testq %rax, %rax
jne 0x220a
movq %r14, %rdi
callq 0x1cf4
cmpq $0x0, 0x8(%r14)
je 0x22a9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1630
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movabsq $0x100000000, %r13      # imm = 0x100000000
cmpb $0x0, (%rdi)
je 0x2346
xorl %esi, %esi
xorl %ecx, %ecx
movl %esi, %eax
movslq %ecx, %rsi
decq %rsi
shlq $0x20, %rcx
addq %r9, %rcx
movq %rcx, %rdi
movq %rsi, %rcx
movq %rdi, %rdx
movb 0x1(%r14,%rsi), %r8b
testb %r8b, %r8b
je 0x2317
leaq 0x1(%rcx), %rsi
leaq (%rdx,%r13), %rdi
cmpb %bl, %r8b
jne 0x22fa
movb 0x1(%r14,%rcx), %sil
incq %rcx
addq %r13, %rdx
testb %sil, %sil
je 0x232c
cmpb %bl, %sil
je 0x2317
leal 0x1(%rax), %esi
sarq $0x20, %rdx
cmpb $0x0, (%r14,%rdx)
jne 0x22e8
movl %eax, %eax
leaq 0x10(,%rax,8), %rdi
jmp 0x234b
movl $0x8, %edi
callq 0x1080
testq %rax, %rax
je 0x243b
movq %rax, %rdi
xorl %eax, %eax
cmpb $0x0, (%r14)
je 0x2431
leaq 0x1(%r14), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %rdi, 0x10(%rsp)
movslq %r12d, %r15
leaq -0x8(,%r15,8), %rdi
leaq (%r14,%r15), %rax
movb (%rax), %cl
addq $0x8, %rdi
testb %cl, %cl
je 0x239b
incq %rax
cmpb %bl, %cl
jne 0x238a
callq 0x1080
movq 0x10(%rsp), %rdi
movq %rax, (%rdi,%rbp,8)
testq %rax, %rax
je 0x243b
movb (%r14,%r15), %cl
testb %cl, %cl
sete %dl
cmpb %bl, %cl
sete %sil
orb %dl, %sil
je 0x23ca
xorl %ecx, %ecx
jmp 0x23e8
addq 0x8(%rsp), %r15
xorl %edx, %edx
movb %cl, (%rax,%rdx)
movb (%r15,%rdx), %cl
incq %rdx
testb %cl, %cl
je 0x23e3
cmpb %bl, %cl
jne 0x23d1
addl %edx, %r12d
movl %edx, %ecx
movb $0x0, (%rax,%rcx)
movslq %r12d, %rcx
movq %rcx, %rax
shlq $0x20, %rax
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rdx, %rax
leal -0x1(%rcx), %r12d
addq %r14, %rcx
movb (%rcx), %dl
addq %r13, %rax
incl %r12d
testb %dl, %dl
je 0x241d
incq %rcx
cmpb %bl, %dl
je 0x240a
incq %rbp
sarq $0x20, %rax
cmpb $0x0, (%r14,%rax)
jne 0x237b
movl %ebp, %eax
movq $0x0, (%rdi,%rax,8)
jmp 0x243d
xorl %edi, %edi
movq %rdi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
jns 0x25db
movl $0x2d, %edi
callq 0x2450
negl %ebx
testl %ebx, %ebx
je 0x2605
cmpl $0xa, %ebx
jl 0x2609
movl %ebx, %eax
movl $0xcccccccd, %edi       # imm = 0xCCCCCCCD
imulq %rax, %rdi
shrq $0x23, %rdi
leal (%rdi,%rdi), %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
callq 0x25c8
orb $0x30, %bl
jmp 0x260c
movb $0x30, %bl
jmp 0x260c
addb $0x30, %bl
movsbl %bl, %edi
callq 0x2450
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
jns 0x2681
movl $0x2d, %edi
callq 0x2450
negq %rbx
testq %rbx, %rbx
jle 0x26b5
cmpq $0xa, %rbx
jl 0x26b7
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rbx, %rax
mulq %rcx
movq %rdx, %rdi
shrq $0x3, %rdi
leal (%rdi,%rdi), %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
callq 0x266b
orb $0x30, %bl
jmp 0x26ba
popq %rbx
retq
addb $0x30, %bl
movsbl %bl, %edi
popq %rbx
jmp 0x2450
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x2738
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 0x2860
cmpb $0x0, (%rbx)
je 0x2860
xorl %eax, %eax
leaq 0x91a(%rip), %r12       # 0x308e
leaq 0x10(%rsp), %r14
movq %rbx, 0x8(%rsp)
movslq %eax, %r15
movzbl (%rbx,%r15), %eax
cmpl $0x25, %eax
jne 0x2842
movb 0x1(%rbx,%r15), %r13b
leaq -0x183(%rip), %rax      # 0x2618
movq %rax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
leaq -0x168(%rip), %rax      # 0x2644
movq %rax, 0x40(%rsp)
leaq -0x34e(%rip), %rax      # 0x246a
movq %rax, 0x48(%rsp)
leaq -0x240(%rip), %rax      # 0x2584
movq %rax, 0x50(%rsp)
leaq 0x109(%rip), %rax       # 0x28d9
movq %rax, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq -0x32a(%rip), %rax      # 0x24bc
movq %rax, 0x70(%rsp)
leaq 0x172(%rip), %rax       # 0x2964
movq %rax, 0x78(%rsp)
leaq 0x245(%rip), %rax       # 0x2a43
movq %rax, 0x80(%rsp)
movsbl %r13b, %ebp
xorl %ebx, %ebx
cmpb $0x25, %r13b
jne 0x281c
movl $0x25, %edi
callq 0x2450
cmpb %r13b, (%rbx,%r12)
jne 0x282b
movq %r14, %rdi
movl %ebp, %esi
callq *0x30(%rsp,%rbx,8)
incq %rbx
cmpq $0xa, %rbx
jne 0x280c
addq $0x2, %r15
movq 0x8(%rsp), %rbx
jmp 0x2781
testl %eax, %eax
je 0x2860
movsbl %al, %edi
callq 0x2450
movslq %r15d, %rcx
leaq 0x1(%rcx), %rax
cmpb $0x0, 0x1(%rbx,%rcx)
jne 0x277e
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_O1/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 0x2890
movl $0x2d, %edi
callq 0x2450
negl %ebp
movq %rbx, %rdi
callq 0x24a8
movl %eax, %ecx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %r15d
movq %rbx, %rdi
callq 0x24a8
movl %eax, %r14d
testl %r15d, %r15d
jle 0x28bd
movl %r15d, %edi
movq %rbx, %rsi
callq 0x2874
movl %ebp, %eax
cltd
idivl %r14d
movsbl (%rbx,%rdx), %edi
callq 0x2450
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x28f8
cmpl $0x78, %esi
jne 0x290b
cmpl $0x28, %ecx
ja 0x291e
movq 0x10(%rdi), %rax
addq %rcx, %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x292a
cmpl $0x28, %ecx
ja 0x2933
movq 0x10(%rdi), %rax
addq %rcx, %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x293f
cmpl $0x28, %ecx
ja 0x2948
movq %rcx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x2954
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x769(%rip), %rsi       # 0x309a
jmp 0x295b
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x73a(%rip), %rsi       # 0x3080
jmp 0x295b
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x750(%rip), %rsi       # 0x30ab
movl (%rax), %edi
jmp 0x2874
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x29b8
movl $0x2d, %edi
callq 0x2450
negq %rbx
leaq 0x6f2(%rip), %r14       # 0x30b1
movq %r14, %rdi
callq 0x24a8
movslq %eax, %rcx
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %r15
movq %r14, %rdi
callq 0x24a8
movl %eax, %ebp
testq %r15, %r15
jle 0x29ec
movq %r15, %rdi
callq 0x299c
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 0x2450
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x2a40
pushq %rbx
movl %edi, %ebx
cmpl $0xa, %edi
jb 0x2a34
movl %ebx, %eax
movl $0xcccccccd, %edi       # imm = 0xCCCCCCCD
imulq %rax, %rdi
shrq $0x23, %rdi
leal (%rdi,%rdi), %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
callq 0x25c8
orb $0x30, %bl
movsbl %bl, %edi
callq 0x2450
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1378
movq %rsi, %r14
movq 0x8(%rsi), %rdi
movl $0x2, %ebx
movl $0x2, %esi
xorl %eax, %eax
callq 0x10f0
movl $0x20000, %esi          # imm = 0x20000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x1080
movq %rax, 0x3dee(%rip)      # 0x50b0
cmpq $-0x1, %rax
je 0x137d
callq 0x1384
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 0x2109
leaq -0x120(%rbp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2120
movq %r12, %rdi
callq 0x1666
movl %eax, %r15d
movq %r14, %rdi
callq 0x1666
testl %eax, %eax
js 0x1369
movq 0x3d7e(%rip), %rcx      # 0x50b8
movl %eax, %eax
shlq $0x7, %rax
movl $0x15, %ebx
testb $0x40, -0x7f(%rcx,%rax)
jne 0x1369
movslq %r15d, %rax
shlq $0x7, %rax
leaq (%rcx,%rax), %rdi
addq $-0x80, %rdi
leaq -0x120(%rbp), %rsi
callq 0x1aa1
xorl %ebx, %ebx
movl %ebx, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1140
callq 0x1165
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4715(%rip), %r14      # 0x6150
leaq 0x4c2e(%rip), %r12      # 0x6670
leaq 0x5437(%rip), %r13      # 0x6e80
movq (%r14), %rdi
callq 0x11d0
movl %eax, %ebp
cmpl $0xa, %eax
je 0x1a6a
cmpl $0x5c, %ebp
je 0x1a64
cmpl $-0x1, %ebp
jne 0x1a7a
jmp 0x1a87
xorl $0x1, %r15d
jmp 0x1a49
incl (%r12)
movq (%r14), %rdi
callq 0x1120
movq %rax, (%r13)
xorl %ebx, %ebp
orl %r15d, %ebp
movl $0x0, %r15d
jne 0x1a49
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x46aa(%rip), %rbx      # 0x6150
leaq 0x4bc3(%rip), %r14      # 0x6670
leaq 0x53cc(%rip), %r15      # 0x6e80
movl %ecx, %ebp
movq (%rbx), %rdi
callq 0x11d0
cmpl $0x29, %eax
jle 0x1ad9
xorl %ecx, %ecx
cmpl $0x2a, %eax
je 0x1ab4
cmpl $0x2f, %eax
jne 0x1af3
movb $0x1, %cl
testb $0x1, %bpl
jne 0x1ab4
jmp 0x1af7
cmpl $0xa, %eax
jne 0x1aee
incl (%r14)
movq (%rbx), %rdi
callq 0x1120
movq %rax, (%r15)
jmp 0x1af3
cmpl $-0x1, %eax
je 0x1af7
movb $0x1, %cl
jmp 0x1ab4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/C.c
// Function: skip_key
int
skip_key(key)
	int	key;
{
	int	c,
		skip,
		retval;

	for (skip = retval = NO; GETC(!=, EOF);)
		switch(c) {
		case '\\':		/* a backslash escapes anything */
			skip = !skip;	/* we toggle in case it's "\\" */
			break;
		case ';':		/* special case for yacc; if one */
		case '|':		/* of these chars occurs, we may */
			retval = YES;	/* have moved out of the rule */
			break;		/* not used by C */
		case '\'':
		case '"':
			/* skip strings and character constants */
			skip_string(c);
			break;
		case '/':
			/* skip comments */
			if (GETC(==, '*')) {
				skip_comment();
				break;
			}
			(void)ungetc(c, inf);
			c = '/';
			goto norm;
		case '\n':
			SETLINE;
			/*FALLTHROUGH*/
		default:
		norm:
			if (c == key && !skip)
				return (retval);
			skip = NO;
		}
	return (retval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r12d, %r12d
leaq 0x4637(%rip), %r15      # 0x6150
leaq 0x5360(%rip), %r13      # 0x6e80
xorl %ebp, %ebp
movq (%r15), %rdi
callq 0x11d0
movl %eax, %r14d
cmpl $0x2e, %eax
jg 0x1b65
cmpl $0x26, %r14d
jg 0x1b85
cmpl $0x22, %r14d
je 0x1b8b
cmpl $-0x1, %r14d
je 0x1bdc
cmpl $0xa, %r14d
jne 0x1bca
leaq 0x4b1b(%rip), %rax      # 0x6670
incl (%rax)
movq (%r15), %rdi
callq 0x1120
movq %rax, (%r13)
jmp 0x1bca
cmpl $0x3a, %r14d
jg 0x1b95
cmpl $0x2f, %r14d
jne 0x1bca
movq (%r15), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1bba
callq 0x1a96
jmp 0x1b22
cmpl $0x27, %r14d
jne 0x1bca
movl %r14d, %edi
callq 0x1a24
jmp 0x1b22
cmpl $0x3b, %r14d
je 0x1bb0
cmpl $0x7c, %r14d
je 0x1bb0
cmpl $0x5c, %r14d
jne 0x1bca
xorl $0x1, %r12d
jmp 0x1b22
movl $0x1, %ebp
jmp 0x1b22
movq (%r15), %rsi
movl %eax, %edi
callq 0x1150
movl $0x2f, %r14d
xorl %ebx, %r14d
orl %r12d, %r14d
movl $0x0, %r12d
jne 0x1b22
movl %ebp, %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_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/ctags.c
// Function: init
void
init()
{
	int		i;
	unsigned char	*sp;

	for (i = 0; i < 256; i++) {
		_wht[i] = _etk[i] = _itk[i] = _btk[i] = NO;
		_gd[i] = YES;
	}
#define	CWHITE	(unsigned char *)" \f\t\n"
	for (sp = CWHITE; *sp; sp++)	/* white space chars */
		_wht[*sp] = YES;
#define	CTOKEN	(unsigned char *)" \t\n\"'#()[]{}=-+%*/&|^~!<>;,.:?"
	for (sp = CTOKEN; *sp; sp++)	/* token ending chars */
		_etk[*sp] = YES;
#define	CINTOK	(unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789"
	for (sp = CINTOK; *sp; sp++)	/* valid in-token chars */
		_itk[*sp] = YES;
#define	CBEGIN	(unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
	for (sp = CBEGIN; *sp; sp++)	/* token starting chars */
		_btk[*sp] = YES;
#define	CNOTGD	(unsigned char *)",;"
	for (sp = CNOTGD; *sp; sp++)	/* invalid after-function chars */
		_gd[*sp] = NO;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x42d6(%rip), %rbx      # 0x6170
xorl %ebp, %ebp
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10d0
leaq 0x43be(%rip), %r15      # 0x6270
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x10d0
leaq 0x44a8(%rip), %r12      # 0x6370
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
xorl %esi, %esi
callq 0x10d0
leaq 0x4592(%rip), %r13      # 0x6470
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x10d0
leaq 0x467c(%rip), %r14      # 0x6570
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movl $0x1, %esi
callq 0x10d0
movb $0x20, %cl
leaq 0x21eb(%rip), %rax      # 0x40fa
movzbl %cl, %ecx
movb $0x1, (%rcx,%r13)
movb 0x1(%rbp,%rax), %cl
incq %rbp
cmpq $0x4, %rbp
jne 0x1f0f
movb $0x20, %dl
movl $0x1, %eax
leaq 0x21cd(%rip), %rcx      # 0x40ff
movzbl %dl, %edx
movb $0x1, (%rdx,%r12)
movb (%rax,%rcx), %dl
incq %rax
cmpq $0x1f, %rax
jne 0x1f32
movb $0x41, %dl
movl $0x1, %eax
leaq 0x21ca(%rip), %rcx      # 0x411e
movzbl %dl, %edx
movb $0x1, (%rdx,%r15)
movb (%rax,%rcx), %dl
incq %rax
cmpq $0x40, %rax
jne 0x1f54
movb $0x41, %dl
movl $0x1, %eax
leaq 0x21e8(%rip), %rcx      # 0x415e
movzbl %dl, %edx
movb $0x1, (%rdx,%rbx)
movb (%rax,%rcx), %dl
incq %rax
cmpq $0x36, %rax
jne 0x1f76
movb $0x2c, %dl
xorl %eax, %eax
leaq 0x2200(%rip), %rcx      # 0x4194
movzbl %dl, %edx
movb $0x0, (%rdx,%r14)
movb 0x1(%rax,%rcx), %dl
incq %rax
cmpq $0x2, %rax
jne 0x1f94
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/ctags.c
// Function: find_entries
void
find_entries(file)
	char	*file;
{
	char	*cp;

	lineno = 0;				/* should be 1 ?? KB */
	if ((cp = strrchr(file, '.')) != NULL) {
		if (cp[1] == 'l' && !cp[2]) {
			int	c;

			for (;;) {
				if (GETC(==, EOF))
					return;
				if (!iswhite(c)) {
					rewind(inf);
					break;
				}
			}
#define	LISPCHR	";(["
/* lisp */		if (strchr(LISPCHR, c)) {
				l_entries();
				return;
			}
/* lex */		else {
				/*
				 * we search all 3 parts of a lex file
				 * for C references.  This may be wrong.
				 */
				toss_yysec();
				(void)strcpy(lbuf, "%%$");
				pfnote("yylex", lineno);
				rewind(inf);
			}
		}
/* yacc */	else if (cp[1] == 'y' && !cp[2]) {
			/*
			 * we search only the 3rd part of a yacc file
			 * for C references.  This may be wrong.
			 */
			toss_yysec();
			(void)strcpy(lbuf, "%%$");
			pfnote("yyparse", lineno);
			y_entries();
		}
/* fortran */	else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {
			if (PF_funcs())
				return;
			rewind(inf);
		}
	}
/* C */	c_entries();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, 0x46aa(%rip)      # 0x6670
movl $0x2e, %esi
callq 0x10c0
testq %rax, %rax
je 0x20eb
movzbl 0x1(%rax), %ecx
cmpl $0x6b, %ecx
jle 0x200f
cmpl $0x79, %ecx
je 0x2009
cmpl $0x6c, %ecx
jne 0x2021
cmpb $0x0, 0x2(%rax)
je 0x206b
cmpl $0x63, %ecx
je 0x20eb
cmpl $0x68, %ecx
je 0x20eb
cmpl $0x79, %ecx
jne 0x2021
cmpb $0x0, 0x2(%rax)
je 0x2040
cmpl $0x63, %ecx
je 0x20eb
cmpl $0x68, %ecx
je 0x20eb
cmpb $0x0, 0x2(%rax)
jne 0x20eb
callq 0x20f8
testl %eax, %eax
je 0x20df
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2fe3
movl $0x242525, 0x4631(%rip) # imm = 0x242525
movl 0x461b(%rip), %esi      # 0x6670
leaq 0x2145(%rip), %rdi      # 0x41a1
callq 0x2b70
callq 0x2dc8
jmp 0x20eb
leaq 0x43fe(%rip), %r14      # 0x6470
movq 0x40d7(%rip), %rdi      # 0x6150
callq 0x11d0
cmpl $-0x1, %eax
je 0x2038
movl %eax, %ebx
movl %eax, %eax
cmpb $0x0, (%rax,%r14)
jne 0x2072
movq 0x40bb(%rip), %rdi      # 0x6150
callq 0x10b0
leaq 0x20f6(%rip), %rdi      # 0x4197
movl $0x4, %edx
movl %ebx, %esi
callq 0x10e0
testq %rax, %rax
je 0x20be
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2740
callq 0x2fe3
movl $0x242525, 0x45b3(%rip) # imm = 0x242525
movl 0x459d(%rip), %esi      # 0x6670
leaq 0x20c1(%rip), %rdi      # 0x419b
callq 0x2b70
movq 0x406a(%rip), %rdi      # 0x6150
callq 0x10b0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12ec
nop
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/fortran.c
// Function: cicmp
int
cicmp(cp)
	char	*cp;
{
	int	len;
	char	*bp;

	for (len = 0, bp = lbp; *cp && (*cp &~ ' ') == (*bp++ &~ ' ');
	    ++cp, ++len)
		continue;
	if (!*cp) {
		lbp += len;
		return (YES);
	}
	return (NO);
}

// Assembly:
movq 0x4834(%rip), %rcx      # 0x6e88
movb (%rdi), %r8b
testb %r8b, %r8b
sete %sil
je 0x2694
xorb (%rcx), %r8b
xorl %eax, %eax
movl $0x0, %edx
testb $-0x21, %r8b
jne 0x268e
xorl %edx, %edx
movb 0x1(%rdi,%rdx), %r8b
testb %r8b, %r8b
sete %sil
je 0x2698
xorb 0x1(%rcx,%rdx), %r8b
incq %rdx
testb $-0x21, %r8b
je 0x2672
testb %sil, %sil
jne 0x269a
retq
xorl %edx, %edx
jmp 0x269a
incl %edx
movl %edx, %eax
addq %rax, %rcx
movq %rcx, 0x47e2(%rip)      # 0x6e88
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/fortran.c
// Function: takeprec
static void
takeprec()
{
	for (; isspace(*lbp); ++lbp)
		continue;
	if (*lbp == '*') {
		for (++lbp; isspace(*lbp); ++lbp)
			continue;
		if (!isdigit(*lbp))
			--lbp;			/* force failure */
		else
			while (isdigit(*++lbp))
				continue;
	}
}

// Assembly:
pushq %rax
callq 0x11e0
movq (%rax), %rsi
movq 0x47cc(%rip), %rcx      # 0x6e88
movsbq (%rcx), %rdx
testb $0x20, 0x1(%rsi,%rdx,2)
je 0x26e5
incq %rcx
movq %rcx, 0x47b7(%rip)      # 0x6e88
movq (%rax), %rsi
movsbq (%rcx), %rdx
incq %rcx
testb $0x20, 0x1(%rsi,%rdx,2)
jne 0x26ca
decq %rcx
cmpb $0x2a, %dl
jne 0x273c
incq %rcx
movq %rcx, 0x4794(%rip)      # 0x6e88
movq (%rax), %rdx
movsbq (%rcx), %rsi
movzwl (%rdx,%rsi,2), %edx
incq %rcx
btl $0xd, %edx
jb 0x26ed
btl $0xb, %edx
jb 0x271b
addq $-0x2, %rcx
movq %rcx, 0x476f(%rip)      # 0x6e88
jmp 0x273c
movq (%rax), %rcx
movq 0x4763(%rip), %rdx      # 0x6e88
leaq 0x1(%rdx), %rsi
movq %rsi, 0x4758(%rip)      # 0x6e88
movsbq 0x1(%rdx), %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0x271b
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/print.c
// Function: ct_getline
void
ct_getline()
{
	long	saveftell;
	int	c;
	int	cnt;
	char	*cp;

	saveftell = ftell(inf);
	(void)fseek(inf, lineftell, SEEK_SET);
	if (xflag)
		for (cp = lbuf; GETC(!=, '\n'); *cp++ = c)
			continue;
	/*
	 * do all processing here, so we don't step through the
	 * line more than once; means you don't call this routine
	 * unless you're sure you've got a keeper.
	 */
	else for (cnt = 0, cp = lbuf; GETC(!=, EOF) && cnt < ENDLINE; ++cnt) {
		if (c == '\\') {		/* backslashes */
			if (cnt > ENDLINE - 2)
				break;
			*cp++ = '\\'; *cp++ = '\\';
			++cnt;
		}
		else if (c == (int)searchar) {	/* search character */
			if (cnt > ENDLINE - 2)
				break;
			*cp++ = '\\'; *cp++ = c;
			++cnt;
		}
		else if (c == '\n') {	/* end of keep */
			*cp++ = '$';		/* can find whole line */
			break;
		}
		else
			*cp++ = c;
	}
	*cp = EOS;
	(void)fseek(inf, saveftell, SEEK_SET);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x37ae(%rip), %r14      # 0x6150
movq (%r14), %rdi
callq 0x1120
movq %rax, %rbx
movq (%r14), %rdi
leaq 0x44c9(%rip), %rax      # 0x6e80
movq (%rax), %rsi
xorl %edx, %edx
callq 0x1160
leaq 0x3784(%rip), %rax      # 0x614c
movl (%rax), %ebp
movq (%r14), %rdi
callq 0x11d0
testl %ebp, %ebp
je 0x29fb
cmpl $0xa, %eax
je 0x2a6b
leaq 0x3c9a(%rip), %r15      # 0x6680
movb %al, (%r15)
incq %r15
movq (%r14), %rdi
callq 0x11d0
cmpl $0xa, %eax
jne 0x29e6
jmp 0x2a72
cmpl $-0x1, %eax
je 0x2a6b
xorl %r13d, %r13d
leaq 0x3c76(%rip), %r15      # 0x6680
leaq 0x370b(%rip), %r12      # 0x611c
cmpl $0x5c, %eax
jne 0x2a24
cmpl $0x30, %r13d
jg 0x2a72
movw $0x5c5c, (%r15)         # imm = 0x5C5C
jmp 0x2a3b
movsbl (%r12), %ecx
cmpl %ecx, %eax
jne 0x2a44
cmpl $0x30, %r13d
jg 0x2a72
movb $0x5c, (%r15)
movb %al, 0x1(%r15)
addq $0x2, %r15
incl %r13d
jmp 0x2a4f
cmpl $0xa, %eax
je 0x2a91
movb %al, (%r15)
incq %r15
movq (%r14), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x2a72
leal 0x1(%r13), %ecx
cmpl $0x31, %r13d
movl %ecx, %r13d
jl 0x2a11
jmp 0x2a72
leaq 0x3c0e(%rip), %r15      # 0x6680
movb $0x0, (%r15)
movq (%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1160
movb $0x24, (%r15)
incq %r15
jmp 0x2a72