LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: server_start
int server_start() {
	int sockfd = socket(AF_INET, SOCK_STREAM, 0);

	if(sockfd < 0) {
		eprintf("Create Socket Failed!\n");
	}

	struct sockaddr_in servaddr;
	memset(&servaddr, 0, sizeof(servaddr));
    servaddr.sin_family = AF_INET;
    servaddr.sin_port = htons(PORT);
    servaddr.sin_addr.s_addr = htonl(INADDR_ANY);

	if(bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1) {
		eprintf("Can not bind to port %d!\n", PORT);
	}

	if(listen(sockfd, USER_CNT) == -1) {
		eprintf("fail to listen on socket.\n");
	}

	return sockfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x11a0
testl %eax, %eax
js 0x3e2e
movl %eax, %ebx
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x50c30002, (%rsi)     # imm = 0x50C30002
movl %eax, %edi
movl $0x10, %edx
callq 0x1120
cmpl $-0x1, %eax
je 0x3e33
movl %ebx, %edi
movl $0x5, %esi
callq 0x1110
cmpl $-0x1, %eax
je 0x3e38
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x2de3
callq 0x2dae
callq 0x2d7f
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: terminate_process
void terminate_process(int recved_signal) {
	for(int i = 0; i < USER_CNT; i++) {
		if(sessions[i].conn >= 0) {
			close(sessions[i].conn);
			log("close conn:%d\n", sessions[i].conn);
		}
	}

	if(server_fd) {
		close(server_fd);
		log("close server fd:%d\n", server_fd);
	}

	pthread_mutex_destroy(&sessions_lock);
	pthread_mutex_destroy(&battles_lock);
	for(int i = 0; i < USER_CNT; i++) {
		pthread_mutex_destroy(&items_lock[i]);
	}

	log("receive terminate signal and exit(0)\n");
	exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x8, %r12d
leaq 0x5328(%rip), %r13      # 0x9180
movq 0x5191(%rip), %r15      # 0x8ff0
leaq 0x2890(%rip), %rbx      # 0x66f6
leaq 0x28b0(%rip), %r14      # 0x671d
movl (%r12,%r13), %edi
testl %edi, %edi
jns 0x3e84
addq $0x48, %r12
cmpq $0x170, %r12            # imm = 0x170
jne 0x3e6d
jmp 0x3ea4
callq 0x10b0
movq (%r15), %rdi
movl (%r12,%r13), %r8d
movq %rbx, %rsi
movq %r14, %rdx
movl $0x403, %ecx            # imm = 0x403
xorl %eax, %eax
callq 0x10d0
jmp 0x3e75
movl 0x52ce(%rip), %edi      # 0x9178
testl %edi, %edi
je 0x3ed7
callq 0x10b0
movq (%r15), %rdi
movl 0x52bb(%rip), %r8d      # 0x9178
leaq 0x286b(%rip), %rsi      # 0x672f
leaq 0x2852(%rip), %rdx      # 0x671d
movl $0x409, %ecx            # imm = 0x409
xorl %eax, %eax
callq 0x10d0
leaq 0x524a(%rip), %rdi      # 0x9128
callq 0x1080
leaq 0x5266(%rip), %rdi      # 0x9150
callq 0x1080
xorl %ebx, %ebx
leaq 0x8b28(%rip), %r14      # 0xca20
leaq (%r14,%rbx), %rdi
callq 0x1080
addq $0x28, %rbx
cmpq $0xc8, %rbx
jne 0x3ef8
movq (%r15), %rdi
leaq 0x2843(%rip), %rsi      # 0x675b
leaq 0x27fe(%rip), %rdx      # 0x671d
movl $0x412, %ecx            # imm = 0x412
xorl %eax, %eax
callq 0x10d0
xorl %edi, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: main
int main() {
	srand(time(NULL));

	pthread_t thread;

	if(signal(SIGINT, terminate_process) == SIG_ERR) {
		eprintf("An error occurred while setting a signal handler.\n");
	}

	for(int i = 0; i < USER_CNT; i++) {
		pthread_mutex_init(&items_lock[i], NULL);
	}

	server_fd = server_start();

	for(int i = 0; i < USER_CNT; i++)
		sessions[i].conn = -1;

	struct sockaddr_in client_addr;
	socklen_t length = sizeof(client_addr);
	while(1) {
		int conn = accept(server_fd, (struct sockaddr*)&client_addr, &length);
		log("connected by %s:%d, conn:%d\n", inet_ntoa(client_addr.sin_addr), client_addr.sin_port, conn);
		if(conn < 0) {
			loge("fail to accept client.\n");
		}else if(pthread_create(&thread, NULL, session_start, (void *)(uintptr_t)conn) != 0) {
			loge("fail to create thread.\n");
		}
		logi("bind thread #%lu\n", thread);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %edi, %edi
callq 0x10f0
movl %eax, %edi
callq 0x10c0
leaq -0x11b(%rip), %rsi      # 0x3e3d
movl $0x2, %edi
callq 0x10e0
cmpq $-0x1, %rax
je 0x4081
xorl %ebx, %ebx
leaq 0x8aab(%rip), %r14      # 0xca20
leaq (%r14,%rbx), %rdi
xorl %esi, %esi
callq 0x1160
addq $0x28, %rbx
cmpq $0xc8, %rbx
jne 0x3f75
callq 0x3dd2
movl %eax, 0x51e0(%rip)      # 0x9178
movl $0x8, %eax
leaq 0x51dc(%rip), %rcx      # 0x9180
movl $0xffffffff, (%rax,%rcx) # imm = 0xFFFFFFFF
addq $0x48, %rax
cmpq $0x170, %rax            # imm = 0x170
jne 0x3fa4
leaq -0x2c(%rbp), %rax
movl $0x10, (%rax)
movq 0x5028(%rip), %r15      # 0x8ff0
leaq 0x2817(%rip), %r12      # 0x67e6
leaq 0x28ae(%rip), %r13      # 0x6884
movl 0x519c(%rip), %edi      # 0x9178
leaq -0x48(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x1140
movl %eax, %ebx
movq (%r15), %r14
movl -0x44(%rbp), %edi
callq 0x1060
movzwl -0x46(%rbp), %r9d
movl %ebx, (%rsp)
movq %r14, %rdi
leaq 0x27e3(%rip), %rsi      # 0x67eb
movq %r12, %rdx
movl $0x42c, %ecx            # imm = 0x42C
movq %rax, %r8
xorl %eax, %eax
callq 0x10d0
testl %ebx, %ebx
jns 0x4032
movq (%r15), %rdi
leaq 0x27f8(%rip), %rsi      # 0x6820
movq %r12, %rdx
movl $0x42e, %ecx            # imm = 0x42E
jmp 0x405c
movl %ebx, %ecx
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
leaq -0x2b0(%rip), %rdx      # 0x3d91
callq 0x1130
testl %eax, %eax
je 0x4063
movq (%r15), %rdi
leaq 0x27fe(%rip), %rsi      # 0x6852
movq %r12, %rdx
movl $0x430, %ecx            # imm = 0x430
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rdi
movq -0x38(%rbp), %r8
movq %r13, %rsi
movq %r12, %rdx
movl $0x432, %ecx            # imm = 0x432
xorl %eax, %eax
callq 0x10d0
jmp 0x3fd6
movq 0x4f68(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x2707(%rip), %rsi      # 0x6799
leaq 0x274d(%rip), %rdx      # 0x67e6
movl $0x41c, %ecx            # imm = 0x41C
xorl %eax, %eax
callq 0x10d0
xorl %edi, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O1/umbrant[P]Non-blocking-Buffers/service.c
// Function: main
int main() 
{
  char* service_name = (char*)malloc(sizeof(char)*50);
  char* service_name_other = (char*)malloc(sizeof(char)*50);

  strcpy(service_name, GUI);
  strcpy(service_name_other, "GUI2");

	if(nbb_init_service(NUM_CHANNELS, service_name)) {
		printf("Error initializing as service, failing!\n");
		return -1;
	}

  sleep(1);

  if(nbb_init_service(NUM_CHANNELS, service_name_other)) {
 		printf("Error initializing as service, failing!\n");
		return -1;
	}

  nbb_set_cb_new_connection(service_name, on_new_connection, NULL);
  nbb_set_cb_new_connection(service_name_other, on_new_conn_other, NULL);

  int counter = 0;

  while(1) {
    sleep(1);

/*
    if(is_client == 2 && !(counter % 5)) {
      nbb_send("Client", "Test message", sizeof("Test message"));
      nbb_send("Client2", "Test message", sizeof("Test message"));
    }*/
    counter++;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x32, %edi
callq 0x1160
movq %rax, %r14
movl $0x32, %edi
callq 0x1160
movq %rax, %rbx
movl $0x495547, (%r14)       # imm = 0x495547
movl $0x32495547, (%rax)     # imm = 0x32495547
movb $0x0, 0x4(%rax)
movl $0x5, %edi
movq %r14, %rsi
callq 0x1a64
testl %eax, %eax
jne 0x1387
movl $0x1, %edi
callq 0x1220
movl $0x5, %edi
movq %rbx, %rsi
callq 0x1a64
testl %eax, %eax
je 0x13a0
leaq 0x1cc2(%rip), %rdi      # 0x3050
callq 0x1070
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x27(%rip), %rsi        # 0x13ce
movq %r14, %rdi
xorl %edx, %edx
callq 0x2283
leaq 0x2f(%rip), %rsi        # 0x13e7
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2283
movl $0x1, %edi
callq 0x1220
jmp 0x13c2
// File: /workspace/github_c_makefile_star2_O1/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: inform
static void inform(const char *msg, va_list ap)
{
   int my_errno = errno;

   fprintf(stderr, "%s: ", g_progname);
   vfprintf(stderr, msg, ap);

   size_t len = strlen(msg);
   if (len && msg[len - 1] == ':')
      fprintf(stderr, " %s", my_errno ? strerror(my_errno) : "<unknown error>");

   putc('\n', stderr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
callq 0x2060
movl (%rax), %ebx
movq 0x10ed5c(%rip), %r12    # 0x110ff8
movq (%r12), %rdi
movq 0x10eea1(%rip), %rdx    # 0x111148
leaq 0x8041(%rip), %rsi      # 0xa2ef
xorl %eax, %eax
callq 0x21b0
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2230
movq %r14, %rdi
callq 0x20e0
testq %rax, %rax
je 0x22d9
cmpb $0x3a, -0x1(%r14,%rax)
je 0x22f0
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2190
movq (%r12), %r14
testl %ebx, %ebx
jne 0x2301
leaq 0x7ff5(%rip), %rdx      # 0xa2f4
jmp 0x230b
movl %ebx, %edi
callq 0x2250
movq %rax, %rdx
leaq 0x81b6(%rip), %rsi      # 0xa4c8
movq %r14, %rdi
xorl %eax, %eax
callq 0x21b0
jmp 0x22d9
// File: /workspace/github_c_makefile_star2_O1/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: parse_command
noreturn void parse_command(struct command *commands, const char *help,
                            int argc, char **argv)
{
   set_progname(*argv);
   set_help(help);

   if (argc == 1)
      display_help();

   const char *arg = argv[1];
   for (struct command *cmd = commands; cmd->name; cmd++) {
      if (!strcmp(cmd->name, arg)) {
         cmd->func(argc - 2, argv + 2);
         exit(EXIT_SUCCESS);
      }
   }
   if (*arg == '-') {
      arg++;
      if (*arg == '-') {
         arg++;
         if (!strcmp(arg, help_option.name))
            display_help();
      } else if (*arg == help_option.letter && !arg[1]) {
         display_help();
      }
   }
   die("unknown command: '%s'", argv[1]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq (%rcx), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x2120
testq %rax, %rax
je 0x3502
cmpb $0x0, 0x1(%rax)
je 0x3502
incq %rax
movq %rax, %r12
movq %r12, 0x10dc3f(%rip)    # 0x111148
movq %r15, %rdi
callq 0x35a0
cmpl $0x1, %ebp
jne 0x351b
callq 0x3633
movq 0x8(%rbx), %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3543
addq $0x10, %r14
movq %r15, %rsi
callq 0x2180
testl %eax, %eax
je 0x3569
movq (%r14), %rdi
addq $0x10, %r14
testq %rdi, %rdi
jne 0x352b
cmpb $0x2d, (%r15)
jne 0x358f
movsbl 0x1(%r15), %eax
cmpl $0x2d, %eax
jne 0x3580
leaq 0x2(%r15), %rdi
movq 0x10dbfa(%rip), %rsi    # 0x111158
callq 0x2180
testl %eax, %eax
je 0x3516
jmp 0x358f
addl $-0x2, %ebp
addq $0x10, %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq *-0x8(%r14)
xorl %edi, %edi
callq 0x2240
cmpl %eax, 0x10dbca(%rip)    # 0x111150
jne 0x358f
cmpb $0x0, 0x2(%r15)
je 0x3516
leaq 0x6c3b(%rip), %rdi      # 0xa1d1
movq %r15, %rsi
xorl %eax, %eax
callq 0x3444
// File: /workspace/github_c_makefile_star2_O1/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: set_help
static void check_help(const char *help)
{
   assert(help);
   bool legit = false;

   for (;;) {
      help = strchr(help, '%');
      if (!help)
         break;
      switch (*++help) {
      case 's':
         if (legit) {
            legit = false;
            goto fini;
         }
         legit = true;
         break;
      case '%':
         help++;
         break;
      default:
         legit = false;
         goto fini;
      }
   }

fini:
   if (!legit)
      die("invalid help screen");
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3614
movq %rdi, %rbx
movl $0x25, %esi
callq 0x20f0
testq %rax, %rax
je 0x3606
xorl %ebp, %ebp
movzbl 0x1(%rax), %ecx
cmpl $0x25, %ecx
je 0x35d8
cmpl $0x73, %ecx
jne 0x35f0
testb $0x1, %bpl
jne 0x35f0
incq %rax
movb $0x1, %bpl
jmp 0x35dc
addq $0x2, %rax
movq %rax, %rdi
movl $0x25, %esi
callq 0x20f0
testq %rax, %rax
jne 0x35bc
jmp 0x35f2
xorl %ebp, %ebp
testb $0x1, %bpl
je 0x3606
movq %rbx, 0x10dbc1(%rip)    # 0x1111c0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x6d1a(%rip), %rdi      # 0xa327
xorl %eax, %eax
callq 0x3444
leaq 0x6ce9(%rip), %rdi      # 0xa304
leaq 0x6bce(%rip), %rsi      # 0xa1f0
leaq 0x6ce0(%rip), %rcx      # 0xa309
movl $0x96, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: short_option
static struct option *short_option(struct option *options, int letter)
{
   assert(letter);

   while (options->name) {
      if (options->letter == letter)
         return options;
      options++;
   }
   if (letter == help_option.letter)
      return &help_option;

   die("unknown option: -%c", letter);
}

// Assembly:
pushq %rax
testl %esi, %esi
je 0x39a0
cmpq $0x0, 0x8(%rdi)
je 0x398c
cmpl %esi, (%rdi)
je 0x399b
cmpq $0x0, 0x28(%rdi)
leaq 0x20(%rdi), %rdi
jne 0x397d
cmpl %esi, 0x10d7be(%rip)    # 0x111150
jne 0x39bf
leaq 0x10d7b5(%rip), %rdi    # 0x111150
movq %rdi, %rax
popq %rcx
retq
leaq 0x6994(%rip), %rdi      # 0xa33b
leaq 0x6842(%rip), %rsi      # 0xa1f0
leaq 0x698d(%rip), %rcx      # 0xa342
movl $0x48, %edx
callq 0x2130
leaq 0x69ae(%rip), %rdi      # 0xa374
xorl %eax, %eax
callq 0x3444
// File: /workspace/github_c_makefile_star2_O1/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: handle_option
static void handle_option(struct option *opt, const char *arg)
{
   bool legit = true;

   switch (opt->type) {
   case OPT_STR:
      *opt->s = arg;
      break;
   case OPT_BOOL:
      *opt->b = true;
      break;
   case OPT_FUNC:
      opt->f();
      break;
   case OPT_DOUBLE: {
      char *end;
      errno = 0;
      *opt->d = strtod(arg, &end);
      if (errno || *end)
         legit = false;
      break;
   }
   case OPT_SIZE_T:
      if (!strcmp(arg, "inf")) {
         *opt->z = SIZE_MAX;
      } else {
         char *end;
         errno = 0;
         long long num = strtoll(arg, &end, 10);
         if (errno || *end || num < 0 || (uintmax_t)num > SIZE_MAX)
            legit = false;
         else
            *opt->z = num;
      }
      break;
   default:       // NUM_OPTS handled in switch.
      break;
   }

   if (!legit)
      die("invalid argument '%s' for option --%s", arg, opt->name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl 0x10(%rdi), %eax
cmpq $0x4, %rax
ja 0x3ad2
movq %rsi, %rbx
leaq 0x67c3(%rip), %rcx      # 0xa1b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rdi), %rax
movq %rbx, (%rax)
jmp 0x3ad2
movq %rdi, %r15
leaq 0x697c(%rip), %rsi      # 0xa388
movq %rbx, %rdi
callq 0x2180
testl %eax, %eax
je 0x3a9c
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl $0xa, %edx
callq 0x21a0
cmpl $0x0, (%r14)
je 0x3aa9
xorl %eax, %eax
movq %r15, %rdx
jmp 0x3ace
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *0x18(%rdi)
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20b0
movq %r15, %rdx
movq 0x18(%r15), %rax
movsd %xmm0, (%rax)
cmpl $0x0, (%r14)
jne 0x3ac1
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x3ac1
jmp 0x3acc
movq 0x18(%rdi), %rax
movb $0x1, (%rax)
jmp 0x3ad2
movq 0x18(%r15), %rax
movq $-0x1, (%rax)
jmp 0x3ad2
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
setne %cl
testq %rax, %rax
sets %dl
orb %cl, %dl
movq %r15, %rdx
je 0x3ac5
xorl %eax, %eax
jmp 0x3ace
movq 0x18(%rdx), %rcx
movq %rax, (%rcx)
movb $0x1, %al
testb %al, %al
je 0x3adc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rdx), %rdx
leaq 0x68a5(%rip), %rdi      # 0xa38c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3444
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/mem.c
// Function: allocate_memory
void
allocate_memory(int n)
{
	const unsigned int chunksize = _STRESS_MB(1);
	int i = 0;
	void* p;

	printf("%d MB will be allocated\n", n);
	for (; i++ < n;) {
		_STRESS_MUST((p = malloc(chunksize * sizeof(char))),
		             "Couldn't allocate.");
		memset(p, 0xA, chunksize);
		printf("\rAllocated: %d", i);
	}
	printf("\nDone.");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x9ef(%rip), %rdi       # 0x2108
movl %ebx, %esi
xorl %eax, %eax
callq 0x10a0
testl %ebx, %ebx
jle 0x1755
negl %ebx
movl $0x1, %r15d
leaq 0x9ec(%rip), %r14       # 0x2121
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x10a0
leal (%rbx,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x1735
leaq 0x9d4(%rip), %rdi       # 0x2130
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/mem.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };

	setbuf(stdout, NULL);
	stress_parse_args(argc, argv, &args);
	allocate_memory(args.n);
	stress_wait_until_signalized();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x2008, %edx           # imm = 0x2008
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movq 0x2835(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1090
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x14d9
movl (%r14), %edi
callq 0x170b
callq 0x1602
xorl %eax, %eax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/8-Synchronization/pthread_strtok.c
// Function: thread_func
void *thread_func(void *input)
{
	char *token;
	int i = 0, thread_num;

	thread_num = ((char *) input)[strlen(input) - 1] - '0';		
	printf("Thread %d: I start with the input %s\n", thread_num, (char *) input);

	token = strtok((char *) input, " ");		// 1st step for strtok()
	do
	{
		printf("Thread %d: Token %d = %s\n", thread_num, i++, token);
		sleep(1);
	}
	while((token = strtok(NULL, " ")) != NULL);	// later steps for strtok()

	printf("Thread %d: terminated.\n", thread_num);

	pthread_exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
callq 0x1030
movsbl -0x1(%r15,%rax), %ebx
addl $-0x30, %ebx
leaq 0xe39(%rip), %rdi       # 0x2004
movl %ebx, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1040
leaq 0xe4c(%rip), %r14       # 0x202a
movq %r15, %rdi
movq %r14, %rsi
callq 0x1070
leaq 0xe3c(%rip), %r15       # 0x202c
xorl %edx, %edx
leal 0x1(%rdx), %ebp
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x1040
movl $0x1, %edi
callq 0x10a0
xorl %edi, %edi
movq %r14, %rsi
callq 0x1070
movl %ebp, %edx
testq %rax, %rax
jne 0x11f2
leaq 0xe20(%rip), %rdi       # 0x2046
movl %ebx, %esi
xorl %eax, %eax
callq 0x1040
xorl %edi, %edi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: dfs_start_over_or_continue
void	dfs_start_over_or_continue(t_info *info, int index)
{
	if (index != info->end_index
	&& info->tmp_string[0] >= 0)
	{
		copy_check_rooms(info);
		info->level++;
		search_from_room(info);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl %esi, 0x103c(%rdi)
je 0x1492
movq %rdi, %rbx
cmpl $0x0, 0x107c(%rdi)
js 0x1492
movq %rbx, %rdi
callq 0x34f4
incl 0x1050(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1499
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: search_from_room
void	search_from_room(t_info *info)
{
	int		c;
	int		s;
	int		l;
	int		j;

	c = -1;
	j = -1;
	while (info->check_rooms[++c] != EMPTY && info->path_saved == 0)
	{
		s = info->check_rooms[c];
		while (info->rooms[s]->links[++j] != NULL && info->path_saved == 0)
		{
			l = find_a_room(info, info->rooms[s]->links[j]);
			if (info->rooms[l]->visited == 0)
				set_visited(info, s, l);
			if (l == info->end_index)
				break ;
		}
		info->rooms[s]->visited++;
		j = -1;
	}
	dfs_start_over_or_continue(info, l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x34(%rdi), %ecx
xorl %r12d, %r12d
cmpl $0x0, 0x1068(%rbx)
jne 0x1563
movslq %ecx, %r13
movq 0x18a8(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x14e3
movl %ecx, -0x2c(%rbp)
cmpl $0x0, 0x1068(%rbx)
je 0x1500
movq 0x18a8(%rbx), %rax
movq (%rax,%r13,8), %rax
incl 0x5c(%rax)
movl 0x38(%rbx,%r12,4), %ecx
incq %r12
cmpl $-0x1, %ecx
jne 0x14b0
jmp 0x1563
movl $0x8, %r15d
movq %rbx, %rdi
callq 0x2d50
movl %eax, %r14d
movq 0x18a8(%rbx), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, 0x5c(%rax)
jne 0x1533
movq %rbx, %rdi
movl -0x2c(%rbp), %esi
movl %r14d, %edx
callq 0x3608
cmpl 0x103c(%rbx), %r14d
je 0x14e3
movq 0x18a8(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rax
movq (%rax,%r15), %rsi
testq %rsi, %rsi
je 0x14e3
addq $0x8, %r15
cmpl $0x0, 0x1068(%rbx)
je 0x1506
jmp 0x14e3
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145c
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: get_lvl_2_rooms
void	get_lvl_2_rooms(t_info *info, int i)
{
	int		j;
	int		s;
	int		t;

	j = 0;
	t = 0;
	while (info->rooms[info->lvl_1_rooms[i]]->links[j] != NULL)
	{
		s = find_a_room(info, info->rooms[info->lvl_1_rooms[i]]->links[j]);
		if (info->rooms[info->lvl_1_rooms[i]]->path_2 < 0
		&& info->rooms[s]->visited == 0)
		{
			info->rooms[s]->visited = 1;
			info->rooms[s]->level = info->level;
			info->index_stack[t][0] = info->lvl_1_rooms[i];
			info->index_stack[t][1] = s;
			info->check_rooms[t] = s;
			t++;
		}
		j++;
	}
	info->rooms[info->lvl_1_rooms[i]]->visited = 2;
	info->level++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
movq 0x18a8(%rdi), %rax
movslq 0x838(%rdi,%r14,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq (%rcx), %rsi
testq %rsi, %rsi
je 0x1642
xorl %r15d, %r15d
movl $0x8, %r12d
movq %rbx, %rdi
callq 0x2d50
movq 0x18a8(%rbx), %rcx
movslq 0x838(%rbx,%r14,4), %rdx
movq (%rcx,%rdx,8), %rdx
cmpl $0x0, 0x54(%rdx)
jns 0x161a
movslq %eax, %rdx
movq (%rcx,%rdx,8), %rcx
cmpl $0x0, 0x5c(%rcx)
jne 0x161a
movl $0x1, 0x5c(%rcx)
movl 0x1050(%rbx), %edx
movl %edx, 0x4c(%rcx)
movl 0x838(%rbx,%r14,4), %ecx
movq 0x1048(%rbx), %rdx
movslq %r15d, %r15
movq (%rdx,%r15,8), %rdx
movl %ecx, (%rdx)
movl %eax, 0x4(%rdx)
movl %eax, 0x34(%rbx,%r15,4)
incl %r15d
movq 0x18a8(%rbx), %rax
movslq 0x838(%rbx,%r14,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq (%rcx,%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0x15b9
movl $0x2, 0x5c(%rax)
incl 0x1050(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: dfs_search
void	dfs_search(t_info *info, int i)
{
	while (info->lvl_1_rooms[++i] != EMPTY)
	{
		info->level = 2;
		get_lvl_2_rooms(info, i);
		search_from_room(info);
		reset_tmp_stacks(info);
		if (info->last_found_used_2 == 0)
			return ;
		info->path_saved = 0;
	}
}

// Assembly:
movslq %esi, %rax
cmpl $-0x1, 0x83c(%rdi,%rax,4)
je 0x16d0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leal 0x1(%rax), %r14d
leaq (%rdi,%rax,4), %r15
addq $0x840, %r15            # imm = 0x840
movl $0x2, 0x1050(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x157c
movq %rbx, %rdi
callq 0x1499
movq %rbx, %rdi
callq 0x1bc4
cmpl $0x0, 0x188c(%rbx)
je 0x16c6
movl $0x0, 0x1068(%rbx)
incl %r14d
cmpl $-0x1, (%r15)
leaq 0x4(%r15), %r15
jne 0x1681
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/flag_management.c
// Function: parse_flags
void			parse_flags(int ac, char **av, t_info *info)
{
	int			i;

	info->ants = -1;
	info->flag_storage = 0;
	while (ac > 1 && av[1] && av[1][0] == '-')
	{
		i = 1;
		while (av[1][i] && ft_strchr("aehlpvx", av[1][i]))
			save_flag(info, av[1][i++]);
		av++;
	}
	if (info->flag_storage & ANTS)
		info->ants = ft_atoi(av[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl $0xffffffff, 0x28(%rdx) # imm = 0xFFFFFFFF
movl $0x0, 0x1040(%rdx)
cmpl $0x2, %edi
jl 0x18f0
movl %edi, %r15d
leaq 0x5ce3(%rip), %r12      # 0x7510
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x18f0
cmpb $0x2d, (%rax)
jne 0x18f0
addq $0x8, %r14
movq (%r14), %rax
movb 0x1(%rax), %al
testb %al, %al
je 0x18e6
xorl %r13d, %r13d
movsbl %al, %esi
movq %r12, %rdi
callq 0x474c
testq %rax, %rax
je 0x18e6
movq (%r14), %rax
movzbl 0x1(%rax,%r13), %eax
cmpl $0x6b, %eax
jle 0x188c
cmpl $0x75, %eax
jg 0x18a2
cmpl $0x6c, %eax
je 0x18ba
cmpl $0x70, %eax
jne 0x18d3
movl $0x20, %eax
jmp 0x18cd
cmpl $0x61, %eax
je 0x18b3
cmpl $0x65, %eax
je 0x18c8
cmpl $0x68, %eax
jne 0x18d3
movl $0x4, %eax
jmp 0x18cd
cmpl $0x76, %eax
je 0x18c1
cmpl $0x78, %eax
jne 0x18d3
movl $0x8, %eax
jmp 0x18cd
movl $0x1, %eax
jmp 0x18cd
movl $0x10, %eax
jmp 0x18cd
movl $0x40, %eax
jmp 0x18cd
movl $0x2, %eax
orl %eax, 0x1040(%rbx)
movq (%r14), %rax
movb 0x2(%rax,%r13), %al
incq %r13
testb %al, %al
jne 0x1858
cmpl $0x1, %r15d
jg 0x182d
testb $0x1, 0x1040(%rbx)
je 0x1905
movq 0x8(%r14), %rdi
callq 0x44d0
movl %eax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/handle_paths.c
// Function: create_fork
void	create_fork(t_info *info, int room_i, int y, int t)
{
	int		s;
	int		note;
	int		fork;

	fork = 0;
	note = y;
	while (info->rooms[room_i]->links[t] != NULL && fork == 0)
	{
		s = find_a_room(info, info->rooms[room_i]->links[t]);
		if ((info->rooms[room_i]->level <= info->rooms[s]->level
		|| info->rooms[s]->level == -1) && s != info->end_index)
			fork++;
		else if (info->phase == 2 && s != info->end_index)
			fork++;
		t++;
	}
	if (fork)
	{
		t = -1;
		while (info->index_stack[y][0] != EMPTY)
			y++;
		while (info->index_stack[note][++t] != EMPTY)
			info->index_stack[y][t] = info->index_stack[note][t];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movslq %esi, %r15
movq 0x18a8(%rdi), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rdx
movslq %ecx, %rax
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0x19f3
movq %rdi, %r14
leaq 0x8(,%rax,8), %r12
movq %r14, %rdi
callq 0x2d50
movq 0x18a8(%r14), %rcx
movq (%rcx,%r15,8), %rdx
movslq %eax, %rsi
movq (%rcx,%rsi,8), %rcx
movl 0x4c(%rcx), %ecx
cmpl %ecx, 0x4c(%rdx)
jle 0x1975
cmpl $-0x1, %ecx
jne 0x197e
cmpl 0x103c(%r14), %eax
jne 0x1996
movb $0x1, %cl
cmpl $0x2, 0x106c(%r14)
jne 0x1998
cmpl 0x103c(%r14), %eax
sete %cl
jmp 0x1998
xorl %ecx, %ecx
testb %cl, %cl
je 0x19b8
movq 0x18a8(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0x194e
testb %cl, %cl
jne 0x19f3
movq 0x1048(%r14), %rcx
movslq %ebx, %rdx
leaq (%rcx,%rdx,8), %rsi
movq (%rsi), %rax
addq $0x8, %rsi
cmpl $-0x1, (%rax)
jne 0x19ca
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %edx
cmpl $-0x1, %edx
je 0x19f3
xorl %esi, %esi
movl %edx, (%rax,%rsi)
movl 0x4(%rcx,%rsi), %edx
addq $0x4, %rsi
cmpl $-0x1, %edx
jne 0x19e3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/handle_paths.c
// Function: add_to_path
void	add_to_path(t_info *info, int last, int next, int y)
{
	int		last_room;
	int		i;

	i = 0;
	if (info->rooms[last]->flow == 1 && info->rooms[next]->flow == 1)
		return ;
	while (info->index_stack[++y][0] != EMPTY)
	{
		last_room = last_on_path(info->index_stack[y]);
		if ((info->phase == 1 && info->rooms[last]->path < 0 && last_room
		== last) || (info->phase == 2 && info->rooms[last]->path_2 < 0
		&& last_room == last))
		{
			create_fork(info, last, y, 0);
			while (info->index_stack[y][i] != EMPTY)
				i++;
			info->index_stack[y][i] = next;
			if (next == info->end_index)
				save_path(info, y, 0);
			return ;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rdi, %rbx
movq 0x18a8(%rdi), %rdx
movslq %esi, %rax
movq (%rdx,%rax,8), %rax
cmpl $0x1, 0x38(%rax)
jne 0x1a4e
movslq %r14d, %rdi
movq (%rdx,%rdi,8), %rdx
cmpl $0x1, 0x38(%rdx)
je 0x1b00
movq 0x1048(%rbx), %rdx
movslq %ecx, %r15
movq 0x8(%rdx,%r15,8), %rdi
cmpl $-0x1, (%rdi)
je 0x1b00
incq %r15
movl 0x106c(%rbx), %ecx
movq $-0x1, %r8
cmpl $-0x1, 0x8(%rdi,%r8,4)
leaq 0x1(%r8), %r8
jne 0x1a76
movl %r8d, %r8d
movl (%rdi,%r8,4), %edi
cmpl $0x2, %ecx
je 0x1aa2
cmpl $0x1, %ecx
jne 0x1aac
cmpl $0x0, 0x50(%rax)
jns 0x1a9d
cmpl %esi, %edi
je 0x1abb
cmpl $0x2, %ecx
jne 0x1aac
cmpl $0x0, 0x54(%rax)
jns 0x1aac
cmpl %esi, %edi
je 0x1abb
movq 0x8(%rdx,%r15,8), %rdi
incq %r15
cmpl $-0x1, (%rdi)
jne 0x1a6f
jmp 0x1b00
movq %rbx, %rdi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x1914
movq 0x1048(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $-0x1, (%rax)
leaq 0x4(%rax), %rax
jne 0x1ad3
movl %r14d, -0x4(%rax)
cmpl %r14d, 0x103c(%rbx)
jne 0x1b00
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3208
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/parse_ants.c
// Function: parse_ants
void		parse_ants(t_info *info, t_output *output)
{
	if (ft_isint(output->line))
	{
		if (!(info->flag_storage & ANTS))
		{
			info->ants = ft_atoi(output->line);
			if (info->ants < 1)
				exit_error(ERR_ANTS, info);
		}
		info->ants_at_start = info->ants;
	}
	else
		exit_error(ERR_ANTS, info);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
incq %r15
movsbl -0x1(%r15), %edi
callq 0x4564
testl %eax, %eax
je 0x1ba8
cmpb $0x0, (%r15)
leaq 0x1(%r15), %r15
jne 0x1b54
testl %eax, %eax
je 0x1ba8
testb $0x1, 0x1040(%rbx)
jne 0x1b97
movq (%r14), %rdi
callq 0x44d0
movl %eax, 0x28(%rbx)
testl %eax, %eax
jg 0x1b97
leaq 0x5989(%rip), %rdi      # 0x7518
movq %rbx, %rsi
callq 0x34cb
movl 0x28(%rbx), %eax
movl %eax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5969(%rip), %rdi      # 0x7518
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x34cb
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/reset_paths.c
// Function: reset_tmp_stacks
void	reset_tmp_stacks(t_info *info)
{
	int		i;
	int		y;

	i = 0;
	y = 0;
	while (i < 513)
	{
		info->tmp_string[i] = EMPTY;
		info->check_rooms[i] = EMPTY;
		i++;
	}
	i = 0;
	while (y < info->link_amnt)
	{
		while (i < 513)
		{
			info->index_stack[y][i] = EMPTY;
			i++;
		}
		i = 0;
		y++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x34, %rdi
movl $0x804, %edx            # imm = 0x804
movl $0xff, %esi
callq 0x1060
xorl %eax, %eax
movl $0xffffffff, 0x107c(%rbx,%rax,4) # imm = 0xFFFFFFFF
incq %rax
cmpq $0x201, %rax            # imm = 0x201
jne 0x1be6
cmpl $0x0, 0x1058(%rbx)
jle 0x1c31
movq 0x1048(%rbx), %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
movl $0x804, %edx            # imm = 0x804
movl $0xff, %esi
callq 0x1060
incq %r15
movslq 0x1058(%rbx), %rax
cmpq %rax, %r15
jl 0x1c0f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/reset_paths.c
// Function: room_on_valid_path
int		room_on_valid_path(t_info *info, int i)
{
	int		y;
	int		t;

	y = -1;
	t = -1;
	while (info->phase == 1 && info->valid_indexes[++y][0] != EMPTY)
	{
		while (info->valid_indexes[y][++t] != EMPTY)
		{
			if (info->valid_indexes[y][t] == i)
				return (1);
		}
		t = -1;
	}
	while (info->phase == 2 && info->valid_indexes_2[++y][0] != EMPTY)
	{
		while (info->valid_indexes_2[y][++t] != EMPTY)
		{
			if (info->valid_indexes_2[y][t] == i)
				return (1);
		}
		t = -1;
	}
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x106c(%rdi), %ecx
movq $-0x1, %rdx
cmpl $0x1, %ecx
jne 0x1c8a
movq 0x1898(%rdi), %rdx
movq $-0x1, %rax
movq 0x8(%rdx,%rax,8), %r8
incq %rax
cmpl $-0x1, (%r8)
je 0x1c87
movl (%r8), %r9d
cmpl $-0x1, %r9d
je 0x1c82
addq $0x4, %r8
cmpl %esi, %r9d
jne 0x1c6e
jmp 0x1cc1
cmpl $0x1, %ecx
je 0x1c60
movslq %eax, %rdx
xorl %eax, %eax
cmpl $0x2, %ecx
jne 0x1cc6
movq 0x18a0(%rdi), %rdi
movq 0x8(%rdi,%rdx,8), %r8
cmpl $-0x1, (%r8)
je 0x1cc6
incq %rdx
movl (%r8), %r9d
cmpl $-0x1, %r9d
je 0x1cba
addq $0x4, %r8
cmpl %esi, %r9d
jne 0x1ca6
jmp 0x1cc1
cmpl $0x2, %ecx
je 0x1c98
jmp 0x1cc6
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/reset_paths.c
// Function: reset_rooms
void	reset_rooms(t_info *info)
{
	int		i;

	i = 0;
	info->level = 1;
	while (info->rooms[i] != NULL)
	{
		if (room_on_valid_path(info, i) && i != info->end_index)
			info->rooms[i]->visited = 2;
		else
			info->rooms[i]->visited = 0;
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x1, 0x1050(%rdi)
movq 0x18a8(%rdi), %r15
movq (%r15), %r12
testq %r12, %r12
je 0x1d25
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1c3c
testl %eax, %eax
je 0x1d11
movl 0x103c(%rbx), %ecx
movl $0x2, %eax
cmpq %rcx, %r14
jne 0x1d13
xorl %eax, %eax
movl %eax, 0x5c(%r12)
movq 0x8(%r15,%r14,8), %r12
incq %r14
testq %r12, %r12
jne 0x1cf2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/run_second_and_third_round.c
// Function: third_round
void		third_round(t_info *info)
{
	int		i;

	info->round = 1;
	while (!info->accurate && info->round < 5)
	{
		i = reset_values(info);
		reset_tmp_stacks(info);
		while (info->rooms[++i] != NULL)
		{
			if (info->round > 1)
				info->rooms[i]->visited = info->rooms[i]->path_2 < 0 ? 0 : 1;
			else
				info->rooms[i]->visited = 0;
			info->rooms[i]->flow = 0;
			info->rooms[i]->path_2 = -1;
		}
		get_links_for_start(info, 0, 0, 0);
		save_first_level_rooms(info);
		dfs_search(info, -1);
		if (info->flag_storage & VERBOSE)
			print_paths(info);
		calculate_moves(info);
		info->round++;
	}
}

// Assembly:
movl $0x1, 0x1070(%rdi)
cmpl $0x0, 0x1894(%rdi)
je 0x1d78
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r14d
movl $0x2, 0x106c(%rbx)
movl %r14d, 0x1050(%rbx)
movq $0x0, 0x1064(%rbx)
movl %r14d, 0x188c(%rbx)
movq %rbx, %rdi
callq 0x1bc4
movq 0x18a8(%rbx), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1df8
movl 0x1070(%rbx), %edx
addq $0x8, %rax
xorl %esi, %esi
cmpl $0x2, %edx
jl 0x1ddb
movl 0x54(%rcx), %esi
notl %esi
shrl $0x1f, %esi
movl %esi, 0x5c(%rcx)
movl $0x0, 0x38(%rcx)
movl $0xffffffff, 0x54(%rcx) # imm = 0xFFFFFFFF
movq (%rax), %rcx
addq $0x8, %rax
testq %rcx, %rcx
jne 0x1dcc
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4153
movl $0xd, %eax
movl (%rbx,%rax,4), %ecx
movl %ecx, 0x804(%rbx,%rax,4)
movl $0xffffffff, (%rbx,%rax,4) # imm = 0xFFFFFFFF
incq %rax
cmpq $0x20e, %rax            # imm = 0x20E
jne 0x1e0b
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1658
testb $0x40, 0x1040(%rbx)
je 0x1e45
movq %rbx, %rdi
callq 0x3c18
movq %rbx, %rdi
callq 0x2573
movl 0x1070(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1070(%rbx)
cmpl $0x0, 0x1894(%rbx)
jne 0x1e6e
cmpl $0x4, %eax
jl 0x1d88
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/run_second_and_third_round.c
// Function: second_round
void		second_round(t_info *info)
{
	int		i;

	i = 0;
	info->phase = 2;
	info->level = 1;
	info->path_n_2 = 0;
	if (info->path_n_1 < 1)
		exit_error(ERR_NO_PATH, info);
	reset_tmp_stacks(info);
	while (info->rooms[i] != NULL)
	{
		info->rooms[i]->visited = 0;
		i++;
	}
	get_links_for_start(info, 0, 0, 0);
	find_paths(info, -1, 0, 0);
	if (info->valid_indexes_2[0][0] != EMPTY && (info->flag_storage & VERBOSE))
		print_paths(info);
	calculate_moves(info);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, 0x106c(%rdi)
movl $0x1, 0x1050(%rdi)
movl $0x0, 0x1064(%rdi)
cmpl $0x0, 0x1060(%rdi)
jg 0x1eb2
leaq 0x569d(%rip), %rdi      # 0x7547
movq %rbx, %rsi
callq 0x34cb
movq %rbx, %rdi
callq 0x1bc4
movq 0x18a8(%rbx), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1ee0
addq $0x8, %rax
movl $0x0, 0x5c(%rcx)
movq (%rax), %rcx
addq $0x8, %rax
testq %rcx, %rcx
jne 0x1ecd
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4153
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4028
movq 0x18a0(%rbx), %rax
movq (%rax), %rax
cmpl $-0x1, (%rax)
je 0x1f1f
testb $0x40, 0x1040(%rbx)
je 0x1f1f
movq %rbx, %rdi
callq 0x3c18
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2573
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/sort_rooms.c
// Function: split_link_string
void	split_link_string(t_info *info, int index)
{
	info->rooms[index]->links =
	ft_strsplit(info->rooms[index]->link_string, ' ');
	free(info->rooms[index]->link_string);
	if (info->rooms[index]->start_or_end != 0)
	{
		if (info->rooms[index]->start_or_end == 1)
			info->start_index = index;
		else
			info->end_index = index;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x18a8(%rdi), %rax
movslq %esi, %r15
movq (%rax,%r15,8), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x4904
movq 0x18a8(%r14), %rcx
movq (%rcx,%r15,8), %rdx
movq %rax, 0x8(%rdx)
movq (%rcx,%r15,8), %rax
movq (%rax), %rdi
callq 0x1030
movq 0x18a8(%r14), %rax
movq (%rax,%r15,8), %rax
movl 0x58(%rax), %eax
testl %eax, %eax
je 0x1f9c
cmpl $0x1, %eax
jne 0x1f95
movl %ebx, 0x1078(%r14)
jmp 0x1f9c
movl %ebx, 0x103c(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/sort_rooms.c
// Function: first_from_index
void	first_from_index(t_info *info, int i)
{
	int		first;
	int		placement;

	first = i + 1;
	placement = i;
	while (info->rooms[i] != NULL)
	{
		if (ft_strcmp(info->rooms[i]->name, info->rooms[first]->name) < 0)
			first = i;
		if (info->rooms[++i] != NULL)
		{
			if (info->rooms[placement]->x == info->rooms[i]->x
			&& info->rooms[placement]->y == info->rooms[i]->y)
				exit_error(ERR_ROOM_DUP_COORD, info);
			else if (!(ft_strcmp(info->rooms[placement]->name,
			info->rooms[i]->name)))
				exit_error(ERR_ROOM_DUP_NAME, info);
		}
	}
	swap_rooms(info, first, placement);
	if (info->rooms[placement + 1] != NULL)
		split_link_string(info, placement);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leal 0x1(%rsi), %r15d
movq 0x18a8(%rdi), %rax
movq %rsi, -0x38(%rbp)
movslq %esi, %r13
movq (%rax,%r13,8), %rcx
movl %r15d, -0x2c(%rbp)
testq %rcx, %rcx
je 0x206c
leaq 0x1(%r13), %r12
movq -0x38(%rbp), %rdx
movl %edx, %ebx
movl -0x2c(%rbp), %r15d
movq 0x10(%rcx), %rdi
movslq %r15d, %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
callq 0x4780
movl %ebx, %ecx
testl %eax, %eax
js 0x2009
movl %r15d, %ecx
movl %ecx, %r15d
movq 0x18a8(%r14), %rcx
movq (%rcx,%r12,8), %rax
testq %rax, %rax
je 0x2057
movq (%rcx,%r13,8), %rcx
movl 0x60(%rcx), %edx
cmpl 0x60(%rax), %edx
jne 0x2037
movl 0x64(%rcx), %edx
leaq 0x552b(%rip), %rdi      # 0x755d
cmpl 0x64(%rax), %edx
je 0x204f
movq 0x10(%rcx), %rdi
movq 0x10(%rax), %rsi
callq 0x4780
leaq 0x553b(%rip), %rdi      # 0x7586
testl %eax, %eax
jne 0x2057
movq %r14, %rsi
callq 0x34cb
movq 0x18a8(%r14), %rax
movq (%rax,%r12,8), %rcx
incl %ebx
incq %r12
testq %rcx, %rcx
jne 0x1fec
movq %r14, %rdi
movl %r15d, %esi
movq -0x38(%rbp), %rbx
movl %ebx, %edx
callq 0x2e29
movq 0x18a8(%r14), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x20a7
movq %r14, %rdi
movl %ebx, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f30
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/sort_rooms.c
// Function: malloc_for_valid_indexes
void	malloc_for_valid_indexes(t_info *info, int i, int x)
{
	if (!(info->valid_indexes =
	(int**)malloc(sizeof(int*) * info->max_paths + 1))
	|| !(info->valid_indexes_2 =
	(int**)malloc(sizeof(int*) * info->max_paths + 1))
	|| !(info->valid_paths =
	(char**)malloc(sizeof(char*) * info->max_paths + 1))
	|| !(info->valid_paths_2 =
	(char**)malloc(sizeof(char*) * info->max_paths + 1)))
		exit_error(ERR_MALLOC, info);
	while (i < info->max_paths + 1)
	{
		if (!(info->valid_indexes[i] = (int*)malloc(sizeof(int) * 513))
		|| !(info->valid_indexes_2[i] = (int*)malloc(sizeof(int) * 513)))
			exit_error(ERR_MALLOC, info);
		while (x < 513)
		{
			info->valid_indexes[i][x] = EMPTY;
			info->valid_indexes_2[i][x] = EMPTY;
			x++;
		}
		x = 0;
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movslq 0x105c(%rdi), %rax
leaq 0x1(,%rax,8), %r12
movq %r12, %rdi
callq 0x1080
movq %rax, 0x1898(%rbx)
testq %rax, %rax
je 0x2126
movq %r12, %rdi
callq 0x1080
movq %rax, 0x18a0(%rbx)
testq %rax, %rax
je 0x2126
movq %r12, %rdi
callq 0x1080
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x2126
movq %r12, %rdi
callq 0x1080
movq %rax, 0x20(%rbx)
testq %rax, %rax
jne 0x2135
leaq 0x547c(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x34cb
cmpl %r15d, 0x105c(%rbx)
jl 0x21ec
movslq %r15d, %r12
leaq 0x545d(%rip), %r15      # 0x75a9
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x804, %edi            # imm = 0x804
callq 0x1080
movq 0x1898(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
je 0x2186
movl $0x804, %edi            # imm = 0x804
callq 0x1080
movq 0x18a0(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
jne 0x2191
movq %r15, %rdi
movq %rbx, %rsi
callq 0x34cb
cmpl $0x200, %r14d           # imm = 0x200
jg 0x21d1
movq 0x1898(%rbx), %rax
movq 0x18a0(%rbx), %rcx
movq (%rax,%r12,8), %rax
movq (%rcx,%r12,8), %rcx
movslq %r14d, %rdx
incq %rdx
movq %rdx, %rsi
movl %r13d, -0x4(%rax,%rdx,4)
movl %r13d, -0x4(%rcx,%rdx,4)
incq %rsi
cmpl $0x201, %edx            # imm = 0x201
movq %rsi, %rdx
jne 0x21b9
leaq 0x1(%r12), %rax
movslq 0x105c(%rbx), %rcx
xorl %r14d, %r14d
cmpq %rcx, %r12
movq %rax, %r12
jl 0x2152
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/sort_rooms.c
// Function: sort_rooms
void	sort_rooms(t_info *info)
{
	int		i;
	int		x;

	i = 0;
	x = 0;
	while (info->rooms[i + 1] != NULL)
	{
		first_from_index(info, i);
		i++;
	}
	split_link_string(info, i);
	i = 0;
	while (info->rooms[info->start_index]->links[i] != NULL)
		i++;
	while (info->rooms[info->end_index]->links[x] != NULL)
		x++;
	info->max_paths = i < x ? i : x;
	malloc_for_valid_indexes(info, 0, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18a8(%rdi), %rax
cmpq $0x0, 0x8(%rax)
je 0x2235
xorl %esi, %esi
movq %rsi, %r14
movq %rbx, %rdi
callq 0x1fa7
movq 0x18a8(%rbx), %rax
leaq 0x1(%r14), %rsi
cmpq $0x0, 0x10(%rax,%r14,8)
jne 0x2215
jmp 0x2237
xorl %esi, %esi
movq %rbx, %rdi
callq 0x1f30
movq 0x18a8(%rbx), %rcx
movslq 0x1078(%rbx), %rax
movq (%rcx,%rax,8), %rax
movq 0x8(%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpq $0x0, (%rdx)
leaq 0x8(%rdx), %rdx
jne 0x225a
movslq 0x103c(%rbx), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x8(%rcx), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incl %ecx
cmpq $0x0, (%rdx)
leaq 0x8(%rdx), %rdx
jne 0x227a
cmpl %ecx, %eax
cmovbl %eax, %ecx
movl %ecx, 0x105c(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x20b6
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/calculate_moves.c
// Function: reset_valid_indexes_2
void		reset_valid_indexes_2(t_info *info)
{
	int		y;
	int		i;

	y = 0;
	i = 0;
	while (y < info->max_paths + 1)
	{
		while (i < 513)
		{
			if (info->valid_indexes_2[y][i] > 0)
			{
				info->rooms[info->valid_indexes_2[y][i]]->length_2 = 0;
				info->rooms[info->valid_indexes_2[y][i]]->cost_2 = 0;
				info->rooms[info->valid_indexes_2[y][i]]->path_2 = -1;
			}
			info->valid_indexes_2[y][i] = EMPTY;
			i++;
		}
		i = 0;
		y++;
	}
	info->path_n_2 = 0;
}

// Assembly:
cmpl $0x0, 0x105c(%rdi)
js 0x231f
pushq %rbp
movq %rsp, %rbp
movq 0x18a0(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
xorl %r8d, %r8d
movslq (%rsi,%r8,4), %r9
testq %r9, %r9
jle 0x22f7
movq 0x18a8(%rdi), %r10
movq (%r10,%r9,8), %r9
movl %ecx, 0x48(%r9)
movslq (%rsi,%r8,4), %r9
movq (%r10,%r9,8), %r9
movl %ecx, 0x40(%r9)
movslq (%rsi,%r8,4), %r9
movq (%r10,%r9,8), %r9
movl $0xffffffff, 0x54(%r9)  # imm = 0xFFFFFFFF
movl $0xffffffff, (%rsi,%r8,4) # imm = 0xFFFFFFFF
incq %r8
cmpq $0x201, %r8             # imm = 0x201
jne 0x22c3
leaq 0x1(%rdx), %rsi
movslq 0x105c(%rdi), %r8
cmpq %r8, %rdx
movq %rsi, %rdx
jl 0x22bc
popq %rbp
movl $0x0, 0x1064(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/calculate_moves.c
// Function: path_set_insert
void		path_set_insert(t_info *info, int i, int y)
{
	info->rooms[info->valid_indexes[y][i]]->length =
	info->rooms[info->valid_indexes[y][i]]->length_2;
	info->rooms[info->valid_indexes[y][i]]->cost =
	info->rooms[info->valid_indexes[y][i]]->cost_2;
	info->rooms[info->valid_indexes[y][i]]->path =
	info->rooms[info->valid_indexes[y][i]]->path_2;
	info->rooms[info->valid_indexes[y][i]]->path_2 = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x1898(%rdi), %rax
movq 0x18a8(%rdi), %rcx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movslq %esi, %rdx
movslq (%rax,%rdx,4), %rsi
movq (%rcx,%rsi,8), %rsi
movl 0x48(%rsi), %edi
movl %edi, 0x44(%rsi)
movslq (%rax,%rdx,4), %rsi
movq (%rcx,%rsi,8), %rsi
movl 0x40(%rsi), %edi
movl %edi, 0x3c(%rsi)
movslq (%rax,%rdx,4), %rsi
movq (%rcx,%rsi,8), %rsi
movl 0x54(%rsi), %edi
movl %edi, 0x50(%rsi)
movslq (%rax,%rdx,4), %rax
movq (%rcx,%rax,8), %rax
movl $0xffffffff, 0x54(%rax) # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/calculate_moves.c
// Function: change_path_sets
void		change_path_sets(t_info *info)
{
	int		y;
	int		i;

	y = 0;
	i = 0;
	while (y < info->max_paths + 1)
	{
		while (i < 513)
		{
			info->valid_indexes[y][i] = info->valid_indexes_2[y][i];
			if (info->valid_indexes[y][i] != EMPTY)
				path_set_insert(info, i, y);
			info->valid_indexes_2[y][i] = EMPTY;
			i++;
		}
		i = 0;
		y++;
	}
	info->path_n_1 = info->path_n_2;
	info->last_found_used = info->last_found_used_2;
	info->last_found_used_2 = 1;
	info->path_n_2 = 0;
}

// Assembly:
cmpl $0x0, 0x105c(%rdi)
js 0x2438
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x1898(%rdi), %rax
movq 0x18a0(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq (%rax,%rdx,8), %r8
xorl %r9d, %r9d
movl (%rsi,%r9,4), %r10d
movl %r10d, (%r8,%r9,4)
cmpl $-0x1, %r10d
je 0x2409
movq 0x18a8(%rdi), %r10
movq (%rax,%rdx,8), %r11
movslq (%r11,%r9,4), %rbx
movq (%r10,%rbx,8), %rbx
movl 0x48(%rbx), %r14d
movl %r14d, 0x44(%rbx)
movslq (%r11,%r9,4), %rbx
movq (%r10,%rbx,8), %rbx
movl 0x40(%rbx), %r14d
movl %r14d, 0x3c(%rbx)
movslq (%r11,%r9,4), %rbx
movq (%r10,%rbx,8), %rbx
movl 0x54(%rbx), %r14d
movl %r14d, 0x50(%rbx)
movslq (%r11,%r9,4), %r11
movq (%r10,%r11,8), %r10
movl $0xffffffff, 0x54(%r10) # imm = 0xFFFFFFFF
movl $0xffffffff, (%rsi,%r9,4) # imm = 0xFFFFFFFF
incq %r9
cmpq $0x201, %r9             # imm = 0x201
jne 0x23b0
leaq 0x1(%rdx), %rsi
movslq 0x105c(%rdi), %r8
cmpq %r8, %rdx
movq %rsi, %rdx
jl 0x23a5
popq %rbx
popq %r14
popq %rbp
movl 0x1064(%rdi), %eax
movl %eax, 0x1060(%rdi)
movl 0x188c(%rdi), %eax
movl %eax, 0x1888(%rdi)
movl $0x1, 0x188c(%rdi)
movl $0x0, 0x1064(%rdi)
retq