LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: nilnilnil[P]autocomplete/./include/segtree.hpp
// Function: SegmentTree::_init(unsigned int, unsigned int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>> const&)
pui_t
    _init(uint_t ni, uint_t b, uint_t e, vui_t const& elems) {
        // printf("ni: %u, b: %u, e: %u, size: %u\n", ni, b, e, elems.size());

        uint_t m = b + (e-b) / 2;
        if (b == e) {
            this->repr[ni] = pui_t(elems[b], b);
            // printf("Returning: [%u, %u]\n", this->repr[ni].first, this->repr[ni].second);
            return this->repr[ni];
        }
        else {
            pui_t lhs = this->_init(ni*2 + 1, b, m, elems);
            pui_t rhs = this->_init(ni*2 + 2, m+1, e, elems);
            return this->repr[ni] = (lhs.first > rhs.first ? lhs : rhs);
        }
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movl %edx, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x50(%rsp), %eax
movl 0x4c(%rsp), %ecx
subl 0x50(%rsp), %ecx
shrl %ecx
addl %ecx, %eax
movl %eax, 0x3c(%rsp)
movl 0x50(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jne 0xfcfe
movq 0x40(%rsp), %rdi
movl 0x50(%rsp), %eax
movl %eax, %esi
callq 0xd380
movq %rax, %rsi
leaq 0x34(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xfdb0
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0xfde0
movq %rax, %rdi
leaq 0x34(%rsp), %rsi
callq 0xe130
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0xfde0
movq (%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0xfd9c
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %esi
shll %esi
addl $0x1, %esi
movl 0x50(%rsp), %edx
movl 0x3c(%rsp), %ecx
movq 0x40(%rsp), %r8
callq 0xfc60
movq 0x18(%rsp), %rdi
movq %rax, 0x2c(%rsp)
movl 0x54(%rsp), %esi
shll %esi
addl $0x2, %esi
movl 0x3c(%rsp), %edx
addl $0x1, %edx
movl 0x4c(%rsp), %ecx
movq 0x40(%rsp), %r8
callq 0xfc60
movq %rax, 0x24(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jbe 0xfd61
leaq 0x2c(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xfd6d
leaq 0x24(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xfd6d
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0xfde0
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xfe00
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/./include/segtree.hpp
// Function: SegmentTree::_query_max(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
pui_t
    _query_max(uint_t ni, uint_t b, uint_t e, uint_t qf, uint_t ql) {
        // printf("_query_max(%u, %u, %u, %u, %u)\n", ni, b, e, qf, ql);
        if (b > e || qf > e || ql < b) {
            // printf("[1] Returning: (-1, -1)\n");
            return pui_t(minus_one, minus_one);
        }

        if (b >= qf && e <= ql) {
            // printf("[2] Returning: (%d, %d)\n", this->repr[ni].first, this->repr[ni].second);
            return this->repr[ni];
        }

        uint_t m = b + (e-b) / 2;
        pui_t lhs = this->_query_max(ni*2 + 1, b, m, qf, ql);
        pui_t rhs = this->_query_max(ni*2 + 2, m+1, e, qf, ql);

        // printf("lhs.second is minus_one: %d, rhs.second is minus_one: %d\n", lhs.second == minus_one, rhs.second == minus_one);

        if (lhs.second == minus_one) {
            // printf("[3] Returning: (%d, %d)\n", rhs.first, rhs.second);
            return rhs;
        }
        else if (rhs.second == minus_one) {
            // printf("[4] Returning: (%d, %d)\n", lhs.first, lhs.second);
            return lhs;
        }
        else {
            pui_t &tmp = lhs.first > rhs.first ? lhs : rhs;
            // printf("[5] Returning: (%d, %d)\n", tmp.first, tmp.second);
            return tmp;
        }

    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %edx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movl %r8d, 0x38(%rsp)
movl %r9d, 0x34(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x40(%rsp), %eax
cmpl 0x3c(%rsp), %eax
ja 0xfe77
movl 0x38(%rsp), %eax
cmpl 0x3c(%rsp), %eax
ja 0xfe77
movl 0x34(%rsp), %eax
cmpl 0x40(%rsp), %eax
jae 0xfe90
leaq 0x50(%rsp), %rdi
leaq 0x128cd(%rip), %rdx     # 0x22750
movq %rdx, %rsi
callq 0xffa0
jmp 0xff8b
movl 0x40(%rsp), %eax
cmpl 0x38(%rsp), %eax
jb 0xfec1
movl 0x3c(%rsp), %eax
cmpl 0x34(%rsp), %eax
ja 0xfec1
movq 0x10(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0xfde0
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0xff8b
movq 0x10(%rsp), %rdi
movl 0x40(%rsp), %eax
movl 0x3c(%rsp), %ecx
subl 0x40(%rsp), %ecx
shrl %ecx
addl %ecx, %eax
movl %eax, 0x30(%rsp)
movl 0x44(%rsp), %esi
shll %esi
addl $0x1, %esi
movl 0x40(%rsp), %edx
movl 0x30(%rsp), %ecx
movl 0x38(%rsp), %r8d
movl 0x34(%rsp), %r9d
callq 0xfe30
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movl 0x44(%rsp), %esi
shll %esi
addl $0x2, %esi
movl 0x30(%rsp), %edx
addl $0x1, %edx
movl 0x3c(%rsp), %ecx
movl 0x38(%rsp), %r8d
movl 0x34(%rsp), %r9d
callq 0xfe30
movq %rax, 0x20(%rsp)
cmpl $-0x1, 0x2c(%rsp)
jne 0xff3f
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0xff8b
cmpl $-0x1, 0x24(%rsp)
jne 0xff52
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0xff8b
movl 0x28(%rsp), %eax
cmpl 0x20(%rsp), %eax
jbe 0xff68
leaq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0xff74
leaq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0xff74
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: nilnilnil[P]autocomplete/src/main.cpp
// Function: InputLineParser::on_snippet(char const*, int)
void
    on_snippet(const char *data, int len) {
        if (len && this->psnippet_proxy) {
            const char *base = this->mem_base + this->buff_offset + 
                (data - this->buff);
            DCERR("on_snippet::base: "<<(void*)base<<", len: "<<len<<"\n");
            this->psnippet_proxy->assign(base, len);
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x14(%rsp)
je 0x13e1f
movq (%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x13e1f
movq (%rsp), %rax
movq 0x8(%rax), %rcx
addq 0x18(%rax), %rcx
movq 0x18(%rsp), %rdx
movq 0x10(%rax), %rsi
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rax), %rdi
movq 0x8(%rsp), %rsi
movl 0x14(%rsp), %edx
callq 0x13e30
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_get_option
const char *mg_get_option(const struct mg_context *ctx, const char *name) {
  int i;
  if ((i = get_option_index(name)) == -1) {
    return NULL;
  } else if (ctx->config[i] == NULL) {
    return "";
  } else {
    return ctx->config[i];
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x16ac0
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
jne 0x16a7c
movq $0x0, 0x20(%rsp)
jmp 0x16ab0
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, 0x10(%rax,%rcx,8)
jne 0x16a9c
leaq 0xb85b(%rip), %rax      # 0x222f0
movq %rax, 0x20(%rsp)
jmp 0x16ab0
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: get_option_index
static int get_option_index(const char *name) {
  int i;

  for (i = 0; config_options[i] != NULL; i += ENTRIES_PER_CONFIG_OPTION) {
    if (strcmp(config_options[i], name) == 0 ||
        strcmp(config_options[i + 1], name) == 0) {
      return i / ENTRIES_PER_CONFIG_OPTION;
    }
  }
  return -1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movslq 0x4(%rsp), %rcx
leaq 0x14bd3(%rip), %rax     # 0x2b6b0
cmpq $0x0, (%rax,%rcx,8)
je 0x16b48
movslq 0x4(%rsp), %rcx
leaq 0x14bc0(%rip), %rax     # 0x2b6b0
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0x5810
cmpl $0x0, %eax
je 0x16b27
movl 0x4(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x14b9c(%rip), %rax     # 0x2b6b0
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0x5810
cmpl $0x0, %eax
jne 0x16b39
movl 0x4(%rsp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, 0x14(%rsp)
jmp 0x16b50
jmp 0x16b3b
movl 0x4(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x4(%rsp)
jmp 0x16ad1
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: get_header
static const char *get_header(const struct mg_request_info *ri,
                              const char *name) {
  int i;

  for (i = 0; i < ri->num_headers; i++)
    if (!mg_strcasecmp(name, ri->http_headers[i].name))
      return ri->http_headers[i].value;

  return NULL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x4c(%rcx), %eax
jge 0x16c1a
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
addq $0x50, %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x19510
cmpl $0x0, %eax
jne 0x16c0b
movq 0x18(%rsp), %rax
addq $0x50, %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x16c23
jmp 0x16c0d
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x16bb6
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: pull
static int pull(FILE *fp, SOCKET sock, SSL *ssl, char *buf, int len) {
  int nread;

  if (ssl != NULL) {
    nread = SSL_read(ssl, buf, len);
  } else if (fp != NULL) {
    // Use read() instead of fread(), because if we're reading from the CGI
    // pipe, fread() may block until IO buffer is filled up. We cannot afford
    // to block and must pass all read bytes immediately to the client.
    nread = read(fileno(fp), buf, (size_t) len);
    if (ferror(fp))
      nread = -1;
  } else {
    nread = recv(sock, buf, (size_t) len, 0);
  }

  return nread;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x16e70
movq 0x14aad(%rip), %rax     # 0x2b908
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
callq *%rax
movl %eax, (%rsp)
jmp 0x16ec8
cmpq $0x0, 0x20(%rsp)
je 0x16eae
movq 0x20(%rsp), %rdi
callq 0x55c0
movl %eax, %edi
movq 0x8(%rsp), %rsi
movslq 0x4(%rsp), %rdx
callq 0x5860
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x5b00
cmpl $0x0, %eax
je 0x16eac
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x16ec6
movl 0x1c(%rsp), %edi
movq 0x8(%rsp), %rsi
movslq 0x4(%rsp), %rdx
xorl %ecx, %ecx
callq 0x5180
movl %eax, (%rsp)
jmp 0x16ec8
movl (%rsp), %eax
addq $0x28, %rsp
retq
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: push
static int64_t push(FILE *fp, SOCKET sock, SSL *ssl, const char *buf,
                    int64_t len) {
  int64_t sent;
  int n, k;

  sent = 0;
  while (sent < len) {

    /* How many bytes we send in this iteration */
    k = len - sent > INT_MAX ? INT_MAX : (int) (len - sent);

    if (ssl != NULL) {
      n = SSL_write(ssl, buf + sent, k);
    } else if (fp != NULL) {
      n = fwrite(buf + sent, 1, (size_t)k, fp);
      if (ferror(fp))
        n = -1;
    } else {
      n = send(sock, buf + sent, (size_t)k, 0);
    }

    if (n < 0)
      break;

    sent += n;
  }

  return sent;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jge 0x17022
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jle 0x16f62
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, 0xc(%rsp)
jmp 0x16f70
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x16fa2
movq 0x14991(%rip), %rax     # 0x2b918
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq 0x18(%rsp), %rsi
movl 0x10(%rsp), %edx
callq *%rax
movl %eax, 0x14(%rsp)
jmp 0x17005
cmpq $0x0, 0x40(%rsp)
je 0x16fe5
movq 0x28(%rsp), %rdi
addq 0x18(%rsp), %rdi
movslq 0x10(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl $0x1, %esi
callq 0x5b50
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5b00
cmpl $0x0, %eax
je 0x16fe3
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x17003
movl 0x3c(%rsp), %edi
movq 0x28(%rsp), %rsi
addq 0x18(%rsp), %rsi
movslq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x5280
movl %eax, 0x14(%rsp)
jmp 0x17005
cmpl $0x0, 0x14(%rsp)
jge 0x1700e
jmp 0x17022
movslq 0x14(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x16f35
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_printf
int mg_printf(struct mg_connection *conn, const char *fmt, ...) {
  char buf[BUFSIZ];
  int len;
  va_list ap;

  va_start(ap, fmt);
  len = mg_vsnprintf(conn, buf, sizeof(buf), fmt, ap);
  va_end(ap);

  return mg_write(conn, buf, (size_t)len);
}

// Assembly:
subq $0x20f8, %rsp           # imm = 0x20F8
testb %al, %al
je 0x1706f
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x20f0(%rsp)
movq %rsi, 0x20e8(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0x2100(%rsp), %rax
movq %rax, 0xc8(%rsp)
movl $0x30, 0xc4(%rsp)
movl $0x10, 0xc0(%rsp)
movq 0x20f0(%rsp), %rdi
movq 0x20e8(%rsp), %rcx
leaq 0xe0(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movl $0x2000, %edx           # imm = 0x2000
leaq 0xc0(%rsp), %r8
callq 0x17120
movq 0x8(%rsp), %rsi
movl %eax, 0xdc(%rsp)
movq 0x20f0(%rsp), %rdi
movslq 0xdc(%rsp), %rdx
callq 0x16ed0
addq $0x20f8, %rsp           # imm = 0x20F8
retq
nop
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_vsnprintf
static int mg_vsnprintf(struct mg_connection *conn, char *buf, size_t buflen,
                        const char *fmt, va_list ap) {
  int n;

  if (buflen == 0)
    return 0;

  n = vsnprintf(buf, buflen, fmt, ap);

  if (n < 0) {
    cry(conn, "vsnprintf error");
    n = 0;
  } else if (n >= (int) buflen) {
    cry(conn, "truncating vsnprintf buffer: [%.*s]",
        n > 200 ? 200 : n, buf);
    n = (int) buflen - 1;
  }
  buf[n] = '\0';

  return n;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x17152
movl $0x0, 0x44(%rsp)
jmp 0x17207
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x5340
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x17193
movq 0x38(%rsp), %rdi
leaq 0xb95d(%rip), %rsi      # 0x22adf
movb $0x0, %al
callq 0x184e0
movl $0x0, 0x14(%rsp)
jmp 0x171f1
movl 0x14(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl %ecx, %eax
jl 0x171ef
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0xc8, 0x14(%rsp)
jle 0x171bf
movl $0xc8, %eax
movl %eax, 0x4(%rsp)
jmp 0x171c7
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movq 0x30(%rsp), %rcx
leaq 0xb913(%rip), %rsi      # 0x22aef
movb $0x0, %al
callq 0x184e0
movq 0x28(%rsp), %rax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x171f1
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movl 0x14(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_get_var
int mg_get_var(const char *buf, size_t buf_len, const char *name,
               char *dst, size_t dst_len) {
  const char *p, *e, *s;
  size_t name_len, len;

  name_len = strlen(name);
  e = buf + buf_len;
  len = -1;
  dst[0] = '\0';

  // buf is "var1=val1&var2=val2...". Find variable first
  for (p = buf; p != NULL && p + name_len < e; p++) {
    if ((p == buf || p[-1] == '&') && p[name_len] == '=' &&
        !mg_strncasecmp(name, p, name_len)) {

      // Point p to variable value
      p += name_len + 1;

      // Point s to the end of the value
      s = (const char *) memchr(p, '&', (size_t)(e - p));
      if (s == NULL) {
        s = e;
      }
      assert(s >= p);

      // Decode variable into destination buffer
      if ((size_t) (s - p) < dst_len) {
        len = url_decode(p, (size_t)(s - p), dst, dst_len, 1);
      }
      break;
    }
  }

  return len;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5230
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
addq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $-0x1, 0x8(%rsp)
movq 0x38(%rsp), %rax
movb $0x0, (%rax)
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x28(%rsp)
movb %al, 0x7(%rsp)
je 0x1728a
movq 0x28(%rsp), %rax
addq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
setb %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x17297
jmp 0x17386
movq 0x28(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x172b5
movq 0x28(%rsp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x26, %eax
jne 0x17371
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x17371
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x17390
cmpl $0x0, %eax
jne 0x17371
movq 0x10(%rsp), %rax
addq $0x1, %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rax, %rdx
movl $0x26, %esi
callq 0x5640
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x1732f
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
cmpq 0x30(%rsp), %rax
jae 0x1736f
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rax, %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl $0x1, %r8d
callq 0x17450
movq %rax, 0x8(%rsp)
jmp 0x17386
jmp 0x17373
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x17266
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_strncasecmp
static int mg_strncasecmp(const char *s1, const char *s2, size_t len) {
  int diff = 0;

  if (len > 0)
    do {
      diff = lowercase(s1++) - lowercase(s2++);
    } while (diff == 0 && s1[-1] != '\0' && --len > 0);

  return diff;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x10(%rsp)
jbe 0x17439
jmp 0x173b9
movq 0x20(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
callq 0x19590
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
callq 0x19590
movl %eax, %ecx
movl 0x8(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
movb %al, 0x7(%rsp)
jne 0x1742f
movq 0x20(%rsp), %rax
movsbl -0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
je 0x1742f
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
seta %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x173b9
jmp 0x17439
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_get_cookie
int mg_get_cookie(const struct mg_connection *conn, const char *cookie_name,
                  char *dst, size_t dst_size) {
  const char *s, *p, *end;
  int name_len, len = -1;

  dst[0] = '\0';
  if ((s = mg_get_header(conn, "Cookie")) == NULL) {
    return 0;
  }

  name_len = strlen(cookie_name);
  end = s + strlen(s);

  for (; (s = strstr(s, cookie_name)) != NULL; s += name_len)
    if (s[name_len] == '=') {
      s += name_len + 1;
      if ((p = strchr(s, ' ')) == NULL)
        p = end;
      if (p[-1] == ';')
        p--;
      if (*s == '"' && p[-1] == '"' && p > s + 1) {
        s++;
        p--;
      }
      if ((size_t) (p - s) < dst_size) {
        len = (p - s) + 1;
        mg_strlcpy(dst, s, (size_t)len);
      }
      break;
    }

  return len;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movq 0x38(%rsp), %rax
movb $0x0, (%rax)
movq 0x48(%rsp), %rdi
leaq 0xb0d0(%rip), %rsi      # 0x22774
callq 0x16b70
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
jne 0x176c1
movl $0x0, 0x54(%rsp)
jmp 0x1782b
movq 0x40(%rsp), %rdi
callq 0x5230
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x5230
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x5100
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x17823
movq 0x28(%rsp), %rax
movslq 0x14(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x17808
movl 0x14(%rsp), %ecx
addl $0x1, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x20, %esi
callq 0x51d0
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
jne 0x17763
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x3b, %eax
jne 0x1777f
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x177c9
movq 0x20(%rsp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x22, %eax
jne 0x177c9
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x177c9
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
cmpq 0x30(%rsp), %rax
jae 0x17806
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x10(%rsp), %rdx
callq 0x17840
jmp 0x17823
jmp 0x1780a
movl 0x14(%rsp), %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x176f3
movl 0x10(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_md5
void mg_md5(char *buf, ...) {
  unsigned char hash[16];
  const char *p;
  va_list ap;
  MD5_CTX ctx;

  MD5Init(&ctx);

  va_start(ap, buf);
  while ((p = va_arg(ap, const char *)) != NULL) {
    MD5Update(&ctx, (const unsigned char *) p, (unsigned) strlen(p));
  }
  va_end(ap);

  MD5Final(hash, &ctx);
  bin2str(buf, hash, sizeof(hash));
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
testb %al, %al
je 0x17905
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %r9, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, 0x170(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x17a40
leaq 0x140(%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x180(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq 0x140(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x140(%rsp), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x28, %eax
ja 0x17996
movq 0x20(%rsp), %rcx
movl 0x2c(%rsp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, 0x18(%rsp)
jmp 0x179af
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x158(%rsp)
cmpq $0x0, %rax
je 0x179f8
movq 0x158(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x158(%rsp), %rdi
callq 0x5230
movq 0x10(%rsp), %rsi
movl %eax, %edx
leaq 0xe8(%rsp), %rdi
callq 0x17a90
jmp 0x1795d
leaq 0x160(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0xe8(%rsp), %rsi
callq 0x17c00
movq 0x8(%rsp), %rsi
movq 0x170(%rsp), %rdi
movl $0x10, %edx
callq 0x17d20
addq $0x178, %rsp            # imm = 0x178
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: MD5Init
static void MD5Init(MD5_CTX *ctx) {
  ctx->buf[0] = 0x67452301;
  ctx->buf[1] = 0xefcdab89;
  ctx->buf[2] = 0x98badcfe;
  ctx->buf[3] = 0x10325476;

  ctx->bits[0] = 0;
  ctx->bits[1] = 0;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x67452301, (%rax)     # imm = 0x67452301
movq -0x8(%rsp), %rax
movl $0xefcdab89, 0x4(%rax)  # imm = 0xEFCDAB89
movq -0x8(%rsp), %rax
movl $0x98badcfe, 0x8(%rax)  # imm = 0x98BADCFE
movq -0x8(%rsp), %rax
movl $0x10325476, 0xc(%rax)  # imm = 0x10325476
movq -0x8(%rsp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x14(%rax)
retq
nopl (%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: MD5Update
static void MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) {
  uint32_t t;

  t = ctx->bits[0];
  if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
    ctx->bits[1]++;
  ctx->bits[1] += len >> 29;

  t = (t >> 3) & 0x3f;

  if (t) {
    unsigned char *p = (unsigned char *) ctx->in + t;

    t = 64 - t;
    if (len < t) {
      memcpy(p, buf, len);
      return;
    }
    memcpy(p, buf, t);
    byteReverse(ctx->in, 16);
    MD5Transform(ctx->buf, (uint32_t *) ctx->in);
    buf += t;
    len -= t;
  }

  while (len >= 64) {
    memcpy(ctx->in, buf, 64);
    byteReverse(ctx->in, 16);
    MD5Transform(ctx->buf, (uint32_t *) ctx->in);
    buf += 64;
    len -= 64;
  }

  memcpy(ctx->in, buf, len);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
movq 0x20(%rsp), %rcx
movl %eax, 0x10(%rcx)
cmpl 0x10(%rsp), %eax
jae 0x17ad7
movq 0x20(%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movl 0x14(%rsp), %ecx
shrl $0x1d, %ecx
movq 0x20(%rsp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl 0x10(%rsp), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x17b91
movq 0x20(%rsp), %rax
addq $0x18, %rax
movl 0x10(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movl $0x40, %eax
subl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jae 0x17b48
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %eax
movl %eax, %edx
callq 0x5450
jmp 0x17bf9
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x10(%rsp), %eax
movl %eax, %edx
callq 0x5450
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x18, %rsi
callq 0x195b0
movl 0x10(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
jmp 0x17b93
cmpl $0x40, 0x14(%rsp)
jb 0x17be0
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
movl $0x40, %edx
callq 0x5450
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x18, %rsi
callq 0x195b0
movq 0x18(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
subl $0x40, %eax
movl %eax, 0x14(%rsp)
jmp 0x17b93
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %eax
movl %eax, %edx
callq 0x5450
addq $0x28, %rsp
retq
nop
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: MD5Final
static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) {
  unsigned count;
  unsigned char *p;

  count = (ctx->bits[0] >> 3) & 0x3F;

  p = ctx->in + count;
  *p++ = 0x80;
  count = 64 - 1 - count;
  if (count < 8) {
    memset(p, 0, count);
    byteReverse(ctx->in, 16);
    MD5Transform(ctx->buf, (uint32_t *) ctx->in);
    memset(ctx->in, 0, 56);
  } else {
    memset(p, 0, count - 8);
  }
  byteReverse(ctx->in, 14);

  ((uint32_t *) ctx->in)[14] = ctx->bits[0];
  ((uint32_t *) ctx->in)[15] = ctx->bits[1];

  MD5Transform(ctx->buf, (uint32_t *) ctx->in);
  byteReverse((unsigned char *) ctx->buf, 4);
  memcpy(digest, ctx->buf, 16);
  memset((char *) ctx, 0, sizeof(*ctx));
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x10(%rax), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
addq $0x18, %rax
movl 0x14(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rsp)
movb $-0x80, (%rax)
movl $0x3f, %eax
subl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
cmpl $0x8, 0x14(%rsp)
jae 0x17c99
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x52a0
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x195b0
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x52a0
jmp 0x17cb0
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
subl $0x8, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x52a0
movq 0x18(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x50(%rax)
movq 0x18(%rsp), %rax
movl 0x14(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x54(%rax)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x195b0
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x52a0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: bin2str
static void bin2str(char *to, const unsigned char *p, size_t len) {
  static const char *hex = "0123456789abcdef";

  for (; len--; p++) {
    *to++ = hex[p[0] >> 4];
    *to++ = hex[p[0] & 0x0f];
  }
  *to = '\0';
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x17dac
movq 0x13ca3(%rip), %rax     # 0x2b9f0
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
sarl $0x4, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rsp)
movb %cl, (%rax)
movq 0x13c78(%rip), %rax     # 0x2b9f0
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rsp)
movb %cl, (%rax)
movq -0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rsp)
jmp 0x17d2f
movq -0x8(%rsp), %rax
movb $0x0, (%rax)
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_stop
void mg_stop(struct mg_context *ctx) {
  ctx->stop_flag = 1;

  // Wait until mg_fini() stops
  while (ctx->stop_flag != 2) {
    (void) sleep(0);
  }
  free_context(ctx);

#if defined(_WIN32) && !defined(__SYMBIAN32__)
  (void) WSACleanup();
#endif // _WIN32
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movl $0x1, (%rax)
movq (%rsp), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0x180f3
xorl %edi, %edi
callq 0x53d0
jmp 0x180df
movq (%rsp), %rdi
callq 0x18100
popq %rax
retq
nop
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: free_context
static void free_context(struct mg_context *ctx) {
  int i;

  // Deallocate config parameters
  for (i = 0; i < NUM_OPTIONS; i++) {
    if (ctx->config[i] != NULL)
      free(ctx->config[i]);
  }

  // Deallocate SSL context
  if (ctx->ssl_ctx != NULL) {
    SSL_CTX_free(ctx->ssl_ctx);
  }
#ifndef NO_SSL
  if (ssl_mutexes != NULL) {
    free(ssl_mutexes);
  }
#endif // !NO_SSL

  // Deallocate context itself
  free(ctx);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x16, 0xc(%rsp)
jge 0x1814d
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, 0x10(%rax,%rcx,8)
je 0x1813e
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rdi
callq 0x56c0
jmp 0x18140
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x18111
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1816b
movq 0x13858(%rip), %rax     # 0x2b9b8
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
cmpq $0x0, 0x139ed(%rip)     # 0x2bb60
je 0x18181
movq 0x139e4(%rip), %rdi     # 0x2bb60
callq 0x56c0
movq 0x10(%rsp), %rdi
callq 0x56c0
addq $0x18, %rsp
retq
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: set_uid_option
static int set_uid_option(struct mg_context *ctx) {
  struct passwd *pw;
  const char *uid = ctx->config[RUN_AS_USER];
  int success = 0;

  if (uid == NULL) {
    success = 1;
  } else {
    if ((pw = getpwnam(uid)) == NULL) {
      cry(fc(ctx), "%s: unknown user [%s]", __func__, uid);
    } else if (setgid(pw->pw_gid) == -1) {
      cry(fc(ctx), "%s: setgid(%s): %s", __func__, uid, strerror(errno));
    } else if (setuid(pw->pw_uid) == -1) {
      cry(fc(ctx), "%s: setuid(%s): %s", __func__, uid, strerror(errno));
    } else {
      success = 1;
    }
  }

  return success;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x18f07
movl $0x1, 0x2c(%rsp)
jmp 0x1900c
movq 0x30(%rsp), %rdi
callq 0x5430
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
jne 0x18f48
movq 0x40(%rsp), %rdi
callq 0x18750
movq %rax, %rdi
movq 0x30(%rsp), %rcx
leaq 0x9dda(%rip), %rsi      # 0x22d0f
leaq 0x9de9(%rip), %rdx      # 0x22d25
movb $0x0, %al
callq 0x184e0
jmp 0x1900a
movq 0x38(%rsp), %rax
movl 0x14(%rax), %edi
callq 0x5a70
cmpl $-0x1, %eax
jne 0x18fa3
movq 0x40(%rsp), %rdi
callq 0x18750
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x5060
movl (%rax), %edi
callq 0x5190
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rcx
movq %rax, %r8
leaq 0x9da1(%rip), %rsi      # 0x22d34
leaq 0x9d8b(%rip), %rdx      # 0x22d25
movb $0x0, %al
callq 0x184e0
jmp 0x19008
movq 0x38(%rsp), %rax
movl 0x10(%rax), %edi
callq 0x5b10
cmpl $-0x1, %eax
jne 0x18ffe
movq 0x40(%rsp), %rdi
callq 0x18750
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x5060
movl (%rax), %edi
callq 0x5190
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rcx
movq %rax, %r8
leaq 0x9d59(%rip), %rsi      # 0x22d47
leaq 0x9d30(%rip), %rdx      # 0x22d25
movb $0x0, %al
callq 0x184e0
jmp 0x19006
movl $0x1, 0x2c(%rsp)
jmp 0x19008
jmp 0x1900a
jmp 0x1900c
movl 0x2c(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: start_thread
static int start_thread(struct mg_context *ctx, mg_thread_func_t func,
                        void *param) {
  pthread_t thread_id;
  pthread_attr_t attr;
  int retval;

  (void) pthread_attr_init(&attr);
  (void) pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
  // TODO(lsm): figure out why mongoose dies on Linux if next line is enabled
  // (void) pthread_attr_setstacksize(&attr, sizeof(struct mg_connection) * 5);

  if ((retval = pthread_create(&thread_id, &attr, func, param)) != 0) {
    cry(fc(ctx), "%s: %s", __func__, strerror(retval));
  }

  return retval;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x56f0
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x5780
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5ac0
movl %eax, 0xc(%rsp)
cmpl $0x0, %eax
je 0x190d1
movq 0x60(%rsp), %rdi
callq 0x18750
movq %rax, (%rsp)
movl 0xc(%rsp), %edi
callq 0x5190
movq (%rsp), %rdi
movq %rax, %rcx
leaq 0x9ac4(%rip), %rsi      # 0x22b87
leaq 0x9d26(%rip), %rdx      # 0x22df0
movb $0x0, %al
callq 0x184e0
movl 0xc(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_strcasecmp
static int mg_strcasecmp(const char *s1, const char *s2) {
  int diff;

  do {
    diff = lowercase(s1++) - lowercase(s2++);
  } while (diff == 0 && s1[-1] != '\0');

  return diff;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
callq 0x19590
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
callq 0x19590
movl %eax, %ecx
movl 0x10(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x14(%rsp)
movb %al, 0xf(%rsp)
jne 0x1957a
movq 0x20(%rsp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1951e
movl 0x14(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_strndup
static char * mg_strndup(const char *ptr, size_t len) {
  char *p;

  if ((p = (char *) malloc(len + 1)) != NULL) {
    mg_strlcpy(p, ptr, len + 1);
  }

  return p;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
addq $0x1, %rdi
callq 0x5790
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x1a88d
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
addq $0x1, %rdx
callq 0x17840
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_stat
static int mg_stat(const char *path, struct mgstat *stp) {
  struct stat st;
  int ok;

  if (stat(path, &st) == 0) {
    ok = 0;
    stp->size = st.st_size;
    stp->mtime = st.st_mtime;
    stp->is_directory = S_ISDIR(st.st_mode);
  } else {
    ok = -1;
  }

  return ok;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x54e0
cmpl $0x0, %eax
jne 0x1a91a
movl $0x0, 0x4(%rsp)
movq 0x38(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x60(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0x20(%rsp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq 0x98(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1a922
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movl 0x4(%rsp), %eax
addq $0xa8, %rsp
retq
nop
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: load_dll
static int load_dll(struct mg_context *ctx, const char *dll_name,
                    struct ssl_func *sw) {
  union {void *p; void (*fp)(void);} u;
  void  *dll_handle;
  struct ssl_func *fp;

  if ((dll_handle = dlopen(dll_name, RTLD_LAZY)) == NULL) {
    cry(fc(ctx), "%s: cannot load %s", __func__, dll_name);
    return 0;
  }

  for (fp = sw; fp->name != NULL; fp++) {
#ifdef _WIN32
    // GetProcAddress() returns pointer to function
    u.fp = (void (*)(void)) dlsym(dll_handle, fp->name);
#else
    // dlsym() on UNIX returns void *. ISO C forbids casts of data pointers to
    // function pointers. We need to use a union to make a cast.
    u.p = dlsym(dll_handle, fp->name);
#endif /* _WIN32 */
    if (u.fp == NULL) {
      cry(fc(ctx), "%s: %s: cannot find %s", __func__, dll_name, fp->name);
      return 0;
    } else {
      fp->ptr = u.fp;
    }
  }

  return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5800
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x1a991
movq 0x28(%rsp), %rdi
callq 0x18750
movq %rax, %rdi
movq 0x20(%rsp), %rcx
leaq 0x8247(%rip), %rsi      # 0x22bbd
leaq 0x8253(%rip), %rdx      # 0x22bd0
movb $0x0, %al
callq 0x184e0
movl $0x0, 0x34(%rsp)
jmp 0x1aa1f
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x1aa17
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq (%rax), %rsi
callq 0x5510
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1a9fa
movq 0x28(%rsp), %rdi
callq 0x18750
movq %rax, %rdi
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
movq (%rax), %r8
leaq 0x81f7(%rip), %rsi      # 0x22bd9
leaq 0x81e7(%rip), %rdx      # 0x22bd0
movb $0x0, %al
callq 0x184e0
movl $0x0, 0x34(%rsp)
jmp 0x1aa1f
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1aa09
movq (%rsp), %rax
addq $0x10, %rax
movq %rax, (%rsp)
jmp 0x1a99a
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: ssl_locking_callback
static void ssl_locking_callback(int mode, int mutex_num, const char *file,
                                 int line) {
  line = 0;    // Unused
  file = NULL; // Unused

  if (mode & CRYPTO_LOCK) {
    (void) pthread_mutex_lock(&ssl_mutexes[mutex_num]);
  } else {
    (void) pthread_mutex_unlock(&ssl_mutexes[mutex_num]);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movl $0x0, 0x4(%rsp)
movq $0x0, 0x8(%rsp)
movl 0x14(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1aacc
movq 0x110a7(%rip), %rdi     # 0x2bb60
movslq 0x10(%rsp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x58a0
jmp 0x1aae4
movq 0x1108d(%rip), %rdi     # 0x2bb60
movslq 0x10(%rsp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x53e0
addq $0x18, %rsp
retq
nopl (%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: next_option
static const char *next_option(const char *list, struct vec *val,
                               struct vec *eq_val) {
  if (list == NULL || *list == '\0') {
    /* End of the list */
    list = NULL;
  } else {
    val->ptr = list;
    if ((list = strchr(val->ptr, ',')) != NULL) {
      /* Comma found. Store length and shift the list ptr */
      val->len = list - val->ptr;
      list++;
    } else {
      /* This value is the last one */
      list = val->ptr + strlen(val->ptr);
      val->len = list - val->ptr;
    }

    if (eq_val != NULL) {
      /*
       * Value has form "x=y", adjust pointers and lengths
       * so that val points to "x", and eq_val points to "y".
       */
      eq_val->len = 0;
      eq_val->ptr = (const char *) memchr(val->ptr, '=', val->len);
      if (eq_val->ptr != NULL) {
        eq_val->ptr++;  /* Skip over '=' character */
        eq_val->len = val->ptr + val->len - eq_val->ptr;
        val->len = (eq_val->ptr - val->ptr) - 1;
      }
    }
  }

  return list;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x1ab28
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1ab36
movq $0x0, 0x20(%rsp)
jmp 0x1ac6e
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movl $0x2c, %esi
callq 0x51d0
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x1ab89
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1abcc
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0x5230
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x10(%rsp)
je 0x1ac6c
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
movl $0x3d, %esi
callq 0x5640
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1ac6a
movq 0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
addq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
subq %rax, %rcx
subq $0x1, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1ac6c
jmp 0x1ac6e
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: parse_port_string
static int parse_port_string(const struct vec *vec, struct socket *so) {
  struct usa *usa = &so->lsa;
  int a, b, c, d, port, len;

  // MacOS needs that. If we do not zero it, subsequent bind() will fail.
  memset(so, 0, sizeof(*so));

  if (sscanf(vec->ptr, "%d.%d.%d.%d:%d%n", &a, &b, &c, &d, &port, &len) == 5) {
    // IP address to bind to is specified
    usa->u.sin.sin_addr.s_addr = htonl((a << 24) | (b << 16) | (c << 8) | d);
  } else if (sscanf(vec->ptr, "%d%n", &port, &len) == 1) {
    // Only port number is specified. Bind to all addresses
    usa->u.sin.sin_addr.s_addr = htonl(INADDR_ANY);
  } else {
    return 0;
  }
  assert(len > 0 && len <= (int) vec->len);

  if (strchr("sp,", vec->ptr[len]) == NULL) {
    return 0;
  }

  so->is_ssl = vec->ptr[len] == 's';
  so->is_proxy = vec->ptr[len] == 'p';
  usa->len = sizeof(usa->u.sin);
  usa->u.sin.sin_family = AF_INET;
  usa->u.sin.sin_port = htons((uint16_t) port);

  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0xc, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x52a0
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x803e(%rip), %rsi      # 0x22cfa
leaq 0x24(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x18(%rsp), %r9
leaq 0x14(%rsp), %r10
leaq 0x10(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x5540
cmpl $0x5, %eax
jne 0x1ad1d
movl 0x24(%rsp), %edi
shll $0x18, %edi
movl 0x20(%rsp), %eax
shll $0x10, %eax
orl %eax, %edi
movl 0x1c(%rsp), %eax
shll $0x8, %eax
orl %eax, %edi
orl 0x18(%rsp), %edi
callq 0x53f0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1ad64
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x8039(%rip), %rsi      # 0x22d65
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movb $0x0, %al
callq 0x5540
cmpl $0x1, %eax
jne 0x1ad55
xorl %edi, %edi
callq 0x53f0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1ad62
movl $0x0, 0x44(%rsp)
jmp 0x1ae0f
jmp 0x1ad64
movq 0x38(%rsp), %rax
movq (%rax), %rax
movslq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %esi
leaq 0x7f8f(%rip), %rdi      # 0x22d0b
callq 0x51d0
cmpq $0x0, %rax
jne 0x1ad91
movl $0x0, 0x44(%rsp)
jmp 0x1ae0f
movq 0x38(%rsp), %rax
movq (%rax), %rax
movslq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x73, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x34(%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movslq 0x10(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x70, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x38(%rax)
movq 0x28(%rsp), %rax
movl $0x10, (%rax)
movq 0x28(%rsp), %rax
movw $0x2, 0x4(%rax)
movl 0x14(%rsp), %eax
movzwl %ax, %edi
callq 0x5080
movw %ax, %cx
movq 0x28(%rsp), %rax
movw %cx, 0x6(%rax)
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: close_all_listening_sockets
static void close_all_listening_sockets(struct mg_context *ctx) {
  struct socket *sp, *tmp;
  for (sp = ctx->listening_sockets; sp != NULL; sp = tmp) {
    tmp = sp->next;
    (void) closesocket(sp->sock);
    free(sp);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0xd0(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1ae90
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x5b70
movq 0x8(%rsp), %rdi
callq 0x56c0
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x1ae5a
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)