LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_resolve_from_hosts_file
int mg_resolve_from_hosts_file(const char *name, union socket_address *usa) {
#if MG_ENABLE_FILESYSTEM && defined(MG_HOSTS_FILE_NAME)
  /* TODO(mkm) cache /etc/hosts */
  FILE *fp;
  char line[1024];
  char *p;
  char alias[256];
  unsigned int a, b, c, d;
  int len = 0;

  if ((fp = mg_fopen(MG_HOSTS_FILE_NAME, "r")) == NULL) {
    return -1;
  }

  for (; fgets(line, sizeof(line), fp) != NULL;) {
    if (line[0] == '#') continue;

    if (sscanf(line, "%u.%u.%u.%u%n", &a, &b, &c, &d, &len) == 0) {
      /* TODO(mkm): handle ipv6 */
      continue;
    }
    for (p = line + len; sscanf(p, "%s%n", alias, &len) == 1; p += len) {
      if (strcmp(alias, name) == 0) {
        usa->sin.sin_addr.s_addr = htonl(a << 24 | b << 16 | c << 8 | d);
        fclose(fp);
        return 0;
      }
    }
  }

  fclose(fp);
#else
  (void) name;
  (void) usa;
#endif

  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x538, %rsp            # imm = 0x538
movq %rsi, %r14
movq %rdi, %r15
movl $0x0, 0x14(%rsp)
leaq 0x3b72(%rip), %rdi      # 0x16114
leaq 0x4b76(%rip), %rsi      # 0x1711f
callq 0x3370
testq %rax, %rax
je 0x12689
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x32e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x126b9
movq %r14, 0x28(%rsp)
leaq 0x14(%rsp), %r13
leaq 0x3b42(%rip), %r14      # 0x1612d
leaq 0x430(%rsp), %rbp
cmpb $0x23, 0x30(%rsp)
je 0x12667
movq %r13, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x3b15(%rip), %rsi      # 0x1611f
leaq 0x24(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x18(%rsp), %r9
xorl %eax, %eax
callq 0x3420
testl %eax, %eax
je 0x12667
movslq 0x14(%rsp), %rax
leaq (%rsp,%rax), %r12
addq $0x30, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x3420
cmpl $0x1, %eax
jne 0x12667
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3310
testl %eax, %eax
je 0x12690
movslq 0x14(%rsp), %rax
addq %rax, %r12
jmp 0x12636
leaq 0x30(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdx
callq 0x32e0
testq %rax, %rax
jne 0x125f3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x126b9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x126c1
movl 0x24(%rsp), %eax
shll $0x18, %eax
movl 0x20(%rsp), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movl 0x1c(%rsp), %eax
shll $0x8, %eax
orl %ecx, %eax
orl 0x18(%rsp), %eax
bswapl %eax
movq 0x28(%rsp), %rcx
movl %eax, 0x4(%rcx)
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3160
movl %ebp, %eax
addq $0x538, %rsp            # imm = 0x538
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_set_nameserver
void mg_set_nameserver(struct mg_mgr *mgr, const char *nameserver) {
  MG_FREE((char *) mgr->nameserver);
  mgr->nameserver = NULL;
  if (nameserver != NULL) {
    mgr->nameserver = strdup(nameserver);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x3060
movq $0x0, 0x30(%rbx)
testq %r14, %r14
je 0x12912
movq %r14, %rdi
callq 0x35f0
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_tun_log_frame
void mg_tun_log_frame(struct mg_tun_frame *frame) {
  LOG(LL_DEBUG, ("Got TUN frame: type=0x%x, flags=0x%x stream_id=0x%x, "
                 "len=%d",
                 frame->type, frame->flags, (unsigned int) frame->stream_id,
                 (int) frame->body.len));
#if MG_ENABLE_HEXDUMP
  {
    char hex[512];
    mg_hexdump(frame->body.p, frame->body.len, hex, sizeof(hex) - 1);
    hex[sizeof(hex) - 1] = '\0';
    LOG(LL_DEBUG, ("body:\n%s", hex));
  }
#else
  LOG(LL_DEBUG, ("body: '%.*s'", (int) frame->body.len, frame->body.p));
#endif
}

// Assembly:
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
leaq 0x3838(%rip), %rsi      # 0x16164
leaq 0x2c77(%rip), %rdx      # 0x155aa
movl $0x3, %edi
callq 0x44b4
testl %eax, %eax
je 0x1295d
movzbl (%rbx), %esi
movzbl 0x1(%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x10(%rbx), %r8d
leaq 0x381f(%rip), %rdi      # 0x16175
xorl %eax, %eax
callq 0x45a0
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
movq %rsp, %rbx
movq %rbx, %rdx
movl $0x1ff, %ecx            # imm = 0x1FF
xorl %r8d, %r8d
callq 0x10c5e
movb $0x0, 0x1ff(%rbx)
leaq 0x37df(%rip), %rsi      # 0x16164
leaq 0x2c1e(%rip), %rdx      # 0x155aa
movl $0x3, %edi
callq 0x44b4
testl %eax, %eax
je 0x129ab
leaq 0x3810(%rip), %rdi      # 0x161b1
movq %rsp, %rsi
xorl %eax, %eax
callq 0x45a0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_tun_reconnect_ev_handler
void mg_tun_reconnect_ev_handler(struct mg_connection *nc, int ev,
                                 void *ev_data MG_UD_ARG(void *user_data)) {
#if !MG_ENABLE_CALLBACK_USERDATA
  void *user_data = nc->user_data;
#else
  (void) nc;
#endif
  struct mg_tun_client *client = (struct mg_tun_client *) user_data;
  (void) ev_data;

  switch (ev) {
    case MG_EV_TIMER:
      if (!(client->listener->flags & MG_F_TUN_DO_NOT_RECONNECT)) {
        mg_tun_do_reconnect(client);
      } else {
        /* Reconnecting is suppressed, we'll check again at the next poll */
        mg_tun_reconnect(client, 0);
      }
      break;
  }
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
cmpl $0x6, %esi
jne 0x12a6f
movq 0xa0(%rdi), %rbx
movq 0x28(%rbx), %rax
testb $-0x80, 0xc9(%rax)
jne 0x12a38
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
movq (%rbx), %rdi
movq 0x10(%rbx), %rdx
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x1581(%rip), %rsi      # 0x13f98
leaq 0x4d36(%rip), %rcx      # 0x17754
xorl %r8d, %r8d
callq 0x10a93
testq %rax, %rax
je 0x12a44
movq %rax, 0x20(%rbx)
movq %rbx, 0xa0(%rax)
jmp 0x12a6f
movq %rbx, %rdi
xorl %esi, %esi
addq $0x60, %rsp
popq %rbx
jmp 0x12a75
leaq 0x4d10(%rip), %rsi      # 0x1775b
leaq 0x2b58(%rip), %rdx      # 0x155aa
xorl %edi, %edi
callq 0x44b4
testl %eax, %eax
je 0x12a6f
movq 0x10(%rbx), %rsi
leaq 0x4d07(%rip), %rdi      # 0x1776f
xorl %eax, %eax
callq 0x45a0
addq $0x60, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_tun_reconnect
static void mg_tun_reconnect(struct mg_tun_client *client, int timeout) {
  if (client->reconnect == NULL) {
    client->reconnect = mg_add_sock(client->mgr, INVALID_SOCKET,
                                    MG_CB(mg_tun_reconnect_ev_handler, client));
#if !MG_ENABLE_CALLBACK_USERDATA
    client->reconnect->user_data = client;
#endif
  }
  client->reconnect->ev_timer_time = mg_time() + timeout;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x12ad9
movq (%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movapd 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x101(%rip), %rsi      # 0x129b4
callq 0x88ef
movq %rax, %r14
testq %rax, %rax
je 0x12ace
movq 0x18(%r14), %rdi
movq %r14, %rsi
callq 0x82af
movq %r14, 0x30(%rbx)
movq %rbx, 0xa0(%r14)
callq 0x4b23
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
addsd %xmm0, %xmm1
movq 0x30(%rbx), %rax
movsd %xmm1, 0x78(%rax)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_tun_create_client
static struct mg_tun_client *mg_tun_create_client(struct mg_mgr *mgr,
                                                  const char *dispatcher,
                                                  struct mg_tun_ssl_opts ssl) {
  struct mg_tun_client *client = NULL;
  struct mg_iface *iface = mg_find_iface(mgr, &mg_tun_iface_vtable, NULL);
  if (iface == NULL) {
    LOG(LL_ERROR, ("The tun feature requires the manager to have a tun "
                   "interface enabled"));
    return NULL;
  }

  client = (struct mg_tun_client *) MG_MALLOC(sizeof(*client));
  mg_tun_init_client(client, mgr, iface, dispatcher, ssl);
  iface->data = client;

  /*
   * We need to give application a chance to set MG_F_TUN_DO_NOT_RECONNECT on a
   * listening connection right after mg_tun_bind_opt() returned it, so we
   * should use mg_tun_reconnect() here, instead of mg_tun_do_reconnect()
   */
  mg_tun_reconnect(client, 0);
  return client;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x20(%rdi), %rax
testq %rax, %rax
jle 0x12b32
movq 0x28(%r14), %rcx
leaq 0xad23(%rip), %rdx      # 0x1d840
xorl %esi, %esi
movq (%rcx,%rsi,8), %r12
cmpq %rdx, 0x10(%r12)
je 0x12b35
incq %rsi
cmpq %rsi, %rax
jne 0x12b1f
xorl %r12d, %r12d
testq %r12, %r12
je 0x12b6e
movl $0x38, %edi
callq 0x33e0
movq %rax, %r15
movq %r14, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movq %rax, 0x8(%r12)
movq %rax, %rdi
xorl %esi, %esi
callq 0x12a75
jmp 0x12b9b
leaq 0x4dea(%rip), %rsi      # 0x1795f
leaq 0x2a2e(%rip), %rdx      # 0x155aa
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x44b4
testl %eax, %eax
je 0x12b9b
leaq 0x4de3(%rip), %rdi      # 0x17974
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x45a0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_tun_parse_frame
int mg_tun_parse_frame(void *data, size_t len, struct mg_tun_frame *frame) {
  const size_t header_size = sizeof(uint32_t) + sizeof(uint8_t) * 2;
  if (len < header_size) {
    return -1;
  }

  frame->type = *(uint8_t *) (data);
  frame->flags = *(uint8_t *) ((char *) data + 1);
  memcpy(&frame->stream_id, (char *) data + 2, sizeof(uint32_t));
  frame->stream_id = ntohl(frame->stream_id);
  frame->body.p = (char *) data + header_size;
  frame->body.len = len - header_size;
  return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x6, %rsi
jb 0x12bd9
movb (%rdi), %al
movb %al, (%rdx)
movb 0x1(%rdi), %al
movb %al, 0x1(%rdx)
movl 0x2(%rdi), %eax
bswapl %eax
movl %eax, 0x4(%rdx)
addq $0x6, %rdi
movq %rdi, 0x8(%rdx)
addq $-0x6, %rsi
movq %rsi, 0x10(%rdx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_base64_emit_code
static void cs_base64_emit_code(struct cs_base64_ctx *ctx, int v) {
  if (v < NUM_UPPERCASES) {
    ctx->b64_putc(v + 'A', ctx->user_data);
  } else if (v < (NUM_LETTERS)) {
    ctx->b64_putc(v - NUM_UPPERCASES + 'a', ctx->user_data);
  } else if (v < (NUM_LETTERS + NUM_DIGITS)) {
    ctx->b64_putc(v - NUM_LETTERS + '0', ctx->user_data);
  } else {
    ctx->b64_putc(v - NUM_LETTERS - NUM_DIGITS == 0 ? '+' : '/',
                  ctx->user_data);
  }
}

// Assembly:
cmpl $0x19, %esi
jg 0x12be5
addb $0x41, %sil
jmp 0x12bee
cmpl $0x33, %esi
jg 0x12bfe
addb $0x47, %sil
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
movsbl %sil, %edi
movq %rax, %rsi
jmpq *%rcx
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
cmpl $0x3d, %esi
jg 0x12c10
addb $-0x4, %sil
jmp 0x12bf5
xorl %edx, %edx
cmpl $0x3e, %esi
setne %dl
leal 0x2b(,%rdx,4), %edi
jmp 0x12bf9
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_http_conn_destructor
static void mg_http_conn_destructor(void *proto_data) {
  struct mg_http_proto_data *pd = (struct mg_http_proto_data *) proto_data;
#if MG_ENABLE_FILESYSTEM
  mg_http_free_proto_data_file(&pd->file);
#endif
#if MG_ENABLE_HTTP_CGI
  mg_http_free_proto_data_cgi(&pd->cgi);
#endif
#if MG_ENABLE_HTTP_STREAMING_MULTIPART
  mg_http_free_proto_data_mp_stream(&pd->mp_stream);
#endif
  mg_http_free_proto_data_endpoints(&pd->endpoints);
  mg_http_free_reverse_proxy_data(&pd->reverse_proxy_data);
  MG_FREE(proto_data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x12c45
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x12c3b
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x12c60
orb $0x8, 0xc9(%rax)
movq $0x0, 0xa0(%rax)
movq $0x0, 0x20(%rbx)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x12c9f
movq (%r14), %r15
movq 0x8(%r14), %rdi
callq 0x3060
movq 0x18(%r14), %rdi
callq 0x3060
movq 0x20(%r14), %rdi
callq 0x3060
movq %r14, %rdi
callq 0x3060
movq %r15, %r14
testq %r15, %r15
jne 0x12c71
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x12cfd
cmpq $0x0, 0x88(%r14)
jne 0x12cd6
movl $0x1, %edi
movl $0x58, %esi
callq 0x3300
movq %rax, 0x88(%r14)
leaq -0xae(%rip), %rax       # 0x12c21
movq %rax, 0x90(%r14)
movq 0x88(%r14), %rax
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0x12cf5
orb $0x4, 0xc9(%rcx)
movq $0x0, 0x48(%rax)
movq $0x0, 0x48(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_http_is_authorized
static int mg_http_is_authorized(struct http_message *hm, struct mg_str path,
                                 int is_directory, const char *domain,
                                 const char *passwords_file,
                                 int is_global_pass_file) {
  char buf[MG_MAX_PATH];
  const char *p;
  FILE *fp;
  int authorized = 1;

  if (domain != NULL && passwords_file != NULL) {
    if (is_global_pass_file) {
      fp = mg_fopen(passwords_file, "r");
    } else if (is_directory) {
      snprintf(buf, sizeof(buf), "%.*s%c%s", (int) path.len, path.p, DIRSEP,
               passwords_file);
      fp = mg_fopen(buf, "r");
    } else {
      p = strrchr(path.p, DIRSEP);
      if (p == NULL) p = path.p;
      snprintf(buf, sizeof(buf), "%.*s%c%s", (int) (p - path.p), path.p, DIRSEP,
               passwords_file);
      fp = mg_fopen(buf, "r");
    }

    if (fp != NULL) {
      authorized = mg_http_check_digest_auth(hm, domain, fp);
      fclose(fp);
    }
  }

  LOG(LL_DEBUG,
      ("%.*s %s %d %d", (int) path.len, path.p,
       passwords_file ? passwords_file : "", is_global_pass_file, authorized));
  return authorized;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %r9, %r14
movl %ecx, %eax
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
testq %r8, %r8
sete %cl
testq %r9, %r9
sete %dl
movl $0x1, %r12d
orb %cl, %dl
jne 0x12dd0
movq %r8, %r13
movq %rdi, %rbp
movq %r14, %r15
cmpl $0x0, 0x1050(%rsp)
jne 0x12da0
movq 0x8(%rsp), %rcx
testl %eax, %eax
jne 0x12d78
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x31f0
movq %rax, %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
subq %rbx, %rcx
movq %r14, (%rsp)
leaq 0x39b1(%rip), %rdx      # 0x16734
leaq 0x10(%rsp), %r15
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movq %rbx, %r8
movl $0x2f, %r9d
xorl %eax, %eax
callq 0x31e0
leaq 0x4378(%rip), %rsi      # 0x1711f
movq %r15, %rdi
callq 0x3370
testq %rax, %rax
je 0x12dd0
movq %rax, %r15
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xdde6
movl %eax, %r12d
movq %r15, %rdi
callq 0x3160
leaq 0x3966(%rip), %rsi      # 0x1673d
leaq 0x27cc(%rip), %rdx      # 0x155aa
movl $0x3, %edi
callq 0x44b4
testl %eax, %eax
je 0x12e1b
testq %r14, %r14
leaq 0x39d9(%rip), %rcx      # 0x167cf
cmovneq %r14, %rcx
leaq 0x3952(%rip), %rdi      # 0x16753
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
movl 0x1050(%rsp), %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x45a0
movl %r12d, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_is_file_hidden
static int mg_is_file_hidden(const char *path,
                             const struct mg_serve_http_opts *opts,
                             int exclude_specials) {
  const char *p1 = opts->per_directory_auth_file;
  const char *p2 = opts->hidden_file_pattern;

  /* Strip directory path from the file name */
  const char *pdir = strrchr(path, DIRSEP);
  if (pdir != NULL) {
    path = pdir + 1;
  }

  return (exclude_specials && (!strcmp(path, ".") || !strcmp(path, ".."))) ||
         (p1 != NULL &&
          mg_match_prefix(p1, strlen(p1), path) == (int) strlen(p1)) ||
         (p2 != NULL && mg_match_prefix(p2, strlen(p2), path) > 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %r12
movq 0x10(%rsi), %r15
movq 0x58(%rsi), %rbx
movl $0x2f, %esi
callq 0x31f0
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %r12, %r14
testl %ebp, %ebp
je 0x12e89
leaq 0x2b86(%rip), %rsi      # 0x159eb
movq %r14, %rdi
callq 0x3310
movl $0x1, %ebp
testl %eax, %eax
je 0x12ede
leaq 0x2b6d(%rip), %rsi      # 0x159ea
movq %r14, %rdi
callq 0x3310
testl %eax, %eax
je 0x12ede
testq %r15, %r15
je 0x12eb8
movq %r15, %rdi
callq 0x3180
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x456e
movl %eax, %r12d
movq %r15, %rdi
callq 0x3180
movl $0x1, %ebp
cmpl %eax, %r12d
je 0x12ede
testq %rbx, %rbx
je 0x12edc
movq %rbx, %rdi
callq 0x3180
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x456e
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
jmp 0x12ede
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_http_serve_file2
static void mg_http_serve_file2(struct mg_connection *nc, const char *path,
                                struct http_message *hm,
                                struct mg_serve_http_opts *opts) {
#if MG_ENABLE_HTTP_SSI
  if (mg_match_prefix(opts->ssi_pattern, strlen(opts->ssi_pattern), path) > 0) {
    mg_handle_ssi_request(nc, hm, path, opts);
    return;
  }
#endif
  mg_http_serve_file(nc, hm, path, mg_get_mime_type(path, "text/plain", opts),
                     mg_mk_str(opts->extra_headers));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rcx), %r13
movq %r13, %rdi
callq 0x3180
movq %r13, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x456e
testl %eax, %eax
jle 0x1362c
leaq 0x3bf7(%rip), %rsi      # 0x17150
leaq 0x204a(%rip), %rdx      # 0x155aa
movl $0x4, %edi
callq 0x44b4
testl %eax, %eax
je 0x13582
leaq 0x3bf1(%rip), %rdi      # 0x17166
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x45a0
leaq 0x26c4(%rip), %rsi      # 0x15c4d
movq %r14, %rdi
callq 0x3370
testq %rax, %rax
je 0x1367d
movq %rax, %r13
movq %rax, %rdi
callq 0x33c0
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x34f0
movq %r14, %rdi
movq %r12, %rsi
callq 0x139b5
movq %rbp, 0x10(%rsp)
movq %rax, %rbp
movq %rdx, %r15
movq 0x78(%r12), %rdi
callq 0x6be8
movq %rdx, %rcx
movq %rbx, %rdi
movl $0xc8, %esi
movq %rax, %rdx
callq 0xcb88
leaq 0x3b7a(%rip), %rsi      # 0x1716c
movq %rbx, %rdi
movl %r15d, %edx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x80d3
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x13a9c
movq %r13, %rdi
callq 0x3160
orb $0x4, 0xc9(%rbx)
jmp 0x1366e
movq %r14, %rdi
movq %r12, %rsi
callq 0x139b5
movq %rax, %r15
movq %rdx, %r13
movq 0x78(%r12), %rdi
callq 0x6be8
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
callq 0xce0f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x194, %esi            # imm = 0x194
xorl %edx, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcd85
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_addenv
static char *mg_addenv(struct mg_cgi_env_block *block, const char *fmt, ...) {
  int n, space;
  char *added = block->buf + block->len;
  va_list ap;

  /* Calculate how much space is left in the buffer */
  space = sizeof(block->buf) - (block->len + 2);
  if (space > 0) {
    /* Copy VARIABLE=VALUE\0 string into the free space */
    va_start(ap, fmt);
    n = vsnprintf(added, (size_t) space, fmt, ap);
    va_end(ap);

    /* Make sure we do not overflow buffer and the envp array */
    if (n > 0 && n + 1 < space &&
        block->nvars < (int) ARRAY_SIZE(block->vars) - 2) {
      /* Append a pointer to the added string into the envp array */
      block->vars[block->nvars++] = added;
      /* Bump up used length counter. Include \0 terminator */
      block->len += n + 1;
    }
  }

  return added;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x138e9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movslq 0x2208(%rdi), %rax
leaq (%rdi,%rax), %r14
addq $0x8, %r14
movl $0x1ffe, %ebp           # imm = 0x1FFE
subl %eax, %ebp
testl %ebp, %ebp
jle 0x13969
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
movl %ebp, %esi
movq %r14, %rdi
movq %r10, %rdx
callq 0x3110
testl %eax, %eax
jle 0x13969
incl %eax
cmpl %ebp, %eax
jge 0x13969
movslq 0x220c(%rbx), %rcx
cmpq $0x3d, %rcx
jg 0x13969
leal 0x1(%rcx), %edx
movl %edx, 0x220c(%rbx)
movq %r14, 0x2008(%rbx,%rcx,8)
addl %eax, 0x2208(%rbx)
movq %r14, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_get_mime_type
static struct mg_str mg_get_mime_type(const char *path, const char *dflt,
                                      const struct mg_serve_http_opts *opts) {
  const char *ext, *overrides;
  size_t i, path_len;
  struct mg_str r, k, v;

  path_len = strlen(path);

  overrides = opts->custom_mime_types;
  while ((overrides = mg_next_comma_list_entry(overrides, &k, &v)) != NULL) {
    ext = path + (path_len - k.len);
    if (path_len > k.len && mg_vcasecmp(&k, ext) == 0) {
      return v;
    }
  }

  for (i = 0; mg_static_builtin_mime_types[i].extension != NULL; i++) {
    ext = path + (path_len - mg_static_builtin_mime_types[i].ext_len);
    if (path_len > mg_static_builtin_mime_types[i].ext_len && ext[-1] == '.' &&
        mg_casecmp(ext, mg_static_builtin_mime_types[i].extension) == 0) {
      r.p = mg_static_builtin_mime_types[i].mime_type;
      r.len = strlen(r.p);
      return r;
    }
  }

  r.p = dflt;
  r.len = strlen(r.p);
  return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3180
movq %rax, %r14
movq 0x70(%r15), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
callq 0x77ad
testq %rax, %rax
je 0x13a20
movq %rax, %r15
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq %r14, %rsi
subq 0x18(%rsp), %rsi
jbe 0x13a0a
addq %rbx, %rsi
movq %r12, %rdi
callq 0x6c4a
testl %eax, %eax
je 0x13a70
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x77ad
movq %rax, %r15
testq %rax, %rax
jne 0x139f1
leaq 0x3833(%rip), %rsi      # 0x1725a
movl $0x18, %r12d
leaq 0x9f0c(%rip), %r13      # 0x1d940
leaq 0x370a(%rip), %r15      # 0x17145
movq %r14, %rax
subq -0x10(%r12,%r13), %rax
jbe 0x13a58
leaq (%rbx,%rax), %rdi
cmpb $0x2e, -0x1(%rdi)
jne 0x13a58
callq 0x761b
testl %eax, %eax
je 0x13a7b
movq (%r12,%r13), %rsi
addq $0x18, %r12
cmpq $0x498, %r12            # imm = 0x498
jne 0x13a3b
movl $0xa, %edx
jmp 0x13a8b
movq (%rsp), %r15
movq 0x8(%rsp), %rdx
jmp 0x13a8b
movq -0x8(%r12,%r13), %r15
movq %r15, %rdi
callq 0x3180
movq %rax, %rdx
movq %r15, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_send_file_data
static void mg_send_file_data(struct mg_connection *nc, FILE *fp) {
  char buf[BUFSIZ];
  size_t n;
  while ((n = mg_fread(buf, 1, sizeof(buf), fp)) > 0) {
    mg_send(nc, buf, n);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rcx
callq 0x3100
testq %rax, %rax
je 0x13f6d
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x808e
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %rbx, %rcx
callq 0x3100
testq %rax, %rax
jne 0x13f46
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/config.c
// Function: addMotion
bool addMotion(umConfig *config, char *name, char *action) {

  if (config->numMotions > MAX_CAMERAS*2)
    return false;

  config->motions[config->numMotions] = (umotion *)malloc(sizeof(umotion));

  strncpy(config->motions[config->numMotions]->name, name, LABEL_LEN);
  strncpy(config->motions[config->numMotions]->action, action, JSON_MQTT_MSG_SIZE);

  if (strlen(name) >= LABEL_LEN-1) {
    config->motions[config->numMotions]->name[LABEL_LEN-1] = 0;
    fprintf(stderr, "ERROR motion label '%s' is too long for buffer, truncated to '%s'\n", name, config->motions[config->numMotions]->name);
  }

  if (strlen(action) >= JSON_MQTT_MSG_SIZE-1) {
    config->motions[config->numMotions]->action[JSON_MQTT_MSG_SIZE-1] = 0;
    fprintf(stderr, "ERROR motion action '%s' is too long for buffer, truncated to '%s'\n", action, config->motions[config->numMotions]->action);
  }
  config->numMotions++;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x1d8(%rdi), %r13
cmpq $0x28, %r13
jg 0x1433c
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x8c, %edi
callq 0x33e0
movq %rax, %r12
movq %rax, 0x98(%r14,%r13,8)
movl $0x28, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x30b0
leaq 0x28(%r12), %rdi
movl $0x64, %edx
movq %rbx, %rsi
callq 0x30b0
movq %r15, %rdi
callq 0x3180
cmpq $0x27, %rax
jae 0x1434d
leaq 0x1d8(%r14), %r15
movq %rbx, %rdi
callq 0x3180
cmpq $0x63, %rax
jae 0x14373
incl (%r15)
cmpl $0x29, %r13d
setl %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x0, 0x27(%r12)
movq 0x9c96(%rip), %rax      # 0x1dff0
movq (%rax), %rdi
leaq 0x365b(%rip), %rsi      # 0x179bf
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3340
jmp 0x14324
addq $0x98, %r14
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3a2d
jmp 0x14339
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/config.c
// Function: cleanwhitespace
char *cleanwhitespace(char *str)
{
  char *end;
  // Trim leading space
  while(isspace(*str)) str++;

  if(*str == 0)  // All spaces?
    return str;

  // Trim trailing space
  end = str + strlen(str) - 1;
  while(end > str && isspace(*end)) end--;

  // Write new null terminator
  *(end+1) = 0;

  return str;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3660
movq (%rax), %r14
decq %rbx
movsbq 0x1(%rbx), %rax
incq %rbx
testb $0x20, 0x1(%r14,%rax,2)
jne 0x1439c
testb %al, %al
je 0x143db
movq %rbx, %rdi
callq 0x3180
leaq (%rbx,%rax), %rcx
decq %rcx
movq %rcx, %rax
cmpq %rbx, %rcx
jbe 0x143d7
movsbq (%rax), %rdx
leaq -0x1(%rax), %rcx
testb $0x20, 0x1(%r14,%rdx,2)
jne 0x143bf
movb $0x0, 0x1(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sfeakes[P]unifi-motion/config.c
// Function: free_config
void free_config(umConfig *config)
{
  int i;

  for (i=0; i<config->numMotions; i++){
    free(config->motions[i]);
  }

  free(config->mqtt_address);
  free(config->mqtt_user);
  free(config->mqtt_passwd);
  free(config->mqtt_pub_topic);
  free(config->log_file_to_monitor);
  free(config->regexString);
  free(config->watchDir);
  free(config->watchFile);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x1d8(%rdi)
jle 0x146c2
xorl %r14d, %r14d
movq 0x98(%rbx,%r14,8), %rdi
callq 0x3060
incq %r14
movslq 0x1d8(%rbx), %rax
cmpq %rax, %r14
jl 0x146a6
movq (%rbx), %rdi
callq 0x3060
movq 0x8(%rbx), %rdi
callq 0x3060
movq 0x10(%rbx), %rdi
callq 0x3060
movq 0x18(%rbx), %rdi
callq 0x3060
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x28(%rbx), %rdi
callq 0x3060
movq 0x48(%rbx), %rdi
callq 0x3060
movq 0x50(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O1/erik[P]gamut/rotate.c
// Function: sampleat
pixel_t sampleat(pixel_t *image, int x, int y, int width, int height)
{
    // clamp to edges
    int clamp = 1;
    if (x < 0) x = 0, clamp = 0;
    else if (x >= width) x = width - 1, clamp = 0;
    if (y < 0) y = 0, clamp = 0;
    else if (y >= height) y = height - 1, clamp = 0;

    pixel_t pixel = PIXEL(image, x, y);
    pixel.a *= clamp;
    return pixel;
}

// Assembly:
leal -0x1(%rcx), %eax
cmpl %ecx, %esi
cmovll %esi, %eax
xorl %r9d, %r9d
testl %esi, %esi
cmovsl %r9d, %eax
leal -0x1(%r8), %r10d
cmpl %r8d, %edx
cmovll %edx, %r10d
testl %edx, %edx
cmovsl %r9d, %r10d
imull %ecx, %r10d
addl %eax, %r10d
movslq %r10d, %rax
movzwl 0x6(%rdi,%rax,8), %r10d
shlq $0x30, %r10
cmpl %ecx, %esi
cmovgeq %r9, %r10
testl %esi, %esi
cmovsq %r9, %r10
cmpl %r8d, %edx
cmovgeq %r9, %r10
testl %edx, %edx
movl (%rdi,%rax,8), %ecx
movzwl 0x4(%rdi,%rax,8), %eax
cmovsq %r9, %r10
shlq $0x20, %rax
orq %rcx, %rax
orq %r10, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/erik[P]gamut/rotate.c
// Function: interpolate
pixel_t interpolate(pixel_t a, pixel_t b, double t)
{
    double s = 1.0 - t;
    return (pixel_t){
        a.r * s + b.r * t,
        a.g * s + b.g * t,
        a.b * s + b.b * t,
        a.a * s + b.a * t
    };
}

// Assembly:
pushq %rbx
movl %edi, %r11d
shrl $0x10, %r11d
movq %rdi, %r9
shrq $0x20, %r9
movq %rdi, %rdx
movl %esi, %ebx
movq %rsi, %r10
movq %rsi, %r8
movl $0xffff, %ecx           # imm = 0xFFFF
andl %ecx, %edi
cvtsi2sd %edi, %xmm2
movsd 0xccd(%rip), %xmm1      # 0x2008
andl %ecx, %esi
cvtsi2sd %esi, %xmm3
subsd %xmm0, %xmm1
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %eax
xorps %xmm2, %xmm2
cvtsi2sd %r11d, %xmm2
shrl $0x10, %ebx
xorps %xmm3, %xmm3
cvtsi2sd %ebx, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %esi
shrq $0x30, %rdx
andl %ecx, %r9d
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
shrq $0x20, %r10
andl %ecx, %r10d
xorps %xmm3, %xmm3
cvtsi2sd %r10d, %xmm3
shrq $0x30, %r8
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %edi
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %r8d, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %edx
shlq $0x30, %rdx
andl %ecx, %edi
shlq $0x20, %rdi
orq %rdx, %rdi
shll $0x10, %esi
orq %rdi, %rsi
andl %ecx, %eax
orq %rsi, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erik[P]gamut/rotate.c
// Function: main
int main(int argc, char** argv)
{
    if (argc != 2) {
        fprintf(stderr, "usage: %s ANGLE\n", argv[0]);
        return 1;
    }

    double angle = atof(argv[1]);

    return rotate(angle);
}

// Assembly:
pushq %rax
cmpl $0x2, %edi
jne 0x1aaa
movq 0x8(%rsi), %rdi
callq 0x1050
popq %rax
jmp 0x13e2
movq %rsi, %rdi
callq 0x1194
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/seakeyakv2/generic32lc/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    SeaKeyak_Instance instance;

    SeaKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 0, 0 );
    SeaKeyak_Wrap( &instance, m, c, (size_t)mlen, ad, (size_t)adlen, c+mlen, 0, 0 );
    *clen = mlen + 16;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %r9, (%rsp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0x200(%rsp), %rsi
movq 0x1f8(%rsp), %rcx
subq $0x8, %rsp
xorl %r15d, %r15d
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
movl $0x96, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %r15
pushq $0x0
callq 0x53a0
addq $0x20, %rsp
leaq (%rbx,%rbp), %rax
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x8(%rsp), %r9
pushq %r15
pushq %r15
pushq %rax
callq 0x5640
addq $0x20, %rsp
addq $0x10, %rbx
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/seakeyakv2/generic32lc/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    SeaKeyak_Instance instance;
    unsigned long long mlen_;

    if (clen < 16)
        return -1;
    SeaKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 1, 0 );
    mlen_ = clen - 16;
    *mlen = mlen_;
    if ( SeaKeyak_Wrap( &instance, c, m, (size_t)mlen_, ad, (size_t)adlen, (unsigned char*)c+mlen_, 1, 0 ) == 1 )
        return 0;
    return -1;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x10, %r8
jb 0x1196d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0x1f0(%rsp), %rsi
movq 0x1e8(%rsp), %rcx
subq $0x8, %rsp
xorl %r10d, %r10d
movl $0x1, %eax
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movl $0x10, %edx
movl $0x96, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x53a0
addq $0x20, %rsp
leaq -0x10(%r12), %rcx
movq %rcx, (%r13)
leaq (%r14,%r12), %rax
addq $-0x10, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movq 0x1e8(%rsp), %r9
xorl %r10d, %r10d
pushq %r10
movl $0x1, %ebx
pushq %rbx
pushq %rax
callq 0x5640
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
cmpl %ebx, %ecx
setne %al
negl %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/main.c
// Function: main
int main(int argc, char **argv)
{
    int returnValue = 0;
    char buffer[256];
    ficlVm *vm;
	ficlSystem *system;

    system = ficlSystemCreate(NULL);
    ficlSystemCompileExtras(system);
    vm = ficlSystemCreateVm(system);

    returnValue = ficlVmEvaluate(vm, ".ver .( " __DATE__ " ) cr quit");

    /*
    ** load files specified on command-line
    */
    if (argc  > 1)
    {
        sprintf(buffer, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]);
        returnValue = ficlVmEvaluate(vm, buffer);
    }

    while (returnValue != FICL_VM_STATUS_USER_EXIT)
    {
        fputs(FICL_PROMPT, stdout);
        if (fgets(buffer, sizeof(buffer), stdin) == NULL) break;
        returnValue = ficlVmEvaluate(vm, buffer);
    }

    ficlSystemDestroy(system);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r15
movl %edi, %ebp
xorl %edi, %edi
callq 0x3528
movq %rax, %rbx
movq %rax, %rdi
callq 0xbb90
movq %rbx, %rdi
callq 0x390b
movq %rax, %r14
leaq 0xab7e(%rip), %rsi      # 0xe004
movq %rax, %rdi
callq 0x6cd1
cmpl $0x2, %ebp
jl 0x34b9
movq 0x8(%r15), %rcx
leaq 0xab84(%rip), %rsi      # 0xe022
movq %rsp, %r15
movq %r15, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x32f0
movq %r14, %rdi
movq %r15, %rsi
callq 0x6cd1
cmpl $0xfffffefd, %eax       # imm = 0xFFFFFEFD
je 0x350c
movq 0x11b11(%rip), %r13     # 0x14fd8
leaq 0xab73(%rip), %r15      # 0xe041
movq 0x11b0b(%rip), %rbp     # 0x14fe0
movq %rsp, %r12
movq (%r13), %rsi
movq %r15, %rdi
callq 0x3120
movq (%rbp), %rdx
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x3170
testq %rax, %rax
je 0x350c
movq %r14, %rdi
movq %r12, %rsi
callq 0x6cd1
cmpl $0xfffffefd, %eax       # imm = 0xFFFFFEFD
jne 0x34d8
movq %rbx, %rdi
callq 0x3987
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/system.c
// Function: ficlSystemAddPrimitiveParseStep
void ficlSystemAddPrimitiveParseStep(ficlSystem *system, char *name, ficlParseStep pStep)
{
    ficlDictionary *dictionary = system->dictionary;
    ficlWord *word = ficlDictionaryAppendPrimitive(dictionary, name, ficlPrimitiveParseStepParen, FICL_WORD_DEFAULT);
    ficlDictionaryAppendCell(dictionary, FICL_LVALUE_TO_CELL(pStep));
    ficlSystemAddParseStep(system, word);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq 0x38(%rdi), %r12
leaq 0x386e(%rip), %rdx      # 0x713c
xorl %r13d, %r13d
movq %r12, %rdi
xorl %ecx, %ecx
callq 0xc4cf
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0xc079
cmpq $0x0, 0x60(%rbx,%r13,8)
je 0x38fc
incq %r13
cmpq $0x8, %r13
jne 0x38e9
jmp 0x3901
movq %r14, 0x60(%rbx,%r13,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/system.c
// Function: ficlSystemCreateVm
ficlVm *ficlSystemCreateVm(ficlSystem *system)
{
    ficlVm *vm = ficlVmCreate(NULL, system->stackSize, system->stackSize);
    vm->link = system->vmList;

	memcpy(&(vm->callback), &(system->callback), sizeof(system->callback));
	vm->callback.vm = vm;
	vm->callback.system = system;

    system->vmList = vm;
    return vm;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xb0(%rdi), %edx
xorl %edi, %edi
movl %edx, %esi
callq 0x5290
movq 0x30(%rbx), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rbx), %rcx
movq %rcx, 0x20(%rax)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, 0x20(%rax)
movq %rbx, 0x18(%rax)
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/float.c
// Function: ficlPrimitiveFLiteralImmediate
static void ficlPrimitiveFLiteralImmediate(ficlVm *vm)
{
    ficlDictionary *dictionary = ficlVmGetDictionary(vm);
	ficlCell cell;


    FICL_STACK_CHECK(vm->floatStack, 1, 0);


	cell = ficlStackPop(vm->floatStack);
	if (cell.f == 1.0f)
	{
		ficlDictionaryAppendUnsigned(dictionary, ficlInstructionF1);
	}
	else if (cell.f == 0.0f)
	{
		ficlDictionaryAppendUnsigned(dictionary, ficlInstructionF0);
	}
	else if (cell.f == -1.0f)
	{
		ficlDictionaryAppendUnsigned(dictionary, ficlInstructionFNeg1);
	}
	else
	{
		ficlDictionaryAppendUnsigned(dictionary, ficlInstructionFLiteralParen);
		ficlDictionaryAppendCell(dictionary, cell);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x699a
movq %rax, %rbx
movq 0x70(%r14), %rdi
callq 0x42e1
movq %rax, %r14
movd %r14d, %xmm0
ucomiss 0xa447(%rip), %xmm0     # 0xe1e8
jne 0x3dac
jp 0x3dac
movl $0x23, %esi
jmp 0x3dcd
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3dbd
jp 0x3dbd
movl $0x22, %esi
jmp 0x3dcd
ucomiss 0xa428(%rip), %xmm0     # 0xe1ec
jne 0x3ddc
jp 0x3ddc
movl $0x24, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc094
movl $0x88, %esi
movq %rbx, %rdi
callq 0xc094
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc079
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/float.c
// Function: ficlPrimitiveFConstant
static void ficlPrimitiveFConstant(ficlVm *vm)
{
    ficlDictionary *dictionary = ficlVmGetDictionary(vm);
    ficlString name = ficlVmGetWord(vm);

    FICL_STACK_CHECK(vm->floatStack, 1, 0);

    ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)ficlInstructionFConstantParen, FICL_WORD_DEFAULT);
    ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x699a
movq %rax, %r14
movq %rbx, %rdi
callq 0x6a72
movl $0x89, %ecx
movq %r14, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0xc134
movq 0x70(%rbx), %rdi
callq 0x42e1
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc079
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/float.c
// Function: ficlPrimitiveF2Constant
static void ficlPrimitiveF2Constant(ficlVm *vm)
{
    ficlDictionary *dictionary = ficlVmGetDictionary(vm);
    ficlString name = ficlVmGetWord(vm);

    FICL_STACK_CHECK(vm->floatStack, 2, 0);

    ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)ficlInstructionF2ConstantParen, FICL_WORD_DEFAULT);
    ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
    ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x699a
movq %rax, %rbx
movq %r14, %rdi
callq 0x6a72
movl $0x8a, %ecx
movq %rbx, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0xc134
movq 0x70(%r14), %rdi
callq 0x42e1
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc079
movq 0x70(%r14), %rdi
callq 0x42e1
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc079
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/prefix.c
// Function: ficlVmParsePrefix
int ficlVmParsePrefix(ficlVm *vm, ficlString s)
{
    int i;
    ficlHash *hash;
    ficlWord *word = ficlSystemLookup(vm->callback.system, list_name);

    /* 
    ** Make sure we found the prefix dictionary - otherwise silently fail
    ** If forth-wordlist is not in the search order, we won't find the prefixes.
    */
    if (!word)
        return 0; /* false */

    hash = (ficlHash *)(word->param[0].p);
    /*
    ** Walk the list looking for a match with the beginning of the incoming token
    */
    for (i = 0; i < (int)hash->size; i++)
    {
        word = hash->table[i];
        while (word != NULL)
        {
            int n;
            n = word->length;
            /*
            ** If we find a match, adjust the TIB to give back the non-prefix characters
            ** and execute the prefix word.
            */
            if (!ficlStrincmp(FICL_STRING_GET_POINTER(s), word->name, (ficlUnsigned)n))
            {
                /* (sadler) fixed off-by-one error when the token has no trailing space in the TIB */
                ficlVmSetTibIndex(vm, s.text + n - vm->tib.text);
                ficlVmExecuteWord(vm, word);

                return 1; /* true */
            }
            word = word->link;
        }
    }

    return 0; /* false */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x11138(%rip), %rsi     # 0x151c0
callq 0x3a0f
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x410c
movq 0x28(%rcx), %rdx
cmpl $0x0, 0x10(%rdx)
jle 0x410c
xorl %r13d, %r13d
movq %rdx, (%rsp)
movq 0x18(%rdx,%r13,8), %r15
testq %r15, %r15
je 0x40f3
movzbl 0xb(%r15), %r12d
movq 0x10(%r15), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xb733
movl %eax, %ebp
testl %eax, %eax
je 0x40d1
movq (%r15), %r15
jmp 0x40ed
addq %rbx, %r12
subq 0x90(%r14), %r12
movq %r12, 0x80(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x53b5
testl %ebp, %ebp
jne 0x40ad
jmp 0x4107
incq %r13
movq (%rsp), %rdx
movslq 0x10(%rdx), %rcx
xorl %eax, %eax
cmpq %rcx, %r13
jl 0x40a8
jmp 0x410c
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/prefix.c
// Function: ficlPrimitiveTempBase
static void ficlPrimitiveTempBase(ficlVm *vm)
{
    int oldbase = vm->base;
    ficlString number = ficlVmGetWord0(vm);
    int base = ficlStackPopInteger(vm->dataStack);

    vm->base = base;
    if (!ficlVmParseNumber(vm, number)) 
        ficlVmThrowError(vm, "%.*s not recognized", FICL_STRING_GET_LENGTH(number), FICL_STRING_GET_POINTER(number));

    vm->base = oldbase;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %r12
callq 0x6a95
movq %rax, %r14
movq %rdx, %r15
movq 0x60(%rbx), %rdi
callq 0x4311
cltq
movq %rax, 0x58(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6f6c
testl %eax, %eax
jne 0x41ae
leaq 0xa113(%rip), %rsi      # 0xe2b1
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x6879
movslq %r12d, %rax
movq %rax, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/softcore.c
// Function: ficlSystemCompileSoftCore
void ficlSystemCompileSoftCore(ficlSystem *system)
{
    ficlVm *vm = system->vmList;
    int returnValue;
    ficlCell oldSourceID = vm->sourceId;
    ficlString s;
#if FICL_WANT_LZ_SOFTCORE
    char *ficlSoftcoreUncompressed = NULL;
    size_t gotUncompressedSize = 0;
    returnValue = ficlLzUncompress(ficlSoftcoreCompressed, (unsigned char **)&ficlSoftcoreUncompressed, &gotUncompressedSize);
    FICL_VM_ASSERT(vm, returnValue == 0);
    FICL_VM_ASSERT(vm, gotUncompressedSize == ficlSoftcoreUncompressedSize);
#endif /* FICL_WANT_LZ_SOFTCORE */
    vm->sourceId.i = -1;
    FICL_STRING_SET_POINTER(s, (char *)(ficlSoftcoreUncompressed));
    FICL_STRING_SET_LENGTH(s, ficlSoftcoreUncompressedSize);
    returnValue = ficlVmExecuteString(vm, s);
    vm->sourceId = oldSourceID;
#if FICL_WANT_LZ_SOFTCORE
    free(ficlSoftcoreUncompressed);
#endif /* FICL_WANT_LZ_SOFTCORE */
    FICL_VM_ASSERT(vm, returnValue != FICL_VM_STATUS_ERROR_EXIT);
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x30(%rdi), %rbx
movq 0x78(%rbx), %r15
xorl %eax, %eax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x10fe4(%rip), %rdi     # 0x151d0
movq %r14, %rsi
callq 0xb243
movq $-0x1, 0x78(%rbx)
movq (%r14), %rdx
movl $0x6457, %esi           # imm = 0x6457
movq %rbx, %rdi
callq 0x6d08
movq %r15, 0x78(%rbx)
movq (%r14), %rdi
callq 0x3030
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/stack.c
// Function: ficlStackCreate
ficlStack *ficlStackCreate(ficlVm *vm, char *name, unsigned size)
{
    size_t totalSize = sizeof (ficlStack) + (size * sizeof (ficlCell));
    ficlStack *stack = ficlMalloc(totalSize);

    FICL_VM_ASSERT(vm, size != 0);
    FICL_VM_ASSERT(vm, stack != NULL);

    stack->size = size;
    stack->frame = NULL;

	stack->vm = vm;
	stack->name = name;

	ficlStackReset(stack);
    return stack;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
leaq 0x30(,%r15,8), %rdi
callq 0xb40f
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
movq %r14, 0x18(%rax)
leaq 0x20(%rax), %rcx
movq %rbx, 0x20(%rax)
movq %rcx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hoobaa[P]ficl/stack.c
// Function: ficlStackWalk
void ficlStackWalk(ficlStack *stack, ficlStackWalkFunction callback, void *context, ficlInteger bottomToTop)
{
    int i;
    int depth;
	ficlCell *cell;
    FICL_STACK_CHECK(stack, 0, 0);

	depth = ficlStackDepth(stack);
	cell = bottomToTop ? stack->base : stack->top;
    for (i = 0; i < depth; i++)
    {
        if (callback(context, cell) == FICL_FALSE)
			break;
        cell += bottomToTop ? 1 : -1;
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x10(%rdi), %rax
addq $0x28, %r15
movq %rax, %r12
subq %r15, %r12
shrq $0x3, %r12
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
ja 0x44af
movq %rdx, %rbx
movq %rsi, %r14
incl %r12d
xorl %r13d, %r13d
testq %rcx, %rcx
cmoveq %rax, %r15
setne %r13b
shll $0x4, %r13d
addq $-0x8, %r13
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq *%r14
testq %rax, %rax
je 0x44af
addq %r13, %r15
leal 0x1(%rbp), %eax
cmpl %r12d, %ebp
movl %eax, %ebp
jl 0x4494
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop