LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: CS::initHeader(unsigned char const*, unsigned long)
void CS::initHeader(const uint8_t *data, size_t data_len)
{
    pos_t pos = {0};
    char buf[1024], *tok;

    pos.data = data;
    pos.data_len = data_len;
    getLine(&pos, buf, sizeof(buf));

    // After the header are the symbols
    this->_hdr.syms_start = pos.off;

    // Load in the header: <cscope>
    tok = strtok(buf, " ");
    if (strncmp(tok, "cscope", strlen("cscope"))) {
        ERR("This does not appear to be a cscope database");
        return;
    }

    // Version
    this->_hdr.version = atoi(strtok(NULL, " "));

    // Directory
    this->_hdr.dir = strndup(strtok(NULL, " "), 1024);

    // Optionals: [-c] [-T] [-q <syms>]
    while ((tok = strtok(NULL, " "))) {
        if (tok[0] == '-' && strlen(tok) == 2) {
            if (tok[1] == 'c')
              this->_hdr.compression = true;
            else if (tok[1] == 'T')
              this->_hdr.prefix_match = true;
            else if (tok[1] == 'q')
              this->_hdr.inverted_index = true; // TODO
            else {
                ERR("Unrecognized header option");
                return;
            }
        }
        else {
            this->_hdr.trailer = atol(tok);
            break;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq %rdi, %rbx
movq %rsi, 0x10(%r14)
movq %rdx, 0x8(%r14)
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3233
movq (%r14), %rax
movq %rax, 0x8(%rbx)
leaq 0x2a8a(%rip), %rsi      # 0x52ce
movq %r15, %rdi
callq 0x22d0
leaq 0x2a98(%rip), %rsi      # 0x52eb
pushq $0x6
popq %rdx
movq %rax, %rdi
callq 0x2100
testl %eax, %eax
jne 0x2900
leaq 0x2a61(%rip), %r14      # 0x52ce
xorl %edi, %edi
movq %r14, %rsi
callq 0x22d0
movq %rax, %rdi
callq 0x22c0
movl %eax, (%rbx)
xorl %edi, %edi
movq %r14, %rsi
callq 0x22d0
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdi
callq 0x2060
movq %rax, 0x18(%rbx)
xorl %edi, %edi
movq %r14, %rsi
callq 0x22d0
testq %rax, %rax
je 0x28f3
movq %rax, %r15
cmpb $0x2d, (%rax)
jne 0x28e7
movq %r15, %rdi
callq 0x20d0
cmpq $0x2, %rax
jne 0x28e7
movzbl 0x1(%r15), %eax
cmpl $0x54, %eax
je 0x28db
cmpl $0x71, %eax
je 0x28e1
cmpl $0x63, %eax
jne 0x2929
movb $0x1, 0x4(%rbx)
jmp 0x289c
movb $0x1, 0x6(%rbx)
jmp 0x289c
movb $0x1, 0x5(%rbx)
jmp 0x289c
movq %r15, %rdi
callq 0x2220
movq %rax, 0x10(%rbx)
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r14
popq %r15
retq
movq 0x56d1(%rip), %rbx      # 0x7fd8
movq (%rbx), %rcx
leaq 0x29e1(%rip), %rdi      # 0x52f2
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x2350
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x2240
jmp 0x28f3
movq 0x56a8(%rip), %rbx      # 0x7fd8
movq (%rbx), %rcx
leaq 0x29e5(%rip), %rdi      # 0x531f
pushq $0x1a
jmp 0x2913
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: CS::initTrailer(unsigned char const*, unsigned long)
void CS::initTrailer(const uint8_t *data, size_t data_len)
{
    int i;
    char line[1024] = {0};
    pos_t pos = {0};

    pos.data = data;
    pos.data_len = data_len;
    pos.off = this->_hdr.trailer;

    if (!VALID(&pos))
      return;

    // Viewpaths
    getLine(&pos, line, sizeof(line));
    this->_trailer.n_viewpaths = atoi(line);
    for (i=0; i<this->_trailer.n_viewpaths; ++i) {
        getLine(&pos, line, sizeof(line));
        DBG("[%d of %d] Viewpath: %s", i+1, this->_trailer.n_viewpaths, line);
    }

    // Sources
    getLine(&pos, line, sizeof(line));
    this->_trailer.n_srcs = atoi(line);
    for (i=0; i<this->_trailer.n_srcs; ++i) {
        getLine(&pos, line, sizeof(line));
        DBG("[%d of %d] Sources: %s", i+1, this->_trailer.n_srcs, line);
    }

    // Includes
    getLine(&pos, line, sizeof(line));
    this->_trailer.n_incs = atoi(line);
    getLine(&pos, line, sizeof(line));
    for (i=0; i<this->_trailer.n_incs; ++i) {
        getLine(&pos, line, sizeof(line));
        DBG("[%d of %d] Includes: %s", i+1, this->_trailer.n_incs, line);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
xorl %r12d, %r12d
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2140
movq %r15, 0x18(%rsp)
movq %r14, 0x10(%rsp)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rsp)
cmpq %r14, %rax
jbe 0x2992
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3233
movq %r15, %rdi
callq 0x22c0
movl %eax, %ebp
movl %eax, 0x20(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3233
cmpl %ebp, %r12d
jge 0x29cc
incl %r12d
movl 0x20(%rbx), %ebp
jmp 0x29b4
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x22c0
movl %eax, %ebp
movl %eax, 0x30(%rbx)
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3233
cmpl %ebp, %r12d
jge 0x29fe
incl %r12d
movl 0x30(%rbx), %ebp
jmp 0x29e6
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x22c0
movl %eax, 0x40(%rbx)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3233
xorl %ebp, %ebp
cmpl 0x40(%rbx), %ebp
jge 0x2982
movq %r15, %rdi
movq %r14, %rsi
callq 0x3233
incl %ebp
jmp 0x2a20
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: CS::buildDatabase[abi:cxx11]()
CSDB *CS::buildDatabase()
{
    int i = 0, sidx = 0;
    const char spin[] = "-\\|/";
    auto db = new CSDB;

    cout << "Building internal database: ";
    for (auto f: this->_files) {
        for (auto fndef_pr: *f->getFunctions()) {
            // Collect all calls this function (fndef) makes
            std::vector<const CSFuncCall *> callees;
            auto fndef = static_cast<const CSFuncDef *>(fndef_pr.second);
            fndef->getCallees(callees);

            // Add the funtion_def : calleess map entry
            auto pr = std::make_pair(fndef->getName(), callees);
            db->insert(pr);
            if ((++i % 1000) == 0)
              cout << '\b' << spin[sidx++ % 4] << std::flush;
        }
    }

    cout << '\b' << " Done " << endl;
    return db;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
pushq $0x38
popq %rdi
callq 0x21d0
leaq 0x30(%rax), %rcx
movq %rcx, (%rax)
movq $0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl $0x3f800000, 0x20(%rax) # imm = 0x3F800000
movq %rax, 0x8(%rsp)
movups %xmm0, 0x28(%rax)
movq 0x528f(%rip), %rdi      # 0x7fd0
leaq 0x2517(%rip), %rsi      # 0x525f
callq 0x21b0
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
movq %rcx, 0x28(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x38(%rsp), %r15
leaq 0x60(%rsp), %r13
leaq 0x80(%rsp), %r14
xorl %ebx, %ebx
cmpq 0x28(%rsp), %rax
je 0x2e74
movq %rax, 0x30(%rsp)
movq (%rax), %rbp
addq $0x38, %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x2e66
leaq 0x8(%rbp), %rsi
movq %r15, %r12
movq %r15, %rdi
callq 0x32ca
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x32ea
movq (%r15), %rax
movq %r13, %rdi
movq %r15, %rsi
callq *(%rax)
movq %r14, %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
callq 0x353e
movq %r13, %rdi
callq 0x20f0
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x44a6
movq %r12, %r15
incl %ebx
movl %ebx, %eax
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
testl %edx, %edx
jne 0x2e47
movq 0x51bd(%rip), %rdi      # 0x7fd0
pushq $0x8
popq %rsi
callq 0x2200
movq %rax, %rdi
movl 0x4(%rsp), %eax
cltd
pushq $0x4
popq %rcx
idivl %ecx
movslq %edx, %rax
leaq 0x2428(%rip), %rcx      # 0x525a
movsbl (%rax,%rcx), %esi
callq 0x2200
movq %rax, %rdi
callq 0x2160
incl 0x4(%rsp)
movq %r14, %rdi
callq 0x3360
leaq 0x10(%rsp), %rdi
callq 0x35c2
movq %r15, %rdi
callq 0x20f0
jmp 0x2d8d
movq 0x30(%rsp), %rax
addq $0x8, %rax
jmp 0x2d76
movq 0x5155(%rip), %rdi      # 0x7fd0
pushq $0x8
popq %rsi
callq 0x2200
leaq 0x23f2(%rip), %rsi      # 0x527c
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x2110
movq 0x8(%rsp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eb3
movq %rax, %rbx
jmp 0x2ed7
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x20f0
jmp 0x2ed7
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3360
leaq 0x10(%rsp), %rdi
callq 0x35c2
leaq 0x38(%rsp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: csPrintCallers(_IO_FILE*, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>>>>*, char const*, int)
void csPrintCallers(FILE *out, CSDB *db, const char *fn_name, int depth)
{
    cout << "Building callers... " << std::flush;
    fprintf(out, "digraph \"Callers to %s\" {\n", fn_name);
    printCallersRec(out, db, fn_name, depth);
    fprintf(out, "}\n");
    cout << "Done" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x50c3(%rip), %rbx      # 0x7fd0
leaq 0x236f(%rip), %rsi      # 0x5283
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x2160
leaq 0x236d(%rip), %rsi      # 0x5298
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2290
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2f7c
leaq 0x2364(%rip), %rdi      # 0x52b3
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x2350
leaq 0x2352(%rip), %rsi      # 0x52b6
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: printCallersRec(_IO_FILE*, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>>>>*, char const*, int)
static void printCallersRec(
    FILE       *out,
    CSDB       *db,
    const char *fn_name,
    int         depth)
{
    if (depth <= 0)
      return;

    for (auto pr: *db) {
        const char *item = pr.first.c_str();
        // Does 'item' call 'fn_name' ?
        if (isCallerOf(db, item, fn_name)) {
            fprintf(out, "    %s -> %s\n", item, fn_name);
            printCallersRec(out, db, item, depth - 1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movl %ecx, 0x4(%rsp)
testl %ecx, %ecx
jle 0x3083
movq %rdx, %r14
movq 0x8(%rsp), %rax
leaq 0x10(%rax), %r13
decl 0x4(%rsp)
leaq 0x40(%rsp), %rbx
leaq 0x20(%rsp), %rbp
movq (%r13), %r13
testq %r13, %r13
je 0x3083
leaq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0x3606
movq 0x40(%rsp), %rsi
movq %rbp, %rdi
movq %rsi, 0x18(%rsp)
leaq 0x3(%rsp), %rdx
callq 0x3656
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x3692
movq %rax, %r12
movq %rbp, %rdi
callq 0x20f0
movq (%r12), %r15
movq 0x8(%r12), %rbx
cmpq %rbx, %r15
je 0x3071
movq (%r15), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
callq *(%rax)
movq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x2280
movl %eax, %r12d
movq %rbp, %rdi
callq 0x20f0
addq $0x8, %r15
testl %r12d, %r12d
jne 0x300b
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2333(%rip), %rsi      # 0x537e
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2290
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
callq 0x2f7c
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x3640
jmp 0x2fba
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20f0
jmp 0x30a6
jmp 0x30a3
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3640
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: csPrintCallees(_IO_FILE*, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>>>>*, char const*, int)
void csPrintCallees(FILE *out, CSDB *db, const char *fn_name, int depth)
{
    cout << "Building callees... " << std::flush;
    fprintf(out, "digraph \"Callees of %s\" {\n", fn_name);
    printCalleesRec(out, db, fn_name, depth);
    fprintf(out, "}\n");
    cout << "Done" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x4efe(%rip), %rbx      # 0x7fd0
leaq 0x21e2(%rip), %rsi      # 0x52bb
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x2160
leaq 0x21e0(%rip), %rsi      # 0x52d0
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2290
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x3141
leaq 0x219f(%rip), %rdi      # 0x52b3
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x2350
leaq 0x218d(%rip), %rsi      # 0x52b6
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: printCalleesRec(_IO_FILE*, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<CSFuncCall const*, std::allocator<CSFuncCall const*>>>>>*, char const*, int)
static void printCalleesRec(
    FILE       *out,
    CSDB       *db,
    const char *fn_name,
    int         depth)
{
    if (depth <= 0)
      return;

    for (auto callee: (*db)[fn_name]) {
        fprintf(out, "    %s -> %s\n", fn_name, callee->getName().c_str());
        printCalleesRec(out, db, callee->getName().c_str(), depth - 1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
testl %ecx, %ecx
jle 0x3208
movl %ecx, %ebx
movq %rdi, %r12
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq 0x10(%rsp), %rsi
callq 0x3656
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x3692
movq %rax, %rbp
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x20f0
movq (%rbp), %r14
movq 0x8(%rbp), %r15
decl %ebx
cmpq %r15, %r14
je 0x3208
movq (%r14), %rbp
movq (%rbp), %rax
movq %r13, %rdi
movq %rbp, %rsi
callq *(%rax)
movq 0x18(%rsp), %rcx
movq %r12, %rdi
leaq 0x21b8(%rip), %rsi      # 0x537e
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x2290
movq %r13, %rdi
callq 0x20f0
movq (%rbp), %rax
movq %r13, %rdi
movq %rbp, %rsi
callq *(%rax)
movq 0x18(%rsp), %rdx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %ecx
callq 0x3141
movq %r13, %rdi
callq 0x20f0
addq $0x8, %r14
jmp 0x31a3
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x321e
movq %rax, %rbx
jmp 0x322b
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/enferex[P]fnplot/cs.cc
// Function: getLine(pos_t*, char*, unsigned long)
static void getLine(pos_t *pos, char *buf, size_t buf_len)
{
    size_t len, st = pos->off;

    // Get initial line (header line)
    while (CH(pos) != EOF && CH(pos) != '\n')
      ++pos->off;

    len = pos->off - st; // Don't return the '\n'
    ++pos->off;          // +1 to advance to the '\n'
    if (END(pos) || len > buf_len)
      return;

    memcpy(buf, pos->data + st, len);
    buf[len] = '\0';
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
leaq 0x1(%rsi), %rcx
xorl %r14d, %r14d
leaq (%rsi,%r14), %rdx
cmpq %rax, %rdx
ja 0x326b
movq 0x10(%rdi), %rdx
addq %rsi, %rdx
cmpb $0xa, (%r14,%rdx)
je 0x326b
leaq (%rcx,%r14), %rdx
movq %rdx, (%rdi)
incq %r14
jmp 0x3248
leaq (%rsi,%r14), %rcx
incq %rcx
movq %rcx, (%rdi)
cmpq %rax, %rcx
setae %al
cmpq $0x401, %r14            # imm = 0x401
setae %cl
orb %al, %cl
jne 0x329d
addq 0x10(%rdi), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2190
movb $0x0, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::parse()
void TodoList::parse() {
  tasks.clear();

  std::ifstream ifs(path.c_str());

  if (!ifs.good()) {
    std::cerr << "Fatal: Can't open " << path.c_str() << "." << std::endl;
    exit(1);
  }

  while (ifs.good()) {
    std::string line = "";
    getline(ifs, line);

    if (line != "") {
      int taskno = atoi(line.c_str());
      std::string::size_type taskdesc = line.find_first_not_of("1234567890. ");
      if (taskdesc == std::string::npos) continue;
      tasks[taskno] = std::string(line, taskdesc); 
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
callq 0x3b18
movq 0x30(%rbx), %rsi
leaq 0x50(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x2330
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x70(%rsp,%rax)
jne 0x2cf5
leaq 0x1535(%rip), %r14      # 0x415b
leaq 0x10(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
leaq 0x1513(%rip), %rbp      # 0x414f
cmpl $0x0, 0x70(%rsp,%rax)
jne 0x2cd9
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2a00
movq %r13, %rdi
movq %r15, %rsi
callq 0x2050
movq %r15, %rdi
movq %r14, %rsi
callq 0x32ba
testb %al, %al
je 0x2cc3
movq 0x10(%rsp), %rdi
callq 0x22c0
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x2110
cmpq $-0x1, %rax
je 0x2cc3
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
leaq 0xb(%rsp), %rcx
callq 0x21e0
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
callq 0x326c
movq %rax, %rdi
movq %r12, %rsi
callq 0x2240
movq %r12, %rdi
callq 0x20d0
movq %r15, %rdi
callq 0x20d0
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
jmp 0x2c3c
leaq 0x50(%rsp), %rdi
callq 0x2070
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x42f4(%rip), %rdi      # 0x6ff0
leaq 0x14f4(%rip), %rsi      # 0x41f7
callq 0x21b0
movq 0x30(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
leaq 0x139b(%rip), %rsi      # 0x40b6
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20e0
pushq $0x1
popq %rdi
callq 0x2220
jmp 0x2d46
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20d0
jmp 0x2d4e
jmp 0x2d4b
movq %rax, %rbx
jmp 0x2d58
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void TodoList::add(std::string task) {
  if (task.find_first_not_of("1234567890. ") == std::string::npos) return;

  std::cout << "Added #" << first_unset() << ": " << task << std::endl;
  tasks.insert(std::make_pair(first_unset(), task));
  write();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x13cf(%rip), %rsi      # 0x414f
movq %r14, %rdi
xorl %edx, %edx
callq 0x2110
cmpq $-0x1, %rax
je 0x2e17
movq 0x4235(%rip), %rdi      # 0x6fd0
leaq 0x142e(%rip), %rsi      # 0x41d0
callq 0x21b0
movq %rax, %r15
movq %rbx, %rdi
callq 0x2e34
movq %r15, %rdi
movl %eax, %esi
callq 0x2300
leaq 0x1415(%rip), %rsi      # 0x41d8
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21a0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2e34
leaq 0x10(%rsp), %r15
movl %eax, -0x8(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2270
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36a4
movq %r15, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2e9a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::first_unset()
int TodoList::first_unset() {
  if (tasks.size()) {
    for (int i = 1; i < tasks.rbegin()->first; i++) {
      if (!tasks.count(i)) return i;
    }
    return tasks.rbegin()->first + 1;
  } else {
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x28(%rdi)
je 0x2e7a
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
pushq $0x1
popq %rbp
leaq 0x4(%rsp), %r15
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
callq 0x21f0
cmpl 0x20(%rax), %ebp
jge 0x2e7f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3252
movl 0x4(%rsp), %ebp
testq %rax, %rax
je 0x2e8c
incl %ebp
jmp 0x2e51
pushq $0x1
popq %rbp
jmp 0x2e8c
movq %r14, %rdi
callq 0x21f0
movl 0x20(%rax), %ebp
incl %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::write()
void TodoList::write() {
  std::ofstream ofs(path.c_str());

  tmap::iterator it;

  for (it = tasks.begin(); it != tasks.end(); ++it) {
    ofs << get(it->first) << std::endl;
  }

  ofs.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rdi, %rbx
movq 0x30(%rdi), %rsi
leaq 0x20(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x2200
movq 0x18(%rbx), %r12
leaq 0x8(%rbx), %r13
movq %rsp, %r15
cmpq %r13, %r12
je 0x2f09
movl 0x20(%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x301a
movq %r14, %rdi
movq %r15, %rsi
callq 0x21a0
movq %rax, %rdi
callq 0x20e0
movq %r15, %rdi
callq 0x20d0
movq %r12, %rdi
callq 0x2140
movq %rax, %r12
jmp 0x2ecc
leaq 0x20(%rsp), %rdi
callq 0x2280
leaq 0x20(%rsp), %rdi
callq 0x22a0
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2f30
movq %rax, %rbx
jmp 0x2f40
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::erase(int)
void TodoList::erase(int num) {
  if (tasks.count(num)) {
    std::cout << "Erased #" << num << ": " << tasks[num] << std::endl;
    tasks.erase(num);
    write();
  } else {
    std::cerr << "There is no task #" << num << "." << std::endl;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
movq %rax, %rsi
callq 0x3252
testq %rax, %rax
je 0x2fda
movq 0x4057(%rip), %rdi      # 0x6fd0
leaq 0x125b(%rip), %rsi      # 0x41db
callq 0x21b0
leaq 0xc(%rsp), %r14
movl (%r14), %esi
movq %rax, %rdi
callq 0x2300
leaq 0x123c(%rip), %rsi      # 0x41d8
movq %rax, %rdi
callq 0x21b0
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x326c
movq %r15, %rdi
movq %rax, %rsi
callq 0x21a0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39e6
movq %rbx, %rdi
callq 0x2e9a
jmp 0x3010
movq 0x400f(%rip), %rdi      # 0x6ff0
leaq 0x11fc(%rip), %rsi      # 0x41e4
callq 0x21b0
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x2300
leaq 0x10b6(%rip), %rsi      # 0x40b6
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::get[abi:cxx11](int)
std::string TodoList::get(int num) {
  std::ostringstream oss;
  oss << num;
  oss << ". ";
  oss << tasks[num];
  return oss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2260
movq %r15, %rdi
movl %ebp, %esi
callq 0x2300
leaq 0x1108(%rip), %rsi      # 0x4159
leaq 0x10(%rsp), %rdi
callq 0x21b0
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x326c
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x21a0
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x22e0
leaq 0x10(%rsp), %rdi
callq 0x2060
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::reorder()
void TodoList::reorder() {
  int i = 1;
  tmap tnew;
  tmap::iterator it;

  for (it = tasks.begin(); it != tasks.end(); ++it) {
    tnew[i] = it->second;
    i++;
  }

  tasks = tnew;
  write();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
leaq 0x18(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movl $0x1, (%r14)
movq 0x18(%rdi), %r12
leaq 0x8(%rdi), %r13
leaq 0x10(%rsp), %r15
cmpq %r13, %r12
je 0x31a9
movq %r15, %rdi
movq %r14, %rsi
callq 0x326c
leaq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x2100
incl 0xc(%rsp)
movq %r12, %rdi
callq 0x2140
movq %rax, %r12
jmp 0x317b
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x333a
movq %rbx, %rdi
callq 0x2e9a
leaq 0x10(%rsp), %rdi
callq 0x2844
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x31d8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2844
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/util.cpp
// Function: XConfigureWindowValueMaskToString[abi:cxx11](unsigned long)
std::string XConfigureWindowValueMaskToString(unsigned long value_mask)
{
    std::vector<std::string> masks;
    if (value_mask & CWX) {
        masks.emplace_back("X");
    }
    if (value_mask & CWY) {
        masks.emplace_back("Y");
    }
    if (value_mask & CWWidth) {
        masks.emplace_back("Width");
    }
    if (value_mask & CWHeight) {
        masks.emplace_back("Height");
    }
    if (value_mask & CWBorderWidth) {
        masks.emplace_back("BorderWidth");
    }
    if (value_mask & CWSibling) {
        masks.emplace_back("Sibling");
    }
    if (value_mask & CWStackMode) {
        masks.emplace_back("StackMode");
    }
    return Join(masks, "|");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
testb $0x1, %r14b
je 0x3219
leaq 0x530c(%rip), %rsi      # 0x851b
leaq 0x10(%rsp), %rdi
callq 0x38e6
testb $0x2, %r14b
je 0x3230
leaq 0x52f7(%rip), %rsi      # 0x851d
leaq 0x10(%rsp), %rdi
callq 0x38e6
testb $0x4, %r14b
je 0x3247
leaq 0x52ef(%rip), %rsi      # 0x852c
leaq 0x10(%rsp), %rdi
callq 0x3920
testb $0x8, %r14b
je 0x325e
leaq 0x52cb(%rip), %rsi      # 0x851f
leaq 0x10(%rsp), %rdi
callq 0x395a
testb $0x10, %r14b
je 0x3275
leaq 0x52bb(%rip), %rsi      # 0x8526
leaq 0x10(%rsp), %rdi
callq 0x3994
testb $0x20, %r14b
je 0x328c
leaq 0x52b0(%rip), %rsi      # 0x8532
leaq 0x10(%rsp), %rdi
callq 0x39ce
testb $0x40, %r14b
je 0x32a3
leaq 0x52a1(%rip), %rsi      # 0x853a
leaq 0x10(%rsp), %rdi
callq 0x3a08
leaq 0x529a(%rip), %rsi      # 0x8544
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3888
leaq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x3a41
leaq 0x28(%rsp), %rdi
callq 0x20d0
leaq 0x10(%rsp), %rdi
callq 0x3ad4
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20d0
jmp 0x32fe
jmp 0x32fb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3ad4
movq %rbx, %rdi
callq 0x2420
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/./util.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> Join<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
::std::string Join(const Container& container, const ::std::string& delimiter)
{
    ::std::ostringstream out;
    for (auto i = container.cbegin(); i != container.cend(); ++i) {
        if (i != container.cbegin()) {
            out << delimiter;
        }
        out << *i;
    }
    return out.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x22f0
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0x3a91
cmpq (%r15), %r13
je 0x3a80
movq %r12, %rdi
movq %r14, %rsi
callq 0x21e0
movq %r12, %rdi
movq %r13, %rsi
callq 0x21e0
addq $0x20, %r13
jmp 0x3a6a
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x23c0
leaq 0x8(%rsp), %rdi
callq 0x2040
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3abe
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2420
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: Node::split_node(unsigned long)
std::tuple<Node*, Node*> Node::split_node(Window new_window)
{
    Node* left_child = new Node();
    Node* right_child = new Node();

    left_child->set_window(this->window);
    right_child->set_window(new_window);

    int split_width = this->width, split_height = this->height;
    int split_x = this->x, split_y = this->y;
    if (this->width >= this->height) {
        split_width /= 2;
        split_x += split_width;
        left_child->set_dimensions(split_width, this->height, this->x, this->y);
        right_child->set_dimensions(this->width - split_width, this->height, split_x, this->y);
    } else if (this->width < this->height) {
        split_height /= 2;
        split_y += split_height;
        left_child->set_dimensions(this->width, split_height, this->x, this->y);
        right_child->set_dimensions(this->width, this->height - split_height, this->x, split_y);
    }

    set_children(left_child, right_child);

    return std::make_tuple(left_child, right_child);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x28
popq %r13
movq %r13, %rdi
callq 0x2210
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq %r13, %rdi
callq 0x2210
movq %rax, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
movq %r12, 0x10(%rcx)
movl (%r14), %esi
movl 0x4(%r14), %edi
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
pushq $0x2
popq %r10
cmpl %edi, %esi
jge 0x53ba
movl %edi, %eax
cltd
idivl %r10d
movl %edi, %r10d
leal (%r9,%rax), %ebp
subl %eax, %r10d
movl %eax, %edi
movl %esi, %edx
movl %r8d, %r11d
jmp 0x53d0
movl %esi, %eax
cltd
idivl %r10d
movl %esi, %edx
leal (%r8,%rax), %r11d
subl %eax, %edx
movl %eax, %esi
movl %edi, %r10d
movl %r9d, %ebp
movl %esi, (%r15)
movl %edi, 0x4(%r15)
movl %r8d, 0x8(%r15)
movl %r9d, 0xc(%r15)
movl %edx, (%rcx)
movl %r10d, 0x4(%rcx)
movl %r11d, 0x8(%rcx)
movl %ebp, 0xc(%rcx)
movq %r15, 0x18(%r14)
movq %rcx, 0x20(%r14)
movq %rcx, (%rbx)
movq %r15, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::init_root(unsigned long, int, int, int, int)
std::tuple<Node*, Node*> BSP::init_root(Window w, int width, int height, int x, int y)
{
    root = new Node();
    root->set_window(w);
    root->set_dimensions(width, height, x, y);
    return std::make_tuple(nullptr, root);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
pushq $0x28
popq %rdi
callq 0x2210
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq %rax, (%r12)
movq %r15, 0x10(%rax)
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
movl %ebx, 0x8(%rax)
movl 0x40(%rsp), %ecx
movl %ecx, 0xc(%rax)
movq %rax, (%r13)
andq $0x0, 0x8(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::find_node(unsigned long)
Node* BSP::find_node(Window w)
{
    if (root == nullptr) {
        std::cout << "No root window present\n";
    }
    Node* res = find_node_util(w, root);
    if (res == nullptr) {
        std::cout << "Window not found\n";
    }
    return res;
}

// Assembly:
pushq %rbx
movq (%rdi), %rdx
testq %rdx, %rdx
jne 0x54be
movq %rdi, %rbx
movq 0x8b29(%rip), %rdi      # 0xdfd8
leaq 0x379f(%rip), %rsi      # 0x8c55
callq 0x2200
movq (%rbx), %rdx
callq 0x5474
movq %rax, %rbx
testq %rax, %rax
jne 0x54de
movq 0x8b06(%rip), %rdi      # 0xdfd8
leaq 0x37e4(%rip), %rsi      # 0x8cbd
callq 0x2200
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::create_node(unsigned long)
std::tuple<Node*, Node*> BSP::create_node(Window w)
{
    Node* current = find_node(w);
    if (current == nullptr) {
        std::cout << "Cannot create new window\n";
        return std::make_tuple(nullptr, nullptr);
    } else {
        return current->split_node(w);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x549c
testq %rax, %rax
je 0x550b
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x5342
jmp 0x5524
movq 0x8ac6(%rip), %rdi      # 0xdfd8
leaq 0x3754(%rip), %rsi      # 0x8c6d
callq 0x2200
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::find_to_delete_node(unsigned long, Node*)
std::tuple<Node*, Node*> BSP::find_to_delete_node(Window w, Node* current)
{
    if (current == nullptr) {
        std::cout << "Node to delete not found.\n";
        return std::make_tuple(nullptr, nullptr);
    }

    if (current->is_leaf() && current == root && current->get_window() == w) {
        return std::make_tuple(current, nullptr);
    }

    if (current->is_leaf() == false && current->get_left_child()->is_leaf()
        && current->get_left_child()->get_window() == w) {
        return std::make_tuple(current->get_left_child(), current);
    } else if (current->is_leaf() == false && current->get_right_child()->is_leaf()
        && current->get_right_child()->get_window() == w) {
        return std::make_tuple(current->get_right_child(), current);
    } else {
        Node* foundWindow;
        Node* foundParentWindow;
        std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, current->get_right_child());
        if (foundWindow == nullptr && foundParentWindow == nullptr) {
            std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, current->get_left_child());
        }
        return std::make_tuple(foundWindow, foundParentWindow);
    }
    return std::make_tuple(nullptr, nullptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testq %rcx, %rcx
je 0x5577
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movq %rcx, %rdx
orq %rax, %rdx
jne 0x5592
cmpq %r14, (%r12)
jne 0x55c0
cmpq %r15, 0x10(%r14)
jne 0x55c0
andq $0x0, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x5604
movq 0x8a5a(%rip), %rdi      # 0xdfd8
leaq 0x3702(%rip), %rsi      # 0x8c87
callq 0x2200
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x5604
movq 0x20(%rax), %rdx
orq 0x18(%rax), %rdx
jne 0x55ab
cmpq %r15, 0x10(%rax)
jne 0x55ab
movq %r14, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x5604
movq 0x20(%rcx), %rax
orq 0x18(%rcx), %rax
jne 0x55c0
cmpq %r15, 0x10(%rcx)
jne 0x55c0
movq %r14, (%rbx)
jmp 0x5600
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x5530
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rax, %rdx
orq %rcx, %rdx
jne 0x55fd
movq 0x18(%r14), %rcx
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x5530
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::delete_node(unsigned long)
std::tuple<Node*, Node*> BSP::delete_node(Window w)
{
    Node* foundWindow;
    Node* foundParentWindow;
    std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, root);

    if (foundWindow == nullptr && foundParentWindow == nullptr) {
        std::cout << "No node found :((.\n";
        return std::make_tuple(nullptr, nullptr);
    } else if (foundWindow != nullptr && foundParentWindow == nullptr) {
        delete root;
        root = nullptr;
        return std::make_tuple(nullptr, nullptr);
    } else {
        if (foundWindow == foundParentWindow->get_left_child()) {
            delete foundWindow;
            foundParentWindow = foundParentWindow->get_right_child();
        } else if (foundWindow == foundParentWindow->get_right_child()) {
            delete foundWindow;
            foundParentWindow = foundParentWindow->get_left_child();
        }
    }

    return std::make_tuple(nullptr, nullptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rcx
movq %rsp, %r15
movq %r15, %rdi
callq 0x5530
movq (%r15), %rax
movq 0x8(%r15), %rdi
movq %rdi, %rcx
orq %rax, %rcx
jne 0x5657
movq 0x898f(%rip), %rdi      # 0xdfd8
leaq 0x3652(%rip), %rsi      # 0x8ca2
callq 0x2200
jmp 0x568f
testq %rax, %rax
sete %cl
testq %rdi, %rdi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x567b
movq (%r14), %rdi
pushq $0x28
popq %rsi
callq 0x2230
andq $0x0, (%r14)
jmp 0x568f
cmpq 0x18(%rax), %rdi
je 0x5687
cmpq 0x20(%rax), %rdi
jne 0x568f
pushq $0x28
popq %rsi
callq 0x2230
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::display_tree_util(Node*)
void BSP::display_tree_util(Node* current)
{
    if (current->get_left_child() != nullptr) {
        display_tree_util(current->get_left_child());
    }
    if (current->get_right_child() != nullptr) {
        display_tree_util(current->get_right_child());
    }
    current->print();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rsi
testq %rsi, %rsi
je 0x56bd
movq %r14, %rdi
callq 0x56a2
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x56ce
movq %r14, %rdi
callq 0x56a2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x52be
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/master_stack.cpp
// Function: MasterStack::erase(unsigned long)
void MasterStack::erase(Window w)
{
    std::vector<Window>::iterator pos = find(stack.begin(), stack.end(), w);
    if (pos == stack.end()) {
        std::cout << "Error: Window not found\n";
        return;
    }
    stack.erase(pos);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
callq 0x5a09
cmpq 0x8(%rbx), %rax
je 0x574d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5876
jmp 0x5760
movq 0x8884(%rip), %rdi      # 0xdfd8
leaq 0x355b(%rip), %rsi      # 0x8cb6
callq 0x2200
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/master_stack.cpp
// Function: MasterStack::swapMaster(unsigned long)
void MasterStack::swapMaster(Window stack_window)
{
    std::vector<Window>::iterator posCurrent = find(stack.begin(), stack.end(), stack[0]);
    std::vector<Window>::iterator posStack = find(stack.begin(), stack.end(), stack_window);
    if (posCurrent == stack.end() || posStack == stack.end()) {
        std::cout << "Error: Window not found\n";
        return;
    }
    std::swap(*posCurrent, *posStack);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
movq %rdi, %rdx
callq 0x5a09
movq %rax, %rbx
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %r15, %rdx
callq 0x5a09
movq 0x8(%r14), %rcx
cmpq %rcx, %rbx
sete %dl
cmpq %rcx, %rax
sete %cl
orb %dl, %cl
cmpb $0x1, %cl
jne 0x57c7
movq 0x881f(%rip), %rdi      # 0xdfd8
leaq 0x34f6(%rip), %rsi      # 0x8cb6
callq 0x2200
jmp 0x57d3
movq (%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rbx)
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::heapify_down(int)
void PriorityQueue::heapify_down(int i)
{
    int left = LEFT(i);
    int right = RIGHT(i);

    int smallest = i;

    if (left < queueSize() && window[left].first < window[i].first)
        smallest = left;

    if (right < queueSize() && window[right].first < window[smallest].first)
        smallest = right;

    if (smallest != i) {
        std::swap(window[i], window[smallest]);
        heapify_down(smallest);
    }
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
leal 0x1(,%rsi,2), %r8d
movslq %esi, %rdx
movl %esi, %edi
cmpl %ecx, %r8d
jge 0x5aef
movslq %r8d, %rdi
shlq $0x4, %rdi
movl (%rax,%rdi), %edi
movq %rdx, %r9
shlq $0x4, %r9
cmpl (%rax,%r9), %edi
jl 0x5aec
movl %esi, %r8d
movl %r8d, %edi
leal 0x2(,%rsi,2), %r8d
cmpl %ecx, %r8d
jge 0x5b1a
movslq %r8d, %r9
shlq $0x4, %r9
movl (%rax,%r9), %r9d
movslq %edi, %r10
shlq $0x4, %r10
cmpl (%rax,%r10), %r9d
jl 0x5b17
movl %edi, %r8d
movl %r8d, %edi
cmpl %esi, %edi
je 0x5b54
shlq $0x4, %rdx
movslq %edi, %rsi
shlq $0x4, %rsi
movl (%rax,%rdx), %r8d
movl (%rax,%rsi), %r9d
movl %r9d, (%rax,%rdx)
movl %r8d, (%rax,%rsi)
movq 0x8(%rax,%rdx), %r8
movq 0x8(%rax,%rsi), %r9
movq %r9, 0x8(%rax,%rdx)
movq %r8, 0x8(%rax,%rsi)
movl %edi, %esi
jmp 0x5ac0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::insert(unsigned long)
void PriorityQueue::insert(Window w)
{
    numWindows += 1;
    priority[w] = numWindows;
    window.push_back({ numWindows, w });

    int index = queueSize() - 1;
    heapify_up(index);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movl 0x50(%rdi), %ebp
incl %ebp
movl %ebp, 0x50(%rdi)
addq $0x18, %rdi
movq %r14, %rsi
callq 0x5e08
movl %ebp, (%rax)
movl 0x50(%rbx), %eax
leaq 0x10(%rsp), %rsi
movl %eax, (%rsi)
movq (%r14), %rax
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x61a4
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
shrq $0x4, %rsi
decl %esi
movq %rbx, %rdi
callq 0x5b62
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::getMaster()
Window PriorityQueue::getMaster()
{
    if (empty()) {
        std::cout << "No windows open (Heap underflow)" << std::endl;
        return -1;
    }

    return window.at(0).second;
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rax
subq (%rdi), %rax
shrq $0x4, %rax
testl %eax, %eax
je 0x5cbb
xorl %esi, %esi
callq 0x5de6
movq 0x8(%rax), %rax
jmp 0x5cd9
movq 0x8316(%rip), %rdi      # 0xdfd8
leaq 0x3006(%rip), %rsi      # 0x8ccf
callq 0x2200
movq %rax, %rdi
callq 0x20e0
pushq $-0x1
popq %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::swapPriority(unsigned long, unsigned long)
void PriorityQueue::swapPriority(Window a,Window b){
    if(!priority.count(a) || !priority.count(b)){
        std::cout << "Swap window not found" << std::endl;
        return;
    }

    int temp = priority[a];
    priority[a] = priority[b];
    priority[b] = temp;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, (%rsp)
addq $0x18, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x635a
testq %rax, %rax
je 0x5d5b
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x635a
testq %rax, %rax
je 0x5d5b
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e08
movl (%rax), %ebp
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5e08
movl (%rax), %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e08
movl %r12d, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5e08
movl %ebp, (%rax)
jmp 0x5d76
movq 0x8276(%rip), %rdi      # 0xdfd8
leaq 0x2f87(%rip), %rsi      # 0x8cf0
callq 0x2200
movq %rax, %rdi
callq 0x20e0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::Create()
std::unique_ptr<WindowManager> WindowManager::Create()
{
    Display* display = XOpenDisplay(nullptr);
    if (display == nullptr) {
        std::cout << "Failed to open X display " << XDisplayName(nullptr) << std::endl;
        return nullptr;
    }
    std::unique_ptr<WindowManager> wmInstance(new WindowManager(display));
    return wmInstance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2300
testq %rax, %rax
je 0x63bb
movq %rax, %r15
pushq $0x78
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x6410
jmp 0x63ee
movq 0x7c16(%rip), %rdi      # 0xdfd8
leaq 0x29e3(%rip), %rsi      # 0x8dac
callq 0x2200
movq %rax, %r15
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x23a0
movq %r15, %rdi
movq %rax, %rsi
callq 0x2200
movq %rax, %rdi
callq 0x20e0
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x78
popq %rsi
movq %r14, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x2420