LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: iter2
static void iter2(struct ns_connection *nc, int ev, void *param) {
  mg_handler_t func = NULL;
  struct connection *conn = (struct connection *) nc->user_data;
  const char *msg = (const char *) param;
  int n;
  (void) ev;

  //DBG(("%p [%s]", conn, msg));
  if (sscanf(msg, "%p %n", &func, &n) && func != NULL && conn != NULL) {
    conn->mg_conn.callback_param = (void *) (msg + n);
    func(&conn->mg_conn, MG_POLL);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x125bc(%rip), %rsi     # 0xc8349
leaq -0x20(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd130
cmpl $0x0, %eax
je 0xb5dd8
cmpq $0x0, -0x20(%rbp)
je 0xb5dd8
cmpq $0x0, -0x28(%rbp)
je 0xb5dd8
movq -0x30(%rbp), %rcx
movslq -0x34(%rbp), %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x2a0(%rax)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movl $0x64, %esi
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: mg_create_server
struct mg_server *mg_create_server(void *server_data, mg_handler_t handler) {
  struct mg_server *server = (struct mg_server *) NS_CALLOC(1, sizeof(*server));
  ns_mgr_init(&server->ns_mgr, server_data);
  set_default_option_values(server->config_options);
  server->event_handler = handler;
  return server;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0xd0, %esi
callq 0xdaf0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xb0ad0
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
callq 0xb5ef0
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: set_default_option_values
static void set_default_option_values(char **opts) {
  const char *value, **all_opts = mg_get_valid_option_names();
  int i;

  for (i = 0; all_opts[i * 2] != NULL; i++) {
    value = all_opts[i * 2 + 1];
    if (opts[i] == NULL && value != NULL) {
      opts[i] = mg_strdup(value);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0xb55b0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xb5f71
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0xb5f64
cmpq $0x0, -0x10(%rbp)
je 0xb5f64
movq -0x10(%rbp), %rdi
callq 0xb5a80
movq %rax, %rdx
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0xb5f66
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb5f0c
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: ns_destroy_conn
static void ns_destroy_conn(struct ns_connection *conn) {
  closesocket(conn->sock);
  iobuf_free(&conn->recv_iobuf);
  iobuf_free(&conn->send_iobuf);
#ifdef NS_ENABLE_SSL
  if (conn->ssl != NULL) {
    SSL_free(conn->ssl);
  }
  if (conn->ssl_ctx != NULL) {
    SSL_CTX_free(conn->ssl_ctx);
  }
#endif
  NS_FREE(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edi
callq 0xd350
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0xaec10
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0xaec10
movq -0x8(%rbp), %rdi
callq 0xd2c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: byteReverse
static void byteReverse(unsigned char *buf, unsigned longs) {
  uint32_t t;

  // Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN
  if (is_big_endian()) {
    do {
      t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
        ((unsigned) buf[1] << 8 | buf[0]);
      * (uint32_t *) buf = t;
      buf += 4;
    } while (--longs);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq 0xb7250
cmpl $0x0, %eax
je 0xb6341
jmp 0xb62eb
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
orl %ecx, %eax
shll $0x10, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
movq -0x8(%rbp), %rdx
movzbl (%rdx), %edx
orl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0xb62eb
jmp 0xb6341
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: mg_vsnprintf
static int mg_vsnprintf(char *buf, size_t buflen, const char *fmt, va_list ap) {
  int n;
  if (buflen < 1) return 0;
  n = vsnprintf(buf, buflen, fmt, ap);
  if (n < 0) {
    n = 0;
  } else if (n >= (int) buflen) {
    n = (int) buflen - 1;
  }
  buf[n] = '\0';
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x1, -0x18(%rbp)
jae 0xb7298
movl $0x0, -0x4(%rbp)
jmp 0xb72e8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xdf48
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0xb72bf
movl $0x0, -0x2c(%rbp)
jmp 0xb72d6
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl %ecx, %eax
jl 0xb72d4
movq -0x18(%rbp), %rax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb72d6
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: start_process
static process_id_t start_process(const char *interp, const char *cmd,
                                  const char *env, const char *envp[],
                                  const char *dir, sock_t sock) {
  char buf[500];
  process_id_t pid = fork();
  (void) env;

  if (pid == 0) {
    (void) chdir(dir);
    (void) dup2(sock, 0);
    (void) dup2(sock, 1);
    closesocket(sock);

    // After exec, all signal handlers are restored to their default values,
    // with one exception of SIGCHLD. According to POSIX.1-2001 and Linux's
    // implementation, SIGCHLD's handler will leave unchanged after exec
    // if it was set to be ignored. Restore it to default action.
    signal(SIGCHLD, SIG_DFL);

    if (interp == NULL) {
      execle(cmd, cmd, (char *) 0, envp); // Using (char *) 0 to avoid warning
    } else {
      execle(interp, interp, cmd, (char *) 0, envp);
    }
    snprintf(buf, sizeof(buf), "Status: 500\r\n\r\n"
             "500 Server Error: %s%s%s: %s", interp == NULL ? "" : interp,
             interp == NULL ? "" : " ", cmd, strerror(errno));
    send(1, buf, strlen(buf), 0);
    exit(EXIT_FAILURE);  // exec call failed
  }

  return pid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
callq 0xdc80
movl %eax, -0x224(%rbp)
cmpl $0x0, -0x224(%rbp)
jne 0xb81cf
movq -0x28(%rbp), %rdi
callq 0xdeb0
movl -0x2c(%rbp), %edi
xorl %esi, %esi
callq 0xd790
movl -0x2c(%rbp), %edi
movl $0x1, %esi
callq 0xd790
movl -0x2c(%rbp), %edi
callq 0xd350
movl $0x11, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0xd4b0
cmpq $0x0, -0x8(%rbp)
jne 0xb80d1
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xdb90
jmp 0xb80ec
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xdb90
leaq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xb8111
leaq 0xda43(%rip), %rax      # 0xc5b4b
movq %rax, -0x238(%rbp)
jmp 0xb811c
movq -0x8(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x8(%rbp), %rdx
leaq 0xdec5(%rip), %rax      # 0xc5ffa
leaq 0xda0f(%rip), %rcx      # 0xc5b4b
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x250(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x248(%rbp)
callq 0xdcc0
movl (%rax), %edi
callq 0xda00
movq -0x230(%rbp), %rdi
movq -0x258(%rbp), %rcx
movq -0x250(%rbp), %r8
movq -0x248(%rbp), %r9
movl $0x1f4, %esi            # imm = 0x1F4
leaq 0xf892(%rip), %rdx      # 0xc7a1c
movq %rax, (%rsp)
movb $0x0, %al
callq 0xd6e0
leaq -0x220(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd550
movq -0x240(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
xorl %ecx, %ecx
callq 0xd4a0
movl $0x1, %edi
callq 0xd8f0
movl -0x224(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: addenv
static char *addenv(struct cgi_env_block *block, const char *fmt, ...) {
  int n, space;
  char *added;
  va_list ap;

  // Calculate how much space is left in the buffer
  space = sizeof(block->buf) - block->len - 2;
  assert(space >= 0);

  // Make a pointer to the free space int the buffer
  added = block->buf + block->len;

  // Copy VARIABLE=VALUE\0 string into the free space
  va_start(ap, fmt);
  n = mg_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
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0xb821b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq 0x2208(%rax), %rcx
movl $0x2000, %eax           # imm = 0x2000
subq %rcx, %rax
subq $0x2, %rax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0xb8261
jmp 0xb8280
leaq 0xf771(%rip), %rdi      # 0xc79d9
leaq 0xe8ec(%rip), %rsi      # 0xc6b5b
movl $0x88a, %edx            # imm = 0x88A
leaq 0xf769(%rip), %rcx      # 0xc79e4
callq 0xd280
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq -0x8(%rbp), %rcx
movslq 0x2208(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0xb7270
movl %eax, -0x14(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x14(%rbp)
jle 0xb8336
movl -0x14(%rbp), %eax
addl $0x1, %eax
cmpl -0x18(%rbp), %eax
jge 0xb8336
movq -0x8(%rbp), %rax
cmpl $0x3e, 0x220c(%rax)
jge 0xb8336
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rsi
movl 0x220c(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x220c(%rsi)
movslq %ecx, %rcx
movq %rdx, 0x2008(%rax,%rcx,8)
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
addl 0x2208(%rax), %ecx
movl %ecx, 0x2208(%rax)
movq -0x20(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: get_mime_type
static void get_mime_type(const struct mg_server *server, const char *path,
                          struct vec *vec) {
  struct vec ext_vec, mime_vec;
  const char *list, *ext;
  size_t path_len;

  path_len = strlen(path);

  // Scan user-defined mime types first, in case user wants to
  // override default mime types.
  list = server->config_options[EXTRA_MIME_TYPES];
  while ((list = next_option(list, &ext_vec, &mime_vec)) != NULL) {
    // ext now points to the path suffix
    ext = path + path_len - ext_vec.len;
    if (mg_strncasecmp(ext, ext_vec.ptr, ext_vec.len) == 0) {
      *vec = mime_vec;
      return;
    }
  }

  vec->ptr = mg_get_mime_type(path, "text/plain");
  vec->len = strlen(vec->ptr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd550
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0xb5ad0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0xb842d
movq -0x10(%rbp), %rax
addq -0x50(%rbp), %rax
xorl %ecx, %ecx
subq -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb2e40
cmpl $0x0, %eax
jne 0xb842b
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb845e
jmp 0xb83d0
movq -0x10(%rbp), %rdi
leaq 0x74c5(%rip), %rsi      # 0xbf8fd
callq 0xb20b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xd550
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: do_ssi_exec
static void do_ssi_exec(struct mg_connection *conn, char *tag) {
  char cmd[IOBUF_SIZE];
  FILE *fp;

  if (sscanf(tag, " \"%[^\"]\"", cmd) != 1) {
    mg_printf(conn, "Bad SSI #exec: [%s]", tag);
  } else if ((fp = popen(cmd, "r")) == NULL) {
    mg_printf(conn, "Cannot SSI #exec: [%s]: %s", cmd, strerror(errno));
  } else {
    send_file_data(conn, fp);
    pclose(fp);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2030, %rsp           # imm = 0x2030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x2010(%rbp), %rdx
leaq 0xf092(%rip), %rsi      # 0xc7b77
movb $0x0, %al
callq 0xd130
cmpl $0x1, %eax
je 0xb8b0c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xf0c5(%rip), %rsi      # 0xc7bc5
movb $0x0, %al
callq 0xb0cb0
jmp 0xb8b90
leaq -0x2010(%rbp), %rdi
leaq 0xf13b(%rip), %rsi      # 0xc7c55
callq 0xda90
movq %rax, -0x2018(%rbp)
cmpq $0x0, %rax
jne 0xb8b72
movq -0x8(%rbp), %rax
movq %rax, -0x2028(%rbp)
leaq -0x2010(%rbp), %rax
movq %rax, -0x2020(%rbp)
callq 0xdcc0
movl (%rax), %edi
callq 0xda00
movq -0x2028(%rbp), %rdi
movq -0x2020(%rbp), %rdx
movq %rax, %rcx
leaq 0xf070(%rip), %rsi      # 0xc7bd9
movb $0x0, %al
callq 0xb0cb0
jmp 0xb8b8e
movq -0x8(%rbp), %rdi
movq -0x2018(%rbp), %rsi
callq 0xb8ba0
movq -0x2018(%rbp), %rdi
callq 0xd0e0
jmp 0xb8b90
addq $0x2030, %rsp           # imm = 0x2030
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: send_file_data
static void send_file_data(struct mg_connection *conn, FILE *fp) {
  char buf[IOBUF_SIZE];
  size_t n;
  while ((n = fread(buf, 1, sizeof(buf), fp)) > 0) {
    mg_write(conn, buf, n);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x2010(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0xd720
movq %rax, -0x2018(%rbp)
cmpq $0x0, %rax
jbe 0xb8bf3
movq -0x8(%rbp), %rdi
leaq -0x2010(%rbp), %rsi
movq -0x2018(%rbp), %rdx
callq 0xb1580
jmp 0xb8bb3
addq $0x2020, %rsp           # imm = 0x2020
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: get_month_index
static int get_month_index(const char *s) {
  static const char *month_names[] = {
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
  };
  int i;

  for (i = 0; i < (int) ARRAY_SIZE(month_names); i++)
    if (!strcmp(s, month_names[i]))
      return i;

  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0xc, -0x14(%rbp)
jge 0xb8e2b
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x36008(%rip), %rax     # 0xeee10
movq (%rax,%rcx,8), %rsi
callq 0xdab0
cmpl $0x0, %eax
jne 0xb8e1e
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb8e32
jmp 0xb8e20
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xb8df3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: should_keep_alive
static int should_keep_alive(const struct mg_connection *conn) {
  struct connection *c = MG_CONN_2_CONN(conn);
  const char *method = conn->request_method;
  const char *http_version = conn->http_version;
  const char *header = mg_get_header(conn, "Connection");
  return method != NULL &&
    (!strcmp(method, "GET") || c->endpoint_type == EP_USER) &&
    ((header != NULL && !mg_strcasecmp(header, "keep-alive")) ||
     (header == NULL && http_version && !strcmp(http_version, "1.1")));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x9e00(%rip), %rsi      # 0xc2d8a
callq 0xb0fe0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x29(%rbp)
je 0xb902c
movq -0x18(%rbp), %rdi
leaq 0x9eb0(%rip), %rsi      # 0xc2e5e
callq 0xdab0
cmpl $0x0, %eax
je 0xb8fca
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x3, 0x2b8(%rcx)
movb %al, -0x29(%rbp)
jne 0xb902c
cmpq $0x0, -0x28(%rbp)
je 0xb8fed
movq -0x28(%rbp), %rdi
leaq 0xed5b(%rip), %rsi      # 0xc7d37
callq 0xb1070
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x2a(%rbp)
je 0xb9026
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x2b(%rbp)
jne 0xb9020
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x2b(%rbp)
je 0xb9020
movq -0x20(%rbp), %rdi
leaq 0xe7da(%rip), %rsi      # 0xc77ea
callq 0xdab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: log_header
static void log_header(const struct mg_connection *conn, const char *header,
                       FILE *fp) {
  const char *header_value;

  if ((header_value = mg_get_header(conn, header)) == NULL) {
    (void) fprintf(fp, "%s", " -");
  } else {
    (void) fprintf(fp, " \"%s\"", header_value);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb0fe0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xb95a6
movq -0x18(%rbp), %rdi
leaq 0xb29a(%rip), %rsi      # 0xc4830
leaq 0xe7e3(%rip), %rdx      # 0xc7d80
movb $0x0, %al
callq 0xd2d0
jmp 0xb95bc
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xe573(%rip), %rsi      # 0xc7b28
movb $0x0, %al
callq 0xd2d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: try_parse
static void try_parse(struct connection *conn) {
  struct iobuf *io = &conn->ns_conn->recv_iobuf;

  if (conn->request_len == 0 &&
      (conn->request_len = get_request_len(io->buf, io->len)) > 0) {
    // If request is buffered in, remove it from the iobuf. This is because
    // iobuf could be reallocated, and pointers in parsed request could
    // become invalid.
    conn->request = (char *) NS_MALLOC(conn->request_len);
    if (conn->request == NULL) {
      conn->ns_conn->flags |= NSF_CLOSE_IMMEDIATELY;
      return;
    }
    memcpy(conn->request, io->buf, conn->request_len);
    //DBG(("%p [%.*s]", conn, conn->request_len, conn->request));
    iobuf_remove(io, conn->request_len);
    conn->request_len = parse_http_message(conn->request, conn->request_len,
                                           &conn->mg_conn);
    if (conn->request_len > 0) {
      const char *cl_hdr = mg_get_header(&conn->mg_conn, "Content-Length");
      conn->cl = cl_hdr == NULL ? 0 : to64(cl_hdr);
      conn->mg_conn.content_len = (size_t) conn->cl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2e0(%rax)
jne 0xb9778
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xb53e0
cltq
movq -0x8(%rbp), %rcx
movq %rax, 0x2e0(%rcx)
cmpq $0x0, %rax
jle 0xb9778
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rdi
callq 0xdb70
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2c8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2c8(%rax)
jne 0xb969f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xa0(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0xa0(%rax)
jmp 0xb9778
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rdx
callq 0xd100
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rsi
callq 0xaedd0
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rsi
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
callq 0xb9e30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2e0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2e0(%rax)
jle 0xb9776
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq 0x9712(%rip), %rsi      # 0xc2e35
callq 0xb0fe0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xb973b
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xb9751
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xd9f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2d8(%rax)
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x278(%rax)
jmp 0xb9778
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: is_valid_uri
static int is_valid_uri(const char *uri) {
  unsigned short n;
  return uri[0] == '/' ||
    strcmp(uri, "*") == 0 ||            // OPTIONS method can use asterisk URI
    mg_strncasecmp(uri, "http", 4) == 0 || // Naive check for the absolute URI
    sscanf(uri, "%*[^ :]:%hu", &n) > 0; // CONNECT method can use host:port
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2f, %ecx
movb %al, -0xb(%rbp)
je 0xb97f9
movq -0x8(%rbp), %rdi
leaq 0xa3f1(%rip), %rsi      # 0xc3b99
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xb(%rbp)
je 0xb97f9
movq -0x8(%rbp), %rdi
leaq 0xe5e9(%rip), %rsi      # 0xc7dad
movl $0x4, %edx
callq 0xb2e40
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xb(%rbp)
je 0xb97f9
movq -0x8(%rbp), %rdi
leaq 0xe5cd(%rip), %rsi      # 0xc7db2
leaq -0xa(%rbp), %rdx
movb $0x0, %al
callq 0xd130
cmpl $0x0, %eax
setg %al
movb %al, -0xb(%rbp)
movb -0xb(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: send_websocket_handshake_if_requested
static void send_websocket_handshake_if_requested(struct mg_connection *conn) {
  const char *ver = mg_get_header(conn, "Sec-WebSocket-Version"),
        *key = mg_get_header(conn, "Sec-WebSocket-Key");
  if (ver != NULL && key != NULL) {
    conn->is_websocket = 1;
    if (call_user(MG_CONN_2_CONN(conn), MG_WS_HANDSHAKE) == MG_FALSE) {
      send_websocket_handshake(conn, key);
    }
    call_user(MG_CONN_2_CONN(conn), MG_WS_CONNECT);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe597(%rip), %rsi      # 0xc7dbe
callq 0xb0fe0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe599(%rip), %rsi      # 0xc7dd4
callq 0xb0fe0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb9896
cmpq $0x0, -0x18(%rbp)
je 0xb9896
movq -0x8(%rbp), %rax
movl $0x1, 0x278(%rax)
movq -0x8(%rbp), %rdi
addq $-0x8, %rdi
movl $0x6b, %esi
callq 0xb7300
cmpl $0x0, %eax
jne 0xb9884
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xba4f0
movq -0x8(%rbp), %rdi
addq $-0x8, %rdi
movl $0x6c, %esi
callq 0xb7300
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: send_continue_if_expected
static void send_continue_if_expected(struct connection *conn) {
  static const char expect_response[] = "HTTP/1.1 100 Continue\r\n\r\n";
  const char *expect_hdr = mg_get_header(&conn->mg_conn, "Expect");

  if (expect_hdr != NULL && !mg_strcasecmp(expect_hdr, "100-continue")) {
    ns_send(conn->ns_conn, expect_response, sizeof(expect_response) - 1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq 0xe5f3(%rip), %rsi      # 0xc7eae
callq 0xb0fe0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb98f8
movq -0x10(%rbp), %rdi
leaq 0xe5df(%rip), %rsi      # 0xc7eb5
callq 0xb1070
cmpl $0x0, %eax
jne 0xb98f8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xd172(%rip), %rsi      # 0xc6a60
movl $0x19, %edx
callq 0xafce0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: call_request_handler_if_data_is_buffered
static void call_request_handler_if_data_is_buffered(struct connection *conn) {
#ifndef MONGOOSE_NO_WEBSOCKET
  if (conn->mg_conn.is_websocket) {
    do { } while (deliver_websocket_frame(conn));
  } else
#endif
  if (conn->num_bytes_recv >= (conn->cl + conn->request_len) &&
      call_request_handler(conn) == MG_FALSE) {
    open_local_endpoint(conn, 1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x280(%rax)
je 0xb9d1e
jmp 0xb9d0b
jmp 0xb9d0d
movq -0x8(%rbp), %rdi
callq 0xbd9d0
cmpq $0x0, %rax
jne 0xb9d0b
jmp 0xb9d62
movq -0x8(%rbp), %rax
movq 0x2d0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x2d8(%rcx), %rcx
movq -0x8(%rbp), %rdx
addq 0x2e0(%rdx), %rcx
cmpq %rcx, %rax
jl 0xb9d60
movq -0x8(%rbp), %rdi
callq 0xbdc50
cmpl $0x0, %eax
jne 0xb9d60
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xb9900
jmp 0xb9d62
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: forward_put_data
static void forward_put_data(struct connection *conn) {
  struct iobuf *io = &conn->ns_conn->recv_iobuf;
  size_t k = conn->cl < (int64_t) io->len ? conn->cl : (int64_t) io->len;   // To write
  size_t n = write(conn->endpoint.fd, io->buf, k);   // Write them!
  if (n > 0) {
    iobuf_remove(io, n);
    conn->cl -= n;
  }
  if (conn->cl <= 0) {
    close_local_endpoint(conn);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0xb9db1
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xb9dbd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x2b0(%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0xdcf0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0xb9e10
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xaedd0
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x2d8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2d8(%rax)
jg 0xb9e27
movq -0x8(%rbp), %rdi
callq 0xb23e0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: skip
static char *skip(char **buf, const char *delimiters) {
  char *p, *begin_word, *end_word, *end_delimiters;

  begin_word = *buf;
  end_word = begin_word + strcspn(begin_word, delimiters);
  end_delimiters = end_word + strspn(end_word, delimiters);

  for (p = end_word; p < end_delimiters; p++) {
    *p = '\0';
  }

  *buf = end_delimiters;

  return begin_word;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd9c0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd770
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xba148
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xba129
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: is_valid_http_method
static int is_valid_http_method(const char *s) {
  return !strcmp(s, "GET") || !strcmp(s, "POST") || !strcmp(s, "HEAD") ||
    !strcmp(s, "CONNECT") || !strcmp(s, "PUT") || !strcmp(s, "DELETE") ||
    !strcmp(s, "OPTIONS") || !strcmp(s, "PROPFIND") || !strcmp(s, "MKCOL") ||
    !strcmp(s, "PATCH");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x8ce7(%rip), %rsi      # 0xc2e5e
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0x8cc1(%rip), %rsi      # 0xc2e58
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0x8b20(%rip), %rsi      # 0xc2cd7
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xcacf(%rip), %rsi      # 0xc6ca6
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0x8adc(%rip), %rsi      # 0xc2cd3
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xdb72(%rip), %rsi      # 0xc7d89
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xdb5d(%rip), %rsi      # 0xc7d90
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xdb49(%rip), %rsi      # 0xc7d98
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xdb36(%rip), %rsi      # 0xc7da1
callq 0xdab0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0xba297
movq -0x8(%rbp), %rdi
leaq 0xdb20(%rip), %rsi      # 0xc7da7
callq 0xdab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: parse_http_headers
static void parse_http_headers(char **buf, struct mg_connection *ri) {
  size_t i;

  for (i = 0; i < ARRAY_SIZE(ri->http_headers); i++) {
    ri->http_headers[i].name = skip(buf, ": ");
    ri->http_headers[i].value = skip(buf, "\r\n");
    if (ri->http_headers[i].name[0] == '\0')
      break;
    ri->num_headers = i + 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x1e, -0x18(%rbp)
jae 0xba371
movq -0x8(%rbp), %rdi
leaq 0x8365(%rip), %rsi      # 0xc2643
callq 0xba0c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq $0x88, %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
leaq 0xc968(%rip), %rsi      # 0xc6c71
callq 0xba0c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq $0x88, %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x88, %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xba34c
jmp 0xba371
movq -0x18(%rbp), %rax
addq $0x1, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x84(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xba2c8
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: remove_double_dots_and_double_slashes
static void remove_double_dots_and_double_slashes(char *s) {
  char *p = s;

  while (*s != '\0') {
    *p++ = *s++;
    if (s[-1] == '/' || s[-1] == '\\') {
      // Skip all following slashes, backslashes and double-dots
      while (s[0] != '\0') {
        if (s[0] == '/' || s[0] == '\\') { s++; }
        else if (s[0] == '.' && (s[1] == '/' || s[1] == '\\')) { s += 2; }
        else if (s[0] == '.' && s[1] == '.' && s[2] == '\0') { s += 2; }
        else if (s[0] == '.' && s[1] == '.' && (s[2] == '/' || s[2] == '\\')) { s += 3; }
        else { break; }
      }
    }
  }
  *p = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xba4d8
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0xba3e0
movq -0x8(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x5c, %eax
jne 0xba4d3
jmp 0xba3e2
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xba4d1
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0xba40a
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0xba41b
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xba4cc
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xba44f
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
je 0xba441
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x5c, %eax
jne 0xba44f
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0xba4ca
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xba483
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0xba483
movq -0x8(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0xba483
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0xba4c8
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xba4c4
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0xba4c4
movq -0x8(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2f, %eax
je 0xba4b6
movq -0x8(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5c, %eax
jne 0xba4c4
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0xba4c6
jmp 0xba4d1
jmp 0xba4c8
jmp 0xba4ca
jmp 0xba4cc
jmp 0xba3e2
jmp 0xba4d3
jmp 0xba390
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: send_websocket_handshake
static void send_websocket_handshake(struct mg_connection *conn,
                                     const char *key) {
  static const char *magic = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
  char buf[500], sha[20], b64_sha[sizeof(sha) * 2];
  SHA1_CTX sha_ctx;

  mg_snprintf(buf, sizeof(buf), "%s%s", key, magic);
  SHA1Init(&sha_ctx);
  SHA1Update(&sha_ctx, (unsigned char *) buf, strlen(buf));
  SHA1Final((unsigned char *) sha, &sha_ctx);
  base64_encode((unsigned char *) sha, sizeof(sha), b64_sha);
  mg_snprintf(buf, sizeof(buf), "%s%s%s",
              "HTTP/1.1 101 Switching Protocols\r\n"
              "Upgrade: websocket\r\n"
              "Connection: Upgrade\r\n"
              "Sec-WebSocket-Accept: ", b64_sha, "\r\n\r\n");

  mg_write(conn, buf, strlen(buf));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x3495b(%rip), %r8      # 0xeee70
movl $0x1f4, %esi            # imm = 0x1F4
leaq 0xd338(%rip), %rdx      # 0xc7859
movb $0x0, %al
callq 0xb3c50
leaq -0x2bc(%rbp), %rdi
callq 0xba610
leaq -0x210(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xd550
movq -0x2d8(%rbp), %rsi
movq %rax, %rdx
leaq -0x2bc(%rbp), %rdi
callq 0xba670
leaq -0x230(%rbp), %rdi
leaq -0x2bc(%rbp), %rsi
callq 0xba790
leaq -0x230(%rbp), %rdi
leaq -0x260(%rbp), %rdx
movl $0x14, %esi
callq 0xba8c0
leaq -0x210(%rbp), %rdi
leaq -0x260(%rbp), %r8
movl $0x1f4, %esi            # imm = 0x1F4
leaq 0xd2ae(%rip), %rdx      # 0xc7857
leaq 0xd85b(%rip), %rcx      # 0xc7e0b
leaq 0xc6b8(%rip), %r9       # 0xc6c6f
movb $0x0, %al
callq 0xb3c50
movq -0x8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x2c8(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xd550
movq -0x2d0(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
movq %rax, %rdx
callq 0xb1580
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: SHA1Update
static void SHA1Update(SHA1_CTX *context, const unsigned char *data,
                       size_t len) {
  size_t i, j;

  j = context->count[0];
  if ((context->count[0] += len << 3) < j)
    context->count[1]++;
  context->count[1] += (len>>29);
  j = (j >> 3) & 63;
  if ((j + len) > 63) {
    memcpy(&context->buffer[j], data, (i = 64-j));
    SHA1Transform(context->state, context->buffer);
    for ( ; i + 63 < len; i += 64) {
      SHA1Transform(context->state, &data[i]);
    }
    j = 0;
  }
  else i = 0;
  memcpy(&context->buffer[j], &data[i], len - i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdx
shlq $0x3, %rdx
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %eax
addq %rdx, %rax
movl %eax, 0x14(%rcx)
movl %eax, %eax
cmpq -0x28(%rbp), %rax
jae 0xba6b9
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rdx
shrq $0x1d, %rdx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
shrq $0x3, %rax
andq $0x3f, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
cmpq $0x3f, %rax
jbe 0xba756
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %edx
subq -0x28(%rbp), %rdx
movq %rdx, -0x20(%rbp)
callq 0xd100
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1c, %rsi
callq 0xbaa70
movq -0x20(%rbp), %rax
addq $0x3f, %rax
cmpq -0x18(%rbp), %rax
jae 0xba74c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0xbaa70
movq -0x20(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x20(%rbp)
jmp 0xba71f
movq $0x0, -0x28(%rbp)
jmp 0xba75e
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq -0x20(%rbp), %rdx
callq 0xd100
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: SHA1Final
static void SHA1Final(unsigned char digest[20], SHA1_CTX *context) {
  unsigned i;
  unsigned char finalcount[8], c;

  for (i = 0; i < 8; i++) {
    finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
                                     >> ((3-(i & 3)) * 8) ) & 255);
  }
  c = 0200;
  SHA1Update(context, &c, 1);
  while ((context->count[0] & 504) != 448) {
    c = 0000;
    SHA1Update(context, &c, 1);
  }
  SHA1Update(context, finalcount, 8);
  for (i = 0; i < 20; i++) {
    digest[i] = (unsigned char)
      ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
  }
  memset(context, '\0', sizeof(*context));
  memset(&finalcount, '\0', sizeof(finalcount));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jae 0xba7f3
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x4, %esi
cmovael %edx, %ecx
movslq %ecx, %rcx
movl 0x14(%rax,%rcx,4), %eax
movl -0x14(%rbp), %edx
andl $0x3, %edx
movl $0x3, %ecx
subl %edx, %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
movb %al, %cl
movl -0x14(%rbp), %eax
movb %cl, -0x1c(%rbp,%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xba7a7
movb $-0x80, -0x1d(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1d(%rbp), %rsi
movl $0x1, %edx
callq 0xba670
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x1f8, %eax            # imm = 0x1F8
cmpl $0x1c0, %eax            # imm = 0x1C0
je 0xba834
movb $0x0, -0x1d(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1d(%rbp), %rsi
movl $0x1, %edx
callq 0xba670
jmp 0xba809
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
movl $0x8, %edx
callq 0xba670
movl $0x0, -0x14(%rbp)
cmpl $0x14, -0x14(%rbp)
jae 0xba890
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %edx
andl $0x3, %edx
movl $0x3, %ecx
subl %edx, %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xba84d
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x5c, %edx
callq 0xd430
leaq -0x1c(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xd430
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: blk0
static uint32_t blk0(union char64long16 *block, int i) {
  // Forrest: SHA expect BIG_ENDIAN, swap if LITTLE_ENDIAN
  if (!is_big_endian()) {
    block->l[i] = (rol(block->l[i], 24) & 0xFF00FF00) |
      (rol(block->l[i], 8) & 0x00FF00FF);
  }
  return block->l[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq 0xb7250
cmpl $0x0, %eax
jne 0xbc80d
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
shll $0x18, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
orl %eax, %edx
andl $0xff00ff00, %edx       # imm = 0xFF00FF00
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movslq -0xc(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
shrl $0x18, %ecx
orl %ecx, %eax
andl $0xff00ff, %eax         # imm = 0xFF00FF
orl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: proxify_connection
static void proxify_connection(struct connection *conn) {
  char proto[10], host[500], cert[500], addr[1000];
  unsigned short port = 80;
  struct mg_connection *c = &conn->mg_conn;
  int n = 0;
  const char *url = c->uri;

  proto[0] = host[0] = cert[0] = '\0';
  if (sscanf(url, "%499[^: ]:%hu%n", host, &port, &n) != 2 &&
      sscanf(url, "%9[a-z]://%499[^: ]:%hu%n", proto, host, &port, &n) != 3 &&
      sscanf(url, "%9[a-z]://%499[^/ ]%n", proto, host, &n) != 2) {
    n = 0;
  }

  snprintf(addr, sizeof(addr), "%s://%s:%hu",
           conn->ns_conn->ssl != NULL ? "ssl" : "tcp", host, port);
  if (n <= 0 || !mg_forward(c, addr)) {
    conn->ns_conn->flags |= NSF_CLOSE_IMMEDIATELY;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x820, %rsp            # imm = 0x820
movq %rdi, -0x8(%rbp)
movw $0x50, -0x802(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x810(%rbp)
movl $0x0, -0x814(%rbp)
movq -0x810(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x820(%rbp)
movb $0x0, -0x410(%rbp)
movb $0x0, -0x210(%rbp)
movb $0x0, -0x12(%rbp)
movq -0x820(%rbp), %rdi
leaq -0x210(%rbp), %rdx
leaq 0xb642(%rip), %rsi      # 0xc7ecc
leaq -0x802(%rbp), %rcx
leaq -0x814(%rbp), %r8
movb $0x0, %al
callq 0xd130
cmpl $0x2, %eax
je 0xbc90d
movq -0x820(%rbp), %rdi
leaq -0x12(%rbp), %rdx
leaq -0x210(%rbp), %rcx
leaq 0xb605(%rip), %rsi      # 0xc7ec2
leaq -0x802(%rbp), %r8
leaq -0x814(%rbp), %r9
movb $0x0, %al
callq 0xd130
cmpl $0x3, %eax
je 0xbc90d
movq -0x820(%rbp), %rdi
leaq -0x12(%rbp), %rdx
leaq -0x210(%rbp), %rcx
leaq 0xb5ec(%rip), %rsi      # 0xc7edc
leaq -0x814(%rbp), %r8
movb $0x0, %al
callq 0xd130
cmpl $0x2, %eax
je 0xbc90d
movl $0x0, -0x814(%rbp)
leaq -0x800(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x70(%rax), %rdx
leaq 0xb5dc(%rip), %rcx      # 0xc7f02
leaq 0xb5d1(%rip), %rax      # 0xc7efe
cmpq $0x0, %rdx
cmovneq %rax, %rcx
leaq -0x210(%rbp), %r8
movzwl -0x802(%rbp), %r9d
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xb5a2(%rip), %rdx      # 0xc7ef2
movb $0x0, %al
callq 0xd6e0
cmpl $0x0, -0x814(%rbp)
jle 0xbc978
movq -0x810(%rbp), %rdi
leaq -0x800(%rbp), %rsi
callq 0xb32a0
cmpl $0x0, %eax
jne 0xbc98e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xa0(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0xa0(%rax)
addq $0x820, %rsp            # imm = 0x820
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: send_options
static void send_options(struct connection *conn) {
  conn->mg_conn.status_code = 200;
  mg_printf(&conn->mg_conn, "%s",
            "HTTP/1.1 200 OK\r\nAllow: GET, POST, HEAD, CONNECT, PUT, "
            "DELETE, OPTIONS, PROPFIND, MKCOL\r\nDAV: 1\r\n\r\n");
  close_local_endpoint(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0xc8, 0x284(%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq 0x7e67(%rip), %rsi      # 0xc4830
leaq 0xb536(%rip), %rdx      # 0xc7f06
movb $0x0, %al
callq 0xb0cb0
movq -0x8(%rbp), %rdi
callq 0xb23e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: is_authorized
static int is_authorized(struct connection *conn, const char *path,
                         int is_directory) {
  FILE *fp;
  int authorized = MG_TRUE;

  if ((fp = open_auth_file(conn, path, is_directory)) != NULL) {
    authorized = mg_authorize_digest(&conn->mg_conn, fp);
    fclose(fp);
  }

  return authorized;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xbd5a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xbce71
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
callq 0xb2b90
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd5b0
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)