LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/pritpal20[P]vector/./vector.hpp
// Function: lni::vector<int>::push_back(int const&)
void vector<T>::push_back(const T &val) {
		if (vec_sz == rsrv_sz) {
			rsrv_sz <<= 2;
			reallocate();
		}
		arr[vec_sz] = val;
		++vec_sz;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r13d
cmpl (%rdi), %r13d
jne 0x39c8
leal (,%r13,4), %edi
movl %edi, (%rbx)
shlq $0x2, %rdi
callq 0x1030
movq %rax, %r15
movq 0x8(%rbx), %r12
leaq (,%r13,4), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x10b0
testq %r12, %r12
je 0x39c2
movq %r12, %rdi
callq 0x10f0
movl 0x4(%rbx), %r13d
movq %r15, 0x8(%rbx)
jmp 0x39cc
movq 0x8(%rbx), %r15
movl (%r14), %eax
movl %r13d, %ecx
movl %eax, (%r15,%rcx,4)
incl 0x4(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/amukherj[P]concurrencyts/latch.cc
// Function: main
int main() {
  std::experimental::latch latch(7);
  for (int i = 0; i < 7; ++i) {
    std::thread thr([&, i]() {
      std::this_thread::sleep_for(std::chrono::seconds(5));
      std::cout << "Thread " << i << " done\n";
      latch.count_down();
    });
    thr.detach();
  }

  latch.wait();
  std::cout << "Latch opened\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
xorps %xmm0, %xmm0
leaq 0x38(%rsp), %rbx
movaps %xmm0, -0x18(%rbx)
movaps %xmm0, -0x28(%rbx)
movq $0x0, -0x8(%rbx)
movq %rbx, %rdi
callq 0x1110
movq $0x7, 0x30(%rbx)
xorl %r12d, %r12d
leaq 0x2a8c(%rip), %r13      # 0x3d88
leaq 0x10(%rsp), %rbp
movq %rsp, %r14
leaq 0x8(%rsp), %r15
movq $0x0, (%rsp)
movl $0x18, %edi
callq 0x10e0
movq %r13, (%rax)
movl %r12d, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x10d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1348
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x1160
cmpq $0x0, (%rsp)
jne 0x13ce
incl %r12d
cmpl $0x7, %r12d
jne 0x1309
leaq 0x10(%rsp), %rdi
callq 0x1470
movq 0x2c67(%rip), %rdi      # 0x3fd8
leaq 0xc8c(%rip), %rsi       # 0x2004
movl $0xd, %edx
callq 0x1100
movq %rbx, %rdi
callq 0x1180
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13bb
jmp 0x13bb
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x13be
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13be
cmpq $0x0, (%rsp)
jne 0x13ce
movq %rax, %r14
movq %rbx, %rdi
callq 0x1180
movq %r14, %rdi
callq 0x1170
callq 0x1040
nop
// File: /workspace/github_cpp_makefile_star2_O3/amukherj[P]concurrencyts/./latch.h
// Function: concurrencyts::latch::count_down()
void count_down() {
    std::unique_lock<std::mutex> ul{lock};
    assert(count > 0);
    if (--count == 0) {
      ul.unlock();
      done.notify_all();
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x14dc
movb $0x1, 0x8(%r14)
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x15a8
decq %rax
movq %rax, 0x58(%rbx)
jne 0x1596
leaq 0x8(%rsp), %rdi
callq 0x1518
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x1140
leaq 0x8(%rsp), %rdi
callq 0x14c6
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xa72(%rip), %rdi       # 0x2021
leaq 0xa75(%rip), %rsi       # 0x202b
leaq 0xa78(%rip), %rcx       # 0x2035
movl $0x11, %edx
callq 0x1090
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x14c6
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/./include/phrase_map.hpp
// Function: show_indexes(PhraseMap&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void
show_indexes(PhraseMap &pm, std::string prefix) {
    pvpi_t nq = naive_query(pm, prefix);
    pvpi_t q  = pm.query(prefix);

    cout<<"naive[first] = "<<nq.first - pm.repr.begin()<<", naive[last] = "<<nq.second - pm.repr.begin()<<endl;
    cout<<"phmap[first] = "<<q.first - pm.repr.begin()<<", phmap[last] = "<<q.second - pm.repr.begin()<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xdebe
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65ca
movq %rax, %rbp
movq %rdx, %r13
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6736
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %r14, %rdx
callq 0xcb69
movq %rax, %r15
movq %rdx, %r14
movq 0x15876(%rip), %r12     # 0x1bfc8
leaq 0xe904(%rip), %rsi      # 0x1505d
movl $0xf, %edx
movq %r12, %rdi
callq 0x5590
subq (%rbx), %rbp
sarq $0x3, %rbp
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x5460
movq %rax, %rbp
leaq 0xe8dd(%rip), %rsi      # 0x1506d
movl $0x10, %edx
movq %rax, %rdi
callq 0x5590
subq (%rbx), %r13
sarq $0x3, %r13
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %r13
movq %rbp, %rdi
movq %r13, %rsi
callq 0x5460
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x5480
movsbl %al, %esi
movq %r13, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
leaq 0xe890(%rip), %rsi      # 0x1507e
movl $0xf, %edx
movq %r12, %rdi
callq 0x5590
subq (%rbx), %r15
sarq $0x3, %r15
movabsq $0x6db6db6db6db6db7, %r13 # imm = 0x6DB6DB6DB6DB6DB7
imulq %r13, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x5460
movq %rax, %r15
leaq 0xe869(%rip), %rsi      # 0x1508e
movl $0x10, %edx
movq %rax, %rdi
callq 0x5590
subq (%rbx), %r14
sarq $0x3, %r14
imulq %r13, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x5460
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x689b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
movq %rbx, %rdi
callq 0x58e0
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: get_qs(mg_request_info const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string
get_qs(const struct mg_request_info *request_info, std::string const& key) {
    char val[1024];
    std::string rv;

    val[1023] = val[0] = '\0';
    // printf("query string: %s\n", request_info->query_string);

    int val_len = 0;
    if (request_info->query_string) {
        val_len = mg_get_var(request_info->query_string, 
                             strlen(request_info->query_string), 
                             key.c_str(), val, 1023);
        rv = val;
    }
    return rv;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
movb %al, (%rsp)
movb %al, 0x3ff(%rsp)
movq 0x20(%rsi), %r15
testq %r15, %r15
je 0x8653
movq %rdx, %r14
movq %r15, %rdi
callq 0x5210
movq (%r14), %rdx
movq %rsp, %rcx
movl $0x3ff, %r8d            # imm = 0x3FF
movq %r15, %rdi
movq %rax, %rsi
callq 0xe99f
movq 0x8(%rbx), %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x5210
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x57f0
movq %rbx, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x867c
movq (%r12), %rsi
incq %rsi
callq 0x54c0
movq %r14, %rdi
callq 0x58e0
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: get_memory_usage(int)
int
get_memory_usage(pid_t pid) {
    char cbuff[4096];
    sprintf(cbuff, "pmap -x %d | tail -n +3 | awk 'BEGIN { S=0;T=0 } { if (match($3, /\\-/)) {S=1} if (S==0) {T+=$3} } END { print T }'", pid);
    FILE *pf = popen(cbuff, "r");
    if (!pf) {
        return -1;
    }
    int r = fread(cbuff, 1, 100, pf);
    if (r < 0) {
        fclose(pf);
        return -1;
    }
    cbuff[r-1] = '\0';
    r = atoi(cbuff);
    fclose(pf);
    return r;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movl %edi, %edx
leaq 0xcb3d(%rip), %rsi      # 0x151d3
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x50f0
leaq 0xe2d9(%rip), %rsi      # 0x16983
movq %rbx, %rdi
callq 0x5150
testq %rax, %rax
je 0x86f4
movq %rax, %rbx
movq %rsp, %rdi
movl $0x1, %esi
movl $0x64, %edx
movq %rax, %rcx
callq 0x5780
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x86ea
decl %eax
cltq
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
callq 0x5810
movl %eax, %ebp
movq %rbx, %rdi
callq 0x54a0
jmp 0x86f9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: escape_special_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void
escape_special_chars(std::string& str) {
    std::string ret;
    ret.reserve(str.size() + 10);
    for (size_t j = 0; j < str.size(); ++j) {
        switch (str[j]) {
        case '"':
            ret += "\\\"";
            break;

        case '\\':
            ret += "\\\\";
            break;

        case '\n':
            ret += "\\n";
            break;

        case '\t':
            ret += "\\t";
            break;

        default:
            ret += str[j];
        }
    }
    ret.swap(str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8(%rdi), %rsi
addq $0xa, %rsi
leaq 0x8(%rsp), %rdi
callq 0x5830
cmpq $0x0, 0x8(%rbx)
je 0x87d3
xorl %r12d, %r12d
leaq 0xcb19(%rip), %r13      # 0x15284
leaq 0xcb18(%rip), %r15      # 0x1528a
leaq 0x8(%rsp), %r14
leaq 0xcb09(%rip), %rbp      # 0x15287
movq (%rbx), %rax
movb (%rax,%r12), %al
movzbl %al, %ecx
cmpl $0x21, %ecx
jg 0x879c
cmpl $0x9, %ecx
je 0x87bb
cmpl $0xa, %ecx
jne 0x87ae
movq %r15, %rsi
jmp 0x87c2
movq %r13, %rsi
cmpl $0x22, %ecx
je 0x87c2
cmpl $0x5c, %ecx
jne 0x87ae
movq %rbp, %rsi
jmp 0x87c2
movsbl %al, %esi
movq %r14, %rdi
callq 0x53f0
jmp 0x87ca
leaq 0xcacb(%rip), %rsi      # 0x1528d
movq %r14, %rdi
callq 0x5990
incq %r12
cmpq 0x8(%rbx), %r12
jb 0x877e
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5320
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x87fd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x880e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x882d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
movq %rbx, %rdi
callq 0x58e0
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: show_usage(char**)
void
show_usage(char *argv[]) {
    printf("Usage: %s [OPTION]...\n", basename(argv[0]));
    printf("Start lib-face.\n\n");
    printf("Optional arguments:\n\n");
    printf("-h, --help           This screen\n");
    printf("-f, --file=PATH      Path of the file containing the phrases\n");
    printf("-p, --port=PORT      TCP port on which to start lib-face (default: 6767)\n");
    printf("-s, --sorted         If specified, the input file (PATH) is assumed to be sorted by phrase\n");
    printf("\n");
    printf("Please visit https://code.google.com/p/lib-face/ for more information.\n");
}

// Assembly:
pushq %rax
movq (%rdi), %rdi
callq 0x58d0
leaq 0xa773(%rip), %rdi      # 0x152e4
movq %rax, %rsi
xorl %eax, %eax
callq 0x5070
leaq 0xaa45(%rip), %rdi      # 0x155c7
callq 0x57e0
leaq 0xaa4a(%rip), %rdi      # 0x155d8
callq 0x57e0
leaq 0xaa53(%rip), %rdi      # 0x155ed
callq 0x57e0
leaq 0xaa68(%rip), %rdi      # 0x1560e
callq 0x57e0
leaq 0xaa99(%rip), %rdi      # 0x1564b
callq 0x57e0
leaq 0xaad6(%rip), %rdi      # 0x15694
callq 0x57e0
movl $0xa, %edi
callq 0x56a0
leaq 0xab1b(%rip), %rdi      # 0x156ef
popq %rax
jmp 0x57e0
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: parse_options(int, char**)
void
parse_options(int argc, char *argv[]) {
    int c;

    while (1) {
        int option_index = 0;
        static struct option long_options[] = {
            {"file", 1, 0, 'f'},
            {"port", 1, 0, 'p'},
            {"sorted", 0, 0, 's'},
            {"help", 0, 0, 'h'},
            {0, 0, 0, 0}
        };

        c = getopt_long(argc, argv, "f:p:sh",
                        long_options, &option_index);

        if (c == -1)
            break;

        switch (c) {
        case 0:
        case 'f':
            DCERR("File: "<<optarg<<endl);
            ac_file = optarg;
            break;

        case 'p':
            DCERR("Port: "<<optarg<<" ("<<atoi(optarg)<<")\n");
            port = optarg;
            break;

        case 's':
            DCERR("File is Sorted\n");
            ac_sorted = true;
            break;
          
        case 'h':
            opt_show_help = true;
            break;

        case '?':
            cerr<<"ERROR::Invalid option: "<<optopt<<endl;
            break;
        }
    }


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xa71b(%rip), %r14      # 0x1530c
leaq 0x11918(%rip), %r15     # 0x1c510
leaq 0x4(%rsp), %r12
movq 0x113a4(%rip), %r13     # 0x1bfa8
movl $0x0, 0x4(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x58a0
cmpl $0x67, %eax
jg 0xac35
cmpl $0x3e, %eax
jle 0xac55
cmpl $0x3f, %eax
je 0xac6a
cmpl $0x66, %eax
je 0xac5d
jmp 0xac04
cmpl $0x68, %eax
je 0xacdc
cmpl $0x70, %eax
je 0xace8
cmpl $0x73, %eax
jne 0xac04
movb $0x1, 0x11d7d(%rip)     # 0x1c9d0
jmp 0xac04
testl %eax, %eax
jne 0xacf8
movq (%r13), %rax
movq %rax, 0x11d70(%rip)     # 0x1c9d8
jmp 0xac04
movl $0x17, %edx
movq 0x1137a(%rip), %r12     # 0x1bff0
movq %r12, %rdi
leaq 0xa693(%rip), %rsi      # 0x15313
callq 0x5590
movq 0x11334(%rip), %rax     # 0x1bfc0
movl (%rax), %esi
movq %r12, %rdi
callq 0x58c0
movq %r15, %r12
movq %r14, %r15
movq %r13, %r14
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x5480
movsbl %al, %esi
movq %r13, %rdi
movq %r14, %r13
movq %r15, %r14
movq %r12, %r15
leaq 0x4(%rsp), %r12
callq 0x5040
movq %rax, %rdi
callq 0x5300
jmp 0xac04
movb $0x1, 0x11cee(%rip)     # 0x1c9d1
jmp 0xac04
movq (%r13), %rax
movq %rax, 0x1180d(%rip)     # 0x1c500
jmp 0xac04
cmpl $-0x1, %eax
jne 0xac04
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/./include/segtree.hpp
// Function: SegmentTree::initialize(std::vector<unsigned int, std::allocator<unsigned int>> const&)
void initialize(vui_t const& elems) {
        if (elems.empty()) {
            this->initialize(0);
        }
        else {
            this->initialize(elems.size());
            this->_init(0, 0, elems.size() - 1, elems);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
cmpq %rsi, %rax
je 0xbc32
subq %rax, %rsi
shrq $0x2, %rsi
movq %rbx, %rdi
callq 0xc580
movq 0x8(%r14), %rcx
subq (%r14), %rcx
shrq $0x2, %rcx
decl %ecx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc748
movl $0x0, 0x18(%rbx)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0xbc46
movq %rax, 0x8(%rbx)
movl $0x4, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc5b6
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/./include/sparsetable.hpp
// Function: SparseTable::query_max(unsigned int, unsigned int)
pui_t
    query_max(uint_t qf, uint_t ql) {
        if (qf >= this->len || ql >= this->len || ql < qf) {
            return make_pair(minus_one, minus_one);
        }

        const int rlen = ql - qf + 1;
        const size_t ti = log2(rlen);
        const size_t f = qf, l = ql + 1 - (1 << ti);

        // cerr<<"query_max("<<qf<<", "<<ql<<"), ti: "<<ti<<", f: "<<f<<", l: "<<l<<endl;
        if (this->repr[ti][f].first > this->repr[ti][l].first) {
            return this->repr[ti][f];
        }
        else {
            return this->repr[ti][l];
        }
    }

// Assembly:
movl %edx, %r8d
movq $-0x1, %rax
subl %esi, %r8d
jb 0xbee4
movl 0x18(%rdi), %ecx
cmpl %esi, %ecx
jbe 0xbee4
cmpl %edx, %ecx
jbe 0xbee4
incl %r8d
xorl %ecx, %ecx
cmpl $0x2, %r8d
jb 0xbeb9
xorl %ecx, %ecx
movl %r8d, %eax
shrl %eax
incl %ecx
cmpl $0x3, %r8d
movl %eax, %r8d
ja 0xbeac
movl %ecx, %eax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
shll %cl, %r8d
movl %esi, %ecx
addl %r8d, %edx
incl %edx
movq (%rdi), %rsi
leaq (%rax,%rax,2), %rax
movq (%rsi,%rax,8), %rax
movl (%rax,%rcx,8), %esi
cmpl (%rax,%rdx,8), %esi
cmovaq %rcx, %rdx
movq (%rax,%rdx,8), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: uint_to_string[abi:cxx11](unsigned int, unsigned int)
inline std::string
uint_to_string(uint_t n, uint_t pad = 0) {
    std::string ret;
    if (!n) {
        ret = "0";
    }
    else {
        while (n) {
            ret.insert(0, 1, ('0' + (n % 10)));
            n /= 10;
        }
    }
    while (pad && ret.size() < pad) {
        ret = "0" + ret;
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %esi, %esi
je 0xc353
movl %esi, %r14d
movl $0xcccccccd, %r15d      # imm = 0xCCCCCCCD
movl %r14d, %r13d
imulq %r15, %r13
shrq $0x23, %r13
leal (,%r13,2), %eax
leal (%rax,%rax,4), %eax
movl %r14d, %ecx
subl %eax, %ecx
orb $0x30, %cl
movzbl %cl, %ecx
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59d0
cmpl $0x9, %r14d
movl %r13d, %r14d
ja 0xc318
jmp 0xc36c
leaq 0x9b14(%rip), %rcx      # 0x15e6e
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57f0
testl %ebp, %ebp
je 0xc3c0
movl %ebp, %r13d
cmpq %r13, 0x8(%rbx)
jae 0xc3c0
leaq 0x18(%rsp), %rbp
leaq 0x9ae9(%rip), %r14      # 0x15e6e
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc25d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5620
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc3ba
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
cmpq %r13, 0x8(%rbx)
jb 0xc38a
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc3d6
jmp 0xc3d6
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xc3ed
movq (%r12), %rsi
incq %rsi
callq 0x54c0
movq %r14, %rdi
callq 0x58e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r13d
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movl %ecx, %r15d
subl %edx, %r15d
setb %al
cmpl %ecx, %r8d
seta %cl
cmpl %edx, %r9d
setb %dl
orb %al, %dl
orb %cl, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xc8c1
movl %r9d, %ebx
movl %r8d, %ebp
cmpl %r8d, %r12d
setb %al
cmpl %r9d, %r14d
seta %cl
orb %al, %cl
je 0xc8b4
shrl %r15d
leal (%r15,%r12), %ecx
leal 0x1(,%r13,2), %esi
movq %rdi, 0x10(%rsp)
movl %r12d, %edx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0xc7ec
movq %rax, 0x8(%rsp)
leal 0x2(,%r13,2), %esi
leal (%r15,%r12), %edx
incl %edx
movq 0x10(%rsp), %rdi
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0xc7ec
movq 0x8(%rsp), %rdx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
leaq -0x1(%rsi), %rcx
cmpq %rcx, %rdx
ja 0xc8be
cmpq %rcx, %rax
jbe 0xc8d5
andq %rdx, %rsi
movq %rdx, %rax
jmp 0xc8c1
movl %r13d, %eax
movq (%rdi), %rcx
movq (%rcx,%rax,8), %rax
andq %rax, %rsi
movl %eax, %eax
orq %rsi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %eax, %edx
cmovaq %rdx, %rax
jmp 0xc8be
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0xe05e(%rip), %rdi      # 0x1c5c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xe5b3
xorl %r15d, %r15d
leaq 0xe04a(%rip), %r12      # 0x1c5c0
movq %r14, %rsi
callq 0x56b0
testl %eax, %eax
je 0xe5a3
movq 0x8(%r12,%r15,8), %rdi
movq %r14, %rsi
callq 0x56b0
testl %eax, %eax
je 0xe5a3
movq 0x18(%r12,%r15,8), %rdi
addq $0x3, %r15
testq %rdi, %rdi
jne 0xe576
jmp 0xe5b3
movl %r15d, %eax
movl $0xaaaaaaab, %ebx       # imm = 0xAAAAAAAB
imulq %rax, %rbx
shrq $0x21, %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x4c(%rdi), %r15
testq %r15, %r15
jle 0xe633
movq %rsi, %rbx
movq %rdi, %r14
addq $0x50, %r14
callq 0x50e0
movq (%rax), %rcx
xorl %eax, %eax
xorl %edx, %edx
movq %rdx, %rdi
shlq $0x4, %rdi
leaq (%r14,%rdi), %rsi
movq (%r14,%rdi), %rdi
xorl %r8d, %r8d
movzbl (%rbx,%r8), %r11d
movl (%rcx,%r11,4), %r9d
movzbl (%rdi,%r8), %r10d
movl (%rcx,%r10,4), %r10d
testl %r11d, %r11d
je 0xe624
incq %r8
cmpl %r10d, %r9d
je 0xe605
cmpl %r10d, %r9d
je 0xe637
incq %rdx
cmpq %r15, %rdx
jne 0xe5f3
jmp 0xe63b
xorl %eax, %eax
jmp 0xe63b
movq 0x8(%rsi), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_read
int mg_read(struct mg_connection *conn, void *buf, size_t len) {
  int n, buffered_len, nread;
  const char *buffered;

  assert((conn->content_len == -1 && conn->consumed_content == 0) ||
         conn->consumed_content <= conn->content_len);
  DEBUG_TRACE(("%p %zu %lld %lld", buf, len,
               conn->content_len, conn->consumed_content));
  nread = 0;
  if (conn->consumed_content < conn->content_len) {

    // Adjust number of bytes to read.
    int64_t to_read = conn->content_len - conn->consumed_content;
    if (to_read < (int64_t) len) {
      len = (int) to_read;
    }

    // How many bytes of data we have buffered in the request buffer?
    buffered = conn->buf + conn->request_len + conn->consumed_content;
    buffered_len = conn->data_len - conn->request_len;
    assert(buffered_len >= 0);

    // Return buffered data back if we haven't done that yet.
    if (conn->consumed_content < (int64_t) buffered_len) {
      buffered_len -= (int) conn->consumed_content;
      if (len < (size_t) buffered_len) {
        buffered_len = len;
      }
      memcpy(buf, buffered, (size_t)buffered_len);
      len -= buffered_len;
      buf = (char *) buf + buffered_len;
      conn->consumed_content += buffered_len;
      nread = buffered_len;
    }

    // We have returned all buffered data. Read new data from the remote socket.
    while (len > 0) {
      n = pull(NULL, conn->client.sock, conn->ssl, (char *) buf, (int) len);
      if (n <= 0) {
        break;
      }
      buf = (char *) buf + n;
      conn->consumed_content += n;
      nread += n;
      len -= n;
    }
  }
  return nread;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x4b8(%rdi), %rcx
movq 0x4c0(%rdi), %rax
xorl %r12d, %r12d
subq %rax, %rcx
jle 0xe709
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rdx, %rcx
movslq %ecx, %r15
cmovgeq %rdx, %r15
movslq 0x4d4(%rdi), %rsi
movslq 0x4d8(%rdi), %rcx
subq %rsi, %rcx
xorl %r12d, %r12d
cmpq %rcx, %rax
jge 0xe6be
addq 0x4c8(%r14), %rsi
addq %rax, %rsi
subl %eax, %ecx
movslq %ecx, %r12
cmpq %r12, %r15
cmovbl %r15d, %r12d
movslq %r12d, %r13
movq %rbx, %rdi
movq %r13, %rdx
callq 0x53b0
subq %r13, %r15
addq %r13, %rbx
addq %r13, 0x4c0(%r14)
testq %r15, %r15
je 0xe709
movq 0x460(%r14), %rdi
testq %rdi, %rdi
je 0xe6dd
movq %rbx, %rsi
movl %r15d, %edx
callq *0xe13d(%rip)           # 0x1c818
jmp 0xe6f1
movl 0x470(%r14), %edi
movslq %r15d, %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x5180
testl %eax, %eax
jle 0xe709
movl %eax, %ecx
addq %rcx, 0x4c0(%r14)
addq %rcx, %rbx
addl %eax, %r12d
subq %rcx, %r15
jne 0xe6c3
movl %r12d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
testq %rdx, %rdx
je 0xe73a
movq 0xe0ec(%rip), %rax      # 0x1c818
movq %rdx, %rdi
movq %rbx, %rsi
movl %ebp, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
movq %rdi, %r14
testq %rdi, %rdi
je 0xe76e
movq %r14, %rdi
callq 0x54f0
movslq %ebp, %rdx
movl %eax, %edi
movq %rbx, %rsi
callq 0x5700
movq %rax, %rbx
movq %r14, %rdi
callq 0x5960
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl %ebx, %eax
jmp 0xe77d
movslq %ebp, %rdx
movl %esi, %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x5180
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
testq %r8, %r8
jle 0xe84c
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, 0x10(%rsp)
xorl %ebx, %ebx
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %r14, %rdx
subq %rbx, %rdx
cmpq %r13, %rdx
cmovgeq %r13, %rdx
testq %r12, %r12
je 0xe7ed
leaq (%r15,%rbx), %rsi
movq %r12, %rdi
callq *0xe03f(%rip)           # 0x1c828
movl %eax, %ebp
jmp 0xe83c
movq %r15, %r13
leaq (%r15,%rbx), %rax
movslq %edx, %rdx
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0xe822
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rcx
callq 0x59b0
movq %rax, %rbp
movq %r15, %rdi
callq 0x5960
testl %eax, %eax
je 0xe833
jmp 0xe84e
movl 0xc(%rsp), %edi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x5250
movq %rax, %rbp
movq %r13, %r15
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
testl %ebp, %ebp
js 0xe84e
movl %ebp, %eax
addq %rax, %rbx
cmpq %r14, %rbx
jl 0xe7ca
jmp 0xe84e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x20d8, %rsp           # imm = 0x20D8
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xe8c0
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r8
movq %rsi, 0x10(%r8)
leaq 0x20f0(%rsp), %rax
movq %rax, 0x8(%r8)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r8)
leaq 0xd0(%rsp), %r14
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rsi
movq %r10, %rcx
callq 0xe91d
movslq %eax, %r8
movl 0x470(%rbx), %esi
movq 0x460(%rbx), %rdx
xorl %edi, %edi
movq %r14, %rcx
callq 0xe799
addq $0x20d8, %rsp           # imm = 0x20D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xe974
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x52c0
testl %eax, %eax
js 0xe978
movl %eax, %ebp
cmpl %r14d, %eax
jl 0xe98b
movl $0xc8, %edx
cmpl %edx, %ebp
cmovbl %ebp, %edx
leaq 0x7188(%rip), %rsi      # 0x15ae7
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xfb6a
decl %r14d
movl %r14d, %ebp
jmp 0xe98b
xorl %ebp, %ebp
jmp 0xe992
leaq 0x7158(%rip), %rsi      # 0x15ad7
xorl %ebp, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0xfb6a
movslq %ebp, %rax
movb $0x0, (%rbx,%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movq %rdx, %rdi
callq 0x5210
movq %rax, %rbp
movb $0x0, (%r12)
testq %r14, %r14
setne %al
cmpq %r13, %rbp
setl %cl
andb %al, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x1, %cl
jne 0xea38
movq %r12, (%rsp)
movq %r15, 0x10(%rsp)
movq %r13, 0x8(%rsp)
leaq (%r14,%r13), %r15
leaq (%r14,%rbp), %r12
xorl %r13d, %r13d
testq %r13, %r13
je 0xea0a
cmpb $0x26, -0x1(%r14,%r13)
jne 0xea24
cmpb $0x3d, (%r12,%r13)
jne 0xea24
leaq (%r14,%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0xea9f
testl %eax, %eax
je 0xea47
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq %r15, %rax
jb 0xe9fd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r12,%r13), %rbx
incq %rbx
notq %rbp
addq 0x8(%rsp), %rbp
subq %r13, %rbp
movq %rbx, %rdi
movl $0x26, %esi
movq %rbp, %rdx
callq 0x5540
testq %rax, %rax
cmovneq %rax, %r15
notq %r12
addq %r15, %r12
subq %r13, %r12
movq 0x10(%rsp), %rcx
cmpq %rcx, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jae 0xea38
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
movl $0x1, %r8d
callq 0xeaed
jmp 0xea38
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdx, %rdx
je 0xeaea
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x50e0
movq (%rax), %rcx
decq %rbx
xorl %edx, %edx
movzbl (%r15,%rdx), %esi
movl (%rcx,%rsi,4), %eax
movzbl (%r14,%rdx), %edi
subl (%rcx,%rdi,4), %eax
jne 0xeae4
xorl %eax, %eax
testb %sil, %sil
je 0xeae4
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rbx
movq %rsi, %rdx
jne 0xeabf
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: url_decode
static size_t url_decode(const char *src, size_t src_len, char *dst,
                         size_t dst_len, int is_form_url_encoded) {
  size_t i, j;
  int a, b;
#define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W')

  for (i = j = 0; i < src_len && j < dst_len - 1; i++, j++) {
    if (src[i] == '%' &&
        isxdigit(* (const unsigned char *) (src + i + 1)) &&
        isxdigit(* (const unsigned char *) (src + i + 2))) {
      a = tolower(* (const unsigned char *) (src + i + 1));
      b = tolower(* (const unsigned char *) (src + i + 2));
      dst[j] = (char) ((HEXTOI(a) << 4) | HEXTOI(b));
      i += 2;
    } else if (is_form_url_encoded && src[i] == '+') {
      dst[j] = ' ';
    } else {
      dst[j] = src[i];
    }
  }

  dst[j] = '\0'; /* Null-terminate the destination */

  return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, 0x20(%rsp)
testq %rsi, %rsi
sete %al
decq %rcx
movq %rcx, 0x18(%rsp)
sete %cl
orb %al, %cl
jne 0xebe9
xorl %ebp, %ebp
xorl %r13d, %r13d
movb (%rdi,%rbp), %r15b
cmpb $0x25, %r15b
jne 0xebad
movq %rdi, %r12
callq 0x5520
movq %r12, %rdi
movq (%rax), %rbx
movzbl 0x1(%r12,%rbp), %r14d
testb $0x10, 0x1(%rbx,%r14,2)
je 0xebc6
movzbl 0x2(%rdi,%rbp), %eax
testb $0x10, 0x1(%rbx,%rax,2)
je 0xebc6
movq %rax, %r15
callq 0x50e0
movq %r12, %rdi
movq (%rax), %rax
movslq (%rax,%r14,4), %rcx
movslq (%rax,%r15,4), %rax
movzwl (%rbx,%rcx,2), %edx
xorl %esi, %esi
btl $0xb, %edx
setae %sil
leal (%rsi,%rsi,8), %edx
addl %ecx, %edx
shll $0x4, %edx
movzwl (%rbx,%rax,2), %ecx
leal 0xd0(%rax), %esi
addl $0xa9, %eax
btl $0xb, %ecx
cmovbl %esi, %eax
orl %edx, %eax
movq 0x8(%rsp), %rcx
movb %al, (%rcx,%r13)
addq $0x2, %rbp
jmp 0xebcf
cmpl $0x0, 0x14(%rsp)
je 0xebc6
cmpb $0x2b, %r15b
jne 0xebc6
movq 0x8(%rsp), %rax
movb $0x20, (%rax,%r13)
jmp 0xebcf
movq 0x8(%rsp), %rax
movb %r15b, (%rax,%r13)
incq %rbp
incq %r13
cmpq 0x20(%rsp), %rbp
jae 0xebec
cmpq 0x18(%rsp), %r13
jb 0xeb28
jmp 0xebec
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movb $0x0, (%rax,%r13)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movb $0x0, (%rdx)
addq $0x8, %rdi
leaq 0x6b3f(%rip), %rsi      # 0x1576c
callq 0xe5cf
testq %rax, %rax
je 0xecfb
movq %rax, %r14
movq %r12, (%rsp)
movq %r15, %rdi
callq 0x5210
movq %rax, %r13
movq %r14, %rdi
callq 0x5210
addq %r14, %rax
movq %rax, 0x10(%rsp)
movq %r13, %rax
shlq $0x20, %rax
movq %rax, 0x8(%rsp)
movslq %r13d, %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
movq %r15, %rsi
callq 0x5100
testq %rax, %rax
je 0xed43
movq %rax, %r13
leaq (%rax,%r12), %r14
cmpb $0x3d, (%rax,%r12)
jne 0xec71
movabsq $0x100000000, %rax      # imm = 0x100000000
movq 0x8(%rsp), %r14
addq %rax, %r14
sarq $0x20, %r14
movq %r13, %r15
addq %r14, %r15
movq %r15, %rdi
movl $0x20, %esi
callq 0x51e0
testq %rax, %rax
movq 0x10(%rsp), %rcx
cmovneq %rax, %rcx
leaq -0x1(%rcx), %rax
cmpb $0x3b, -0x1(%rcx)
cmovneq %rcx, %rax
cmpb $0x22, (%r13,%r14)
jne 0xecff
cmpb $0x22, -0x1(%rax)
movq (%rsp), %rsi
jne 0xed03
leaq -0x1(%rax), %rcx
leaq 0x1(%r15), %rdx
cmpq %rdx, %rax
cmovaq %rcx, %rax
cmovaq %rdx, %r15
jmp 0xed03
xorl %ebp, %ebp
jmp 0xed43
movq (%rsp), %rsi
subq %r15, %rax
cmpq %rsi, %rax
jae 0xed43
movl %eax, %ebp
incl %ebp
cmpl $0x2, %ebp
jb 0xed40
movb (%r15), %al
testb %al, %al
je 0xed40
movslq %ebp, %rcx
decq %rcx
incq %r15
movb %al, (%rbx)
incq %rbx
movb (%r15), %al
testb %al, %al
je 0xed40
leaq -0x1(%rcx), %rdx
incq %r15
cmpq $0x1, %rcx
movq %rdx, %rcx
ja 0xed24
movb $0x0, (%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movl $0x1, (%rdi)
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xf23d
xorl %edi, %edi
callq 0x5350
movl (%rbx), %eax
jmp 0xf22d
movq %rbx, %rdi
popq %rbx
jmp 0xf243
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0xf25e
callq 0x55d0
incq %r14
cmpq $0x18, %r14
jne 0xf250
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xf276
callq *0xd652(%rip)           # 0x1c8c8
movq 0xd763(%rip), %rdi      # 0x1c9e0
testq %rdi, %rdi
je 0xf287
callq 0x55d0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55d0
// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: cry
static void cry(struct mg_connection *conn, const char *fmt, ...) {
  char buf[BUFSIZ];
  va_list ap;
  FILE *fp;
  time_t timestamp;

  va_start(ap, fmt);
  (void) vsnprintf(buf, sizeof(buf), fmt, ap);
  va_end(ap);

  // Do not lock when getting the callback value, here and below.
  // I suppose this is fine, since function cannot disappear in the
  // same way string option can.
  conn->request_info.log_message = buf;
  if (call_user(conn, MG_EVENT_LOG) == NULL) {
    fp = conn->ctx->config[ERROR_LOG_FILE] == NULL ? NULL :
      mg_fopen(conn->ctx->config[ERROR_LOG_FILE], "a+");

    if (fp != NULL) {
      flockfile(fp);
      timestamp = time(NULL);

      (void) fprintf(fp,
          "[%010lu] [error] [client %s] ",
          (unsigned long) timestamp,
          inet_ntoa(conn->client.rsa.u.sin.sin_addr));

      if (conn->request_info.request_method != NULL) {
        (void) fprintf(fp, "%s %s: ",
            conn->request_info.request_method,
            conn->request_info.uri);
      }

      (void) fprintf(fp, "%s", buf);
      fputc('\n', fp);
      funlockfile(fp);
      if (fp != stderr) {
        fclose(fp);
      }
    }
  }
  conn->request_info.log_message = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20d0, %rsp           # imm = 0x20D0
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xfbcc
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0x20f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x2000, %esi           # imm = 0x2000
movq %r14, %rdi
movq %r10, %rdx
callq 0x52c0
movq %r14, 0x38(%rbx)
movq 0x458(%rbx), %rax
movq 0xc8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0xc0(%rax), %rcx
testq %rcx, %rcx
je 0xfc44
leaq 0x8(%rbx), %rdx
movl $0x2, %edi
movq %rbx, %rsi
callq *%rcx
testq %rax, %rax
jne 0xfcf4
movq 0x458(%rbx), %rax
movq 0x60(%rax), %rdi
testq %rdi, %rdi
je 0xfcf4
leaq 0x5b22(%rip), %rsi      # 0x1577a
callq 0x55c0
testq %rax, %rax
je 0xfcf4
movq %rax, %r14
movq %rax, %rdi
callq 0x51b0
xorl %edi, %edi
callq 0x5430
movq %rax, %r15
movl 0x490(%rbx), %edi
callq 0x5220
leaq 0x5e8f(%rip), %rsi      # 0x15b1c
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x56f0
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0xfcbb
movq 0x18(%rbx), %rcx
leaq 0x5e89(%rip), %rsi      # 0x15b3a
movq %r14, %rdi
xorl %eax, %eax
callq 0x56f0
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x5550
movl $0xa, %edi
movq %r14, %rsi
callq 0x5630
movq %r14, %rdi
callq 0x53c0
movq 0xc2e9(%rip), %rax      # 0x1bfd0
cmpq (%rax), %r14
je 0xfcf4
movq %r14, %rdi
callq 0x54a0
movq $0x0, 0x38(%rbx)
addq $0x20d0, %rsp           # imm = 0x20D0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x5600
movq %r12, %rdi
movl $0x1, %esi
callq 0x5650
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x5950
movl %eax, %ebx
testl %eax, %eax
je 0xfde2
movq %r14, 0xd087(%rip)      # 0x1ce40
leaq 0xcc28(%rip), %r14      # 0x1c9e8
movl %ebx, %edi
callq 0x51a0
leaq 0x5db1(%rip), %rsi      # 0x15b7f
leaq 0x6013(%rip), %rdx      # 0x15de8
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xfb6a
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %ebx
movq %rsi, %rdi
movl $0x1, %esi
callq 0x5690
testq %rax, %rax
je 0x11c86
movq (%r15), %rsi
testq %rsi, %rsi
je 0x11cdc
movq %rax, %r13
addq $0x10, %r15
movq %r13, %rdi
callq 0x5450
testq %rax, %rax
je 0x11cb0
movq %rax, -0x8(%r15)
movq (%r15), %rsi
addq $0x10, %r15
testq %rsi, %rsi
jne 0x11c67
jmp 0x11cdc
movq %r12, 0xb1b3(%rip)      # 0x1ce40
leaq 0xad54(%rip), %rdi      # 0x1c9e8
leaq 0x3f1a(%rip), %rsi      # 0x15bb5
leaq 0x3f26(%rip), %rdx      # 0x15bc8
xorl %ebx, %ebx
movq %r14, %rcx
xorl %eax, %eax
callq 0xfb6a
jmp 0x11cdc
movq %r12, 0xb189(%rip)      # 0x1ce40
leaq 0xad2a(%rip), %rdi      # 0x1c9e8
movq -0x10(%r15), %r8
leaq 0x3f08(%rip), %rsi      # 0x15bd1
leaq 0x3ef8(%rip), %rdx      # 0x15bc8
xorl %ebx, %ebx
movq %r14, %rcx
xorl %eax, %eax
callq 0xfb6a
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq