LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: usage()
void usage() {    
    ccout << "todo usage\n";
    ccout << "----------\n";
    ccout << "todo <command> [<parameters>]\n";
    ccout << "Begin with todo init.\n\n";
    ccout << "COMMAND          DESCRIPTION\n";
    ccout << "-------          -----------\n";
    ccout << "init           - Initialize .todo file\n";
    ccout << "global <cmd>   - Perform any of these commands on the user-level .todo\n";
    ccout << "add <todo>     - Add a new todo\n";
    ccout << "<no args>      - Display todos in .todo\n";
    ccout << "complete <num> - Complete the given todo\n";
    ccout << "sweep          - Clear all completed todos from the list\n";
    ccout << "delete <num>   - Remove a todo from the list\n";
    ccout << "purge          - Removed ALL TODOS from the list\n";
    ccout << "help           - Display this list\n";
    ccout << "version        - Show version information\n";
}

// Assembly:
pushq %rbx
leaq 0xe09dc(%rip), %rbx     # 0xf6460
leaq 0xa457d(%rip), %rsi     # 0xba008
movq %rbx, %rdi
callq 0x80460
leaq 0xa45e1(%rip), %rsi     # 0xba07b
movq %rbx, %rdi
callq 0x80460
leaq 0xa456b(%rip), %rsi     # 0xba014
movq %rbx, %rdi
callq 0x80460
leaq 0xa457b(%rip), %rsi     # 0xba033
movq %rbx, %rdi
callq 0x80460
leaq 0xa4584(%rip), %rsi     # 0xba04b
movq %rbx, %rdi
callq 0x80460
leaq 0xa4593(%rip), %rsi     # 0xba069
movq %rbx, %rdi
callq 0x80460
leaq 0xa45a2(%rip), %rsi     # 0xba087
movq %rbx, %rdi
callq 0x80460
leaq 0xa45bb(%rip), %rsi     # 0xba0af
movq %rbx, %rdi
callq 0x80460
leaq 0xa45f4(%rip), %rsi     # 0xba0f7
movq %rbx, %rdi
callq 0x80460
leaq 0xa4606(%rip), %rsi     # 0xba118
movq %rbx, %rdi
callq 0x80460
leaq 0xa4620(%rip), %rsi     # 0xba141
movq %rbx, %rdi
callq 0x80460
leaq 0xa463b(%rip), %rsi     # 0xba16b
movq %rbx, %rdi
callq 0x80460
leaq 0xa4666(%rip), %rsi     # 0xba1a5
movq %rbx, %rdi
callq 0x80460
leaq 0xa4685(%rip), %rsi     # 0xba1d3
movq %rbx, %rdi
callq 0x80460
leaq 0xa46a8(%rip), %rsi     # 0xba205
movq %rbx, %rdi
callq 0x80460
leaq 0xa46bd(%rip), %rsi     # 0xba229
movq %rbx, %rdi
popq %rbx
jmp 0x80460
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: match_one_or_more(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool match_one_or_more(std::string input, std::string compare) {
    if(input.length() > 0 && compare.length() > 0) {
        std::string command = compare;
        if(input.length() < command.length()) {
            command = command.substr(0, input.length());
        }

        return input.compare(command) == 0;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0x8(%rdi)
je 0x15bf9
cmpq $0x0, 0x8(%rsi)
je 0x15bf9
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x88fc0
movq 0x8(%rbx), %rcx
cmpq 0x8(%r14), %rcx
jae 0x15bdb
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x891e0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x86880
movq %r14, %rdi
callq 0x86830
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x88890
testl %eax, %eax
sete %bl
leaq 0x8(%rsp), %rdi
callq 0x86830
jmp 0x15bfb
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x15c07
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x86830
movq %rbx, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: todo_init(bool)
void todo_init(bool is_local) {
    char* userdir = get_userdir();
    char path[PATHMAX];
    if(is_local) {
        sprintf(path, ".%s.todo", SEPARATOR);
    } else {
        sprintf(path, "%s%s.todo", userdir, SEPARATOR);
    }

    FILE* fp = fopen(path, "w");
    if(fp) {
        ccout << "Created " << path << std::endl;
        fclose(fp);
    } else {
        ccout << "Error creating " << path << std::endl;
    }    
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %edi, %ebx
callq 0x15b75
testl %ebx, %ebx
je 0x15c49
leaq 0xa4623(%rip), %rsi     # 0xba259
leaq 0xa4625(%rip), %rdx     # 0xba262
movq %rsp, %rdi
xorl %eax, %eax
callq 0x12370
jmp 0x15c64
leaq 0xa4614(%rip), %rsi     # 0xba264
leaq 0xa460b(%rip), %rcx     # 0xba262
movq %rsp, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12370
leaq 0xa846b(%rip), %rsi     # 0xbe0d6
movq %rsp, %rdi
callq 0x121f0
testq %rax, %rax
je 0x15cab
movq %rax, %rbx
leaq 0xe07de(%rip), %rdi     # 0xf6460
leaq 0xa45e5(%rip), %rsi     # 0xba26e
callq 0x80460
movq %rsp, %rsi
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %rbx, %rdi
callq 0x12580
jmp 0x15cd1
leaq 0xe07ae(%rip), %rdi     # 0xf6460
leaq 0xa45be(%rip), %rsi     # 0xba277
callq 0x80460
movq %rsp, %rsi
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: get_todos[abi:cxx11](bool)
std::vector<std::string> get_todos(bool local_mode)  {
    char* userdir = get_userdir();
    char path[PATHMAX];
    if(local_mode) {
        sprintf(path, ".%s.todo", SEPARATOR);
    } else {
        sprintf(path, "%s%s.todo", userdir, SEPARATOR);
    }

    FILE* fp = fopen(path, "r");
    std::vector<std::string> buffer;
    if(fp) {
        do {
            char line[PATHMAX];
            char* res = fgets(line, PATHMAX, fp);
            if(res) {
                buffer.push_back(std::string(res));
            } else {
                break;
            }
        } while(true);
        fclose(fp);
    } else {
        usage();        
    }    
    
    return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2038, %rsp           # imm = 0x2038
movl %esi, %ebp
movq %rdi, %rbx
callq 0x15b75
testl %ebp, %ebp
je 0x15d15
leaq 0xa4559(%rip), %rsi     # 0xba259
leaq 0xa455b(%rip), %rdx     # 0xba262
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x12370
jmp 0x15d32
leaq 0xa4548(%rip), %rsi     # 0xba264
leaq 0xa453f(%rip), %rcx     # 0xba262
leaq 0x30(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12370
leaq 0xa8dc6(%rip), %rsi     # 0xbeaff
leaq 0x30(%rsp), %rdi
callq 0x121f0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
testq %rax, %rax
je 0x15daa
movq %rax, %r14
leaq 0x1030(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %r13
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x12260
testq %rax, %rax
je 0x15da0
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x16450
movq %rbx, %rdi
movq %r12, %rsi
callq 0x16b82
movq %r12, %rdi
callq 0x86830
jmp 0x15d68
movq %r14, %rdi
callq 0x12580
jmp 0x15daf
callq 0x15a7c
movq %rbx, %rax
addq $0x2038, %rsp           # imm = 0x2038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15dc6
movq %rax, %r14
jmp 0x15dd8
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x86830
movq %rbx, %rdi
callq 0x1648c
movq %r14, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: concat_remainder(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<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::string concat_remainder(std::queue<std::string>* command_list) {
    std::string s;
    while(!command_list->empty()) {
        s += command_list->front();
        command_list->pop();
        if(!command_list->empty()) { s += " "; }
    }

    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
leaq 0xa4736(%rip), %r15     # 0xba540
movq 0x10(%r14), %rsi
cmpq %rsi, 0x30(%r14)
je 0x15e3b
movq %rbx, %rdi
callq 0x87f40
movq %r14, %rdi
callq 0x16d1a
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x15e0a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x87fe0
jmp 0x15e0a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x86830
movq %r14, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: write_todo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void write_todo(std::string msg, bool local_mode) {
    char* userdir = get_userdir();
    char path[PATHMAX];
    if(local_mode) {
        sprintf(path, ".%s.todo", SEPARATOR);
    } else {
        sprintf(path, "%s%s.todo", userdir, SEPARATOR);
    }

    FILE* fp = fopen(path, "a");
    if(fp) {
        fseek(fp, 0, SEEK_END);
        fprintf(fp, "X:%s\n", msg.c_str());
        ccout << "Added!" << std::endl;
        fclose(fp);
    } else {
        ccout << "Error adding todo." << std::endl;
    }    
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %esi, %ebp
movq %rdi, %rbx
callq 0x15b75
testl %ebp, %ebp
je 0x15e8a
leaq 0xa43e2(%rip), %rsi     # 0xba259
leaq 0xa43e4(%rip), %rdx     # 0xba262
movq %rsp, %rdi
xorl %eax, %eax
callq 0x12370
jmp 0x15ea5
leaq 0xa43d3(%rip), %rsi     # 0xba264
leaq 0xa43ca(%rip), %rcx     # 0xba262
movq %rsp, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12370
leaq 0xa821b(%rip), %rsi     # 0xbe0c7
movq %rsp, %rdi
callq 0x121f0
testq %rax, %rax
je 0x15f0b
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x12150
movq (%rbx), %rdx
leaq 0xa43c7(%rip), %rsi     # 0xba29a
movq %r14, %rdi
xorl %eax, %eax
callq 0x12670
leaq 0xe057c(%rip), %rdi     # 0xf6460
leaq 0xa43b5(%rip), %rsi     # 0xba2a0
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %r14, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
jmp 0x12580
leaq 0xe054e(%rip), %rdi     # 0xf6460
leaq 0xa438e(%rip), %rsi     # 0xba2a7
callq 0x80460
movq %rax, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
jmp 0x7fd40
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: rewrite_todos(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>>>>, bool)
void rewrite_todos(std::vector<std::string> buffer, bool local) {
    char* userdir = get_userdir();
    char path[PATHMAX];
    if(local) {
        sprintf(path, ".%s.todo", SEPARATOR);
    } else {
        sprintf(path, "%s%s.todo", userdir, SEPARATOR);
    }

    FILE* fp = fopen(path, "w");
    if(fp) {
        for(int i = 0; i < buffer.size(); i++) {
            // This guard here skips any blank lines. This is a little 'cheat' to allow for
            // easier deletion. Just set the respective line to be blank, and it'll be 'skipped' 
            // during output.
            if(buffer[i].length() == 0) { continue; }
            fprintf(fp, "%s", buffer[i].c_str());
        }        
        fclose(fp);        
    } else {
        ccout << "Error updating todos." << std::endl;
    }    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %esi, %ebp
movq %rdi, %rbx
callq 0x15b75
testl %ebp, %ebp
je 0x15f68
leaq 0xa4304(%rip), %rsi     # 0xba259
leaq 0xa4306(%rip), %rdx     # 0xba262
movq %rsp, %rdi
xorl %eax, %eax
callq 0x12370
jmp 0x15f83
leaq 0xa42f5(%rip), %rsi     # 0xba264
leaq 0xa42ec(%rip), %rcx     # 0xba262
movq %rsp, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12370
leaq 0xa814c(%rip), %rsi     # 0xbe0d6
movq %rsp, %rdi
callq 0x121f0
testq %rax, %rax
je 0x15fe8
movq %rax, %r14
pushq $0x8
popq %r15
xorl %r12d, %r12d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r12, %rcx
jbe 0x15fd1
cmpq $0x0, (%rax,%r15)
je 0x15fc8
movq -0x8(%rax,%r15), %rdi
movq %r14, %rsi
callq 0x12400
incq %r12
addq $0x20, %r15
jmp 0x15fa1
movq %r14, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12580
leaq 0xe0471(%rip), %rdi     # 0xf6460
leaq 0xa42c4(%rip), %rsi     # 0xba2ba
callq 0x80460
movq %rax, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7fd40
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: complete_todo(unsigned int, bool)
void complete_todo(unsigned int index, bool local) {
    auto todos = get_todos(local);
    if(todos.size() == 0 || index > todos.size() - 1) {
        ccout << "No item with index " << index << "." << std::endl;
    } else {
        todos[index][0] = 'O';
        ccout << "Item " << index << " completed!" << std::endl;
    }

    rewrite_todos(todos, local);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x15cda
movq (%r14), %rax
movq 0x8(%r14), %rcx
movl %ebp, %r14d
subq %rax, %rcx
je 0x16046
sarq $0x5, %rcx
decq %rcx
cmpq %r14, %rcx
jae 0x1606d
leaq 0xe0413(%rip), %rdi     # 0xf6460
leaq 0xa427c(%rip), %rsi     # 0xba2d0
callq 0x80460
movq %rax, %rdi
movq %r14, %rsi
callq 0x80830
leaq 0xa7fc5(%rip), %rsi     # 0xbe030
jmp 0x160a0
movq %r14, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rax
movb $0x4f, (%rax)
leaq 0xe03de(%rip), %rdi     # 0xf6460
leaq 0xa425b(%rip), %rsi     # 0xba2e4
callq 0x80460
movq %rax, %rdi
movq %r14, %rsi
callq 0x80830
leaq 0xa424a(%rip), %rsi     # 0xba2ea
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x164c2
movzbl %bl, %esi
movq %rsp, %rdi
callq 0x15f31
movq %rsp, %rdi
callq 0x1648c
leaq 0x18(%rsp), %rdi
callq 0x1648c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1648c
jmp 0x160f3
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1648c
movq %rbx, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: delete_todo(unsigned int, bool)
void delete_todo(unsigned int index, bool local) {
    auto todos = get_todos(local);
    if(todos.size() == 0 || index > todos.size() - 1) {
        ccout << "No item with index " << index << "." << std::endl;
    } else {
        todos[index] = "";
        ccout << "Item " << index << " deleted." << std::endl;
    }

    rewrite_todos(todos, local);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x15cda
movq (%r14), %rdi
movq 0x8(%r14), %rax
movl %ebp, %r14d
subq %rdi, %rax
je 0x16139
sarq $0x5, %rax
decq %rax
cmpq %r14, %rax
jae 0x16160
leaq 0xe0320(%rip), %rdi     # 0xf6460
leaq 0xa4189(%rip), %rsi     # 0xba2d0
callq 0x80460
movq %rax, %rdi
movq %r14, %rsi
callq 0x80830
leaq 0xa7ed2(%rip), %rsi     # 0xbe030
jmp 0x1619b
movq %r14, %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq 0xa4128(%rip), %rsi     # 0xba299
callq 0x877e0
leaq 0xe02e3(%rip), %rdi     # 0xf6460
leaq 0xa4160(%rip), %rsi     # 0xba2e4
callq 0x80460
movq %rax, %rdi
movq %r14, %rsi
callq 0x80830
leaq 0xa415b(%rip), %rsi     # 0xba2f6
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x164c2
movzbl %bl, %esi
movq %rsp, %rdi
callq 0x15f31
movq %rsp, %rdi
callq 0x1648c
leaq 0x18(%rsp), %rdi
callq 0x1648c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1648c
jmp 0x161ee
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1648c
movq %rbx, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: sweep_todos(bool)
void sweep_todos(bool local) {
    auto todos = get_todos(local);
    int count = 0;
    for(int i = 0; i < todos.size(); i++) {
        if(todos[i].length() > 2) {
            if(todos[i][0] != 'X') {
                todos[i] = "";
                count++;
            }
        }
    }
    
    rewrite_todos(todos, local);
    ccout << "Removed " << count << " completed todo" << (count > 1 ? "s" : "") << " from the list!" << std::endl;     
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edi, %r14d
movq %rsp, %rdi
movl %r14d, %esi
callq 0x15cda
xorl %r15d, %r15d
leaq 0xa4075(%rip), %rbx     # 0xba299
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x16264
cmpq $0x3, 0x8(%rdi,%r15)
jb 0x1625b
addq %r15, %rdi
movq (%rdi), %rax
cmpb $0x58, (%rax)
je 0x1625b
movq %rbx, %rsi
callq 0x877e0
incl %ebp
incq %r12
addq $0x20, %r15
jmp 0x16229
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x164c2
movzbl %r14b, %esi
leaq 0x18(%rsp), %rdi
callq 0x15f31
leaq 0x18(%rsp), %rdi
callq 0x1648c
leaq 0xe01d0(%rip), %rdi     # 0xf6460
leaq 0xa4069(%rip), %rsi     # 0xba300
callq 0x80460
movq %rax, %rdi
movl %ebp, %esi
callq 0x80800
leaq 0xa405c(%rip), %rsi     # 0xba309
movq %rax, %rdi
callq 0x80460
cmpl $0x2, %ebp
leaq 0xa7e7d(%rip), %rcx     # 0xbe13c
cmovgeq %rcx, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x80460
leaq 0xa4044(%rip), %rsi     # 0xba319
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %rsp, %rdi
callq 0x1648c
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1648c
jmp 0x1630e
jmp 0x1630b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1648c
movq %rbx, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/64Mega[P]todo-cli/src/todo.cpp
// Function: purge_todos(bool)
void purge_todos(bool local) {
    auto todos = get_todos(local);
    int count = 0;
    for(int i = 0; i < todos.size(); i++) {
        if(todos[i].length() > 2) {            
            todos[i] = "";
            count++;            
        }
    }
    
    rewrite_todos(todos, local);
    ccout << "Deleted " << count << " todo" << (count > 1 ? "s" : "") << " from the list." << std::endl;     
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edi, %r14d
movq %rsp, %rdi
movl %r14d, %esi
callq 0x15cda
xorl %r15d, %r15d
leaq 0xa3f57(%rip), %rbx     # 0xba299
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x1637a
cmpq $0x3, 0x8(%rdi,%r15)
jb 0x16371
addq %r15, %rdi
movq %rbx, %rsi
callq 0x877e0
incl %ebp
incq %r12
addq $0x20, %r15
jmp 0x16347
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x164c2
movzbl %r14b, %esi
leaq 0x18(%rsp), %rdi
callq 0x15f31
leaq 0x18(%rsp), %rdi
callq 0x1648c
leaq 0xe00ba(%rip), %rdi     # 0xf6460
leaq 0xa3f7c(%rip), %rsi     # 0xba329
callq 0x80460
movq %rax, %rdi
movl %ebp, %esi
callq 0x80800
leaq 0xa3f50(%rip), %rsi     # 0xba313
movq %rax, %rdi
callq 0x80460
cmpl $0x2, %ebp
leaq 0xa7d67(%rip), %rcx     # 0xbe13c
cmovgeq %rcx, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x80460
leaq 0xa3f47(%rip), %rsi     # 0xba332
movq %rax, %rdi
callq 0x80460
movq %rax, %rdi
callq 0x7fd40
movq %rsp, %rdi
callq 0x1648c
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1648c
jmp 0x16424
jmp 0x16421
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1648c
movq %rbx, %rdi
callq 0xb7920
// File: /workspace/github_cpp_makefile_star2_O2/aleden[P]ptrace-multi-threaded-demo/ptrace_multi_threaded_demo.cpp
// Function: do_thread(int)
static void do_thread(int n) {
  for (int i = 1;; ++i) {
    {
      lock_guard<mutex> lck(mtx);
      fprintf(stdout, "child: %d [%d]\n", i,
              static_cast<int>(syscall(SYS_gettid)));
    }

    struct timespec tm;
    clock_gettime(CLOCK_MONOTONIC, &tm);
    tm.tv_sec += 3;
    clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &tm, NULL);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
pushq $0x1
popq %rbx
leaq 0x39ca(%rip), %r14      # 0x6158
leaq 0x1206(%rip), %r15      # 0x399b
leaq 0x8(%rsp), %r12
movl %ebx, %ebp
movq %r14, %rdi
callq 0x2976
movq 0x381d(%rip), %rax      # 0x5fc8
movq (%rax), %r13
movl $0xba, %edi
xorl %eax, %eax
callq 0x2040
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x2180
movq %r14, %rdi
callq 0x20d0
movl %ebx, %edi
movq %r12, %rsi
callq 0x2130
addq $0x3, 0x8(%rsp)
movl %ebx, %edi
movl %ebx, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x21e0
incl %ebp
jmp 0x279c
nop
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: parse_symlevel(char**, char*)
int parse_symlevel(char *sym[4], char * sym_str) {
    int count = 0;
    bool hasvalue = false;
    ArgParser args{sym_str};
    while (args.next()) {
        args.capture();
        sym[count++] = args.value;
        hasvalue = false;
        if (count == 4) return 4;
    }
    for (int i = count; i < 4; i++ ) sym[i] =NULL;
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
xorl %r15d, %r15d
movb %r15b, 0x8(%r14)
andq $0x0, 0x10(%r14)
movq %rdi, %rbx
movb %r15b, 0x18(%r14)
pushq $0x4
popq %rbp
movq %r14, %rdi
callq 0x423a
testb %al, %al
je 0x3561
cmpb $0x0, 0x20(%rsp)
jne 0x354d
movb $0x0, 0x10(%rsp)
incq 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rbx,%r15,8)
incq %r15
cmpq $0x4, %r15
jne 0x3530
jmp 0x3577
movq %r15, %rax
cmpq $0x4, %rax
je 0x3574
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x3564
movl %r15d, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: parse_keycode(xkb_keymap*, char*)
xkb_keycode_t parse_keycode(xkb_keymap *keymap, char * keycode) {
    if (keycode == NULL) return -1;
    if (*keycode == '<') {
        char * end = strchr(keycode+1, '>');
        if (end != NULL) {
            *end = '\0';
            int x = xkb_keymap_key_by_name(keymap, keycode+1);
            if (x > 7) {
                *end = '>';
                return x;
            } else {
                fprintf(stderr,"CONFIG ERROR: unknown key: <%s>\n", keycode +1);
                exit(1);
            }
        }
    } else {
        return atoi(keycode) + 8; //Convert from evdev keycode to XKB
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbp
testq %rsi, %rsi
je 0x35dc
movq %rsi, %rbx
cmpb $0x3c, (%rsi)
jne 0x35cf
movq %rdi, %r14
incq %rbx
pushq $0x3e
popq %rsi
movq %rbx, %rdi
callq 0x3090
testq %rax, %rax
je 0x35dc
movq %rax, %r15
movb $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x30b0
cmpl $0x8, %eax
jl 0x35e9
movl %eax, %ebp
movb $0x3e, (%r15)
jmp 0x35dc
movq %rbx, %rdi
callq 0x3210
movl %eax, %ebp
addl $0x8, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x5a08(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x2612(%rip), %rsi      # 0x5c0c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3140
pushq $0x1
popq %rdi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: parse_raw_tap(int, xkb_keymap*, unsigned int*, char*)
void parse_raw_tap(int line, xkb_keymap *keymap, xkb_keycode_t keys[2], char *arguments) {
    ArgParser args{arguments};
    int count = 0;
    while (args.next()) {
        xkb_keycode_t keycode = parse_keycode(keymap, args.value);
        if (keycode < 0) {
            fprintf(stderr,"CONFIG ERROR[line:%d]: unknown key: %s\n",line, args.value);
            exit(1);
        }
        if (count > 1) {
            fprintf(stderr,"CONFIG ERROR[line:%d]: to many for raw keys specified, max is 2",line);
            exit(1);
        }
        keys[count++] = keycode;
    }
    for (int i = count; i < 2; i++) keys[i] = -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq %rsp, %r15
movq %rcx, (%r15)
xorl %r12d, %r12d
movb %r12b, 0x8(%r15)
andq $0x0, 0x10(%r15)
movb %r12b, 0x18(%r15)
movq %r15, %rdi
callq 0x423a
testb %al, %al
je 0x3666
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3584
cmpq $0x2, %r12
je 0x3679
movl %eax, (%rbx,%r12,4)
incq %r12
jmp 0x3636
orl $-0x1, (%rbx,%r12,4)
incq %r12
cmpq $0x2, %r12
jne 0x365e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x5978(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x25a3(%rip), %rsi      # 0x5c2d
movl %ebp, %edx
xorl %eax, %eax
callq 0x3140
pushq $0x1
popq %rdi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: parse_unused_keys(xkb_keymap*, Config&, char*)
void parse_unused_keys(xkb_keymap *keymap, Config &config, char *arguments) {
    ArgParser args{arguments};
    while (args.next()) {
        xkb_keycode_t keycode = parse_keycode(keymap, args.value);
        if (keycode < 0) {
            fprintf(stderr,"CONFIG ERROR: unknown unused key: %s \n", args.value);
            exit(1);
        }
        config.unused_keys.push(keycode);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsp, %rbx
movq %rdx, (%rbx)
xorl %eax, %eax
movb %al, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movq %rsi, %r14
movq %rdi, %r15
movb %al, 0x18(%rbx)
addq $0x20, %r14
movq %rbx, %rdi
callq 0x423a
testb %al, %al
je 0x36e6
movq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x3584
movq %r14, %rdi
movl %eax, %esi
callq 0x42a0
jmp 0x36c1
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: generate_modifier_mapping(_IO_FILE*, char const*, char**)
void generate_modifier_mapping(FILE * file, const char *keyname, char *syms[4]) {
    for(int i = 0; i < 4; i++) {
        if (syms[i] == NULL) return;
        for(auto &mod : ModifierTable) {
            if (strcmp(mod.sym, syms[i]) == 0) {
                fprintf(file, "   modifier_map %s { <%s> };\n", mod.map_name, keyname);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x6285(%rip), %rbp      # 0x9990
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0x375d
cmpq $0x0, (%rbx,%r13,8)
je 0x375d
pushq $0x8
popq %r12
cmpq $0xd8, %r12
je 0x3758
movq -0x8(%r12,%rbp), %rdi
movq (%rbx,%r13,8), %rsi
callq 0x3130
testl %eax, %eax
jne 0x3752
movq (%r12,%rbp), %rdx
movq %r15, %rdi
leaq 0x2525(%rip), %rsi      # 0x5c6d
movq %r14, %rcx
xorl %eax, %eax
callq 0x3140
addq $0x10, %r12
jmp 0x371f
incq %r13
jmp 0x370e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: print_keysyms(_IO_FILE*, char**)
void print_keysyms(FILE * file, char *syms[4]) {
    char *last = NULL;
    if (syms[0] == NULL) return;
    for(int i = 0; i < 4; i++) {
        if (syms[i] != NULL) last = syms[i];
        if (i != 0) {
            fprintf(file, ", ");
        }
        fprintf(file,"%s", last);
    }
}

// Assembly:
cmpq $0x0, (%rsi)
je 0x37d9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x2
popq %r12
pushq $0x1
popq %r13
xorl %ebp, %ebp
cmpq $0x4, %r15
je 0x37cb
movq (%rbx,%r15,8), %rax
testq %rax, %rax
cmovneq %rax, %rbp
testq %r15, %r15
je 0x37bb
leaq 0x24de(%rip), %rdi      # 0x5c8b
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x3230
movq %rbp, %rdi
movq %r14, %rsi
callq 0x30d0
incq %r15
jmp 0x3790
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: file_contents(char const*)
char * file_contents( const char *path) {
    int fd = open(path, O_RDONLY);
    if (fd == -1) return NULL;
    int offset = lseek(fd, 0, SEEK_END);
    if (offset < 1) {
        close(fd);
        return NULL;
    }
    lseek(fd, 0, SEEK_SET);
    char * buffer = (char*) malloc(offset + 1);
    if (read(fd, buffer, offset) < (offset - 1)) {
        free(buffer);
        close(fd);
        return NULL;
    }
    buffer[offset] = '\0';
    close(fd);
    return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
xorl %esi, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x385b
movl %eax, %ebx
xorl %r14d, %r14d
pushq $0x2
popq %rdx
movl %eax, %edi
xorl %esi, %esi
callq 0x30c0
movq %rax, %r15
testl %r15d, %r15d
jle 0x3854
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30c0
leal 0x1(%r15), %edi
callq 0x3160
movq %rax, %r14
movl %r15d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %ebx, %edi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3110
decl %r15d
cmpq %r15, %rax
jge 0x384f
movq %r14, %rdi
callq 0x3040
xorl %r14d, %r14d
jmp 0x3854
movb $0x0, (%r14,%r12)
movl %ebx, %edi
callq 0x30f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: install_xkb_rule()
void install_xkb_rule() {
    fprintf(stderr,"Installing custom rule set to ~/.xkb/rules/evdev-doublebind\n");
    if (system("mkdir -p $HOME/.xkb/rules") != 0 ) goto error;
    if (system("cp /usr/share/X11/xkb/rules/evdev.xml $HOME/.xkb/rules/evdev-doublebind.xml")
        != 0) goto error;
    if (system("cp /usr/share/X11/xkb/rules/evdev.lst $HOME/.xkb/rules/evdev-doublebind.lst")
        != 0) goto error;
    if (system("sed 's/!\\s*option\\s*=\\s*symbols/! option	=	symbols\\n\
  evdoublebind:mapping = +evdoublebind(mapping)/g' /usr/share/X11/xkb/rules/evdev\
 > $HOME/.xkb/rules/evdev-doublebind") != 0) goto error;
    return;
error:
    fprintf(stderr,"Failed to install XKB rules set\n");
    exit(1);
}

// Assembly:
pushq %rbx
movq 0x5786(%rip), %rbx      # 0x8ff8
movq (%rbx), %rcx
leaq 0x2412(%rip), %rdi      # 0x5c8e
pushq $0x3c
popq %rsi
pushq $0x1
popq %rdx
callq 0x3230
leaq 0x243d(%rip), %rdi      # 0x5ccb
callq 0x3080
testl %eax, %eax
jne 0x38c9
leaq 0x2447(%rip), %rdi      # 0x5ce5
callq 0x3080
testl %eax, %eax
jne 0x38c9
leaq 0x2483(%rip), %rdi      # 0x5d31
callq 0x3080
testl %eax, %eax
jne 0x38c9
leaq 0x24bf(%rip), %rdi      # 0x5d7d
callq 0x3080
testl %eax, %eax
jne 0x38c9
popq %rbx
retq
movq (%rbx), %rcx
leaq 0x2554(%rip), %rdi      # 0x5e27
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x3230
pushq $0x1
popq %rdi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O2/exrok[P]evdoublebind/./src/make_config.cc
// Function: ArgParser::next()
bool next() {
        value = NULL;
        if (end == true) return false;
        if (restore != '\0') *c = restore;
        c = skip_ws(c);
        if (*c == '\0') {
            end = true;
            return false;
        }
        value = c;
        while (*c && !(*c == '\t' || *c == ' ')) c++;
        if (*c == '\0') {
            end = true;
            return true;
        }
        restore = *c;
        *c = '\0';
        return true;
    }

// Assembly:
andq $0x0, 0x10(%rdi)
cmpb $0x0, 0x18(%rdi)
je 0x4248
xorl %eax, %eax
retq
pushq %rbx
movq %rdi, %rbx
movb 0x8(%rdi), %al
testb %al, %al
je 0x4258
movq (%rbx), %rcx
movb %al, (%rcx)
movq (%rbx), %rdi
callq 0x34f2
movq %rax, (%rbx)
cmpb $0x0, (%rax)
je 0x428f
movq %rax, 0x10(%rbx)
incq %rax
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0x4297
cmpl $0x9, %ecx
je 0x4286
cmpl $0x20, %ecx
je 0x4286
movq %rax, (%rbx)
jmp 0x426c
movb %cl, 0x8(%rbx)
movb $0x0, -0x1(%rax)
jmp 0x429b
movb $0x1, 0x18(%rbx)
xorl %eax, %eax
jmp 0x429d
movb $0x1, 0x18(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjlin1[P]liblinear/predict.c
// Function: main
int main(int argc, char **argv)
{
	FILE *input, *output;
	int i;

	// parse options
	for(i=1;i<argc;i++)
	{
		if(argv[i][0] != '-') break;
		++i;
		switch(argv[i-1][1])
		{
			case 'b':
				flag_predict_probability = atoi(argv[i]);
				break;
			case 'q':
				info = &print_null;
				i--;
				break;
			default:
				fprintf(stderr,"unknown option: -%c\n", argv[i-1][1]);
				exit_with_help();
				break;
		}
	}
	if(i>=argc)
		exit_with_help();

	input = fopen(argv[i],"r");
	if(input == NULL)
	{
		fprintf(stderr,"can't open input file %s\n",argv[i]);
		exit(1);
	}

	output = fopen(argv[i+2],"w");
	if(output == NULL)
	{
		fprintf(stderr,"can't open output file %s\n",argv[i+2]);
		exit(1);
	}

	if((model_=load_model(argv[i+1]))==0)
	{
		fprintf(stderr,"can't open model file %s\n",argv[i+1]);
		exit(1);
	}

	x = (struct feature_node *) malloc(max_nr_attr*sizeof(struct feature_node));
	do_predict(input, output);
	free_and_destroy_model(&model_);
	free(line);
	free(x);
	fclose(input);
	fclose(output);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x1
popq %r14
leaq -0x627(%rip), %r15      # 0x23ac
cmpl %ebp, %r14d
jge 0x2acb
movslq %r14d, %r12
movq (%rbx,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x2a1b
movzbl 0x1(%rdi), %eax
cmpl $0x71, %eax
je 0x2a0f
cmpl $0x62, %eax
jne 0x2ad0
incl %r14d
movq 0x8(%rbx,%r12,8), %rdi
callq 0x21f0
movl %eax, 0xd79b(%rip)      # 0x101a8
jmp 0x2a16
movq %r15, 0xd75a(%rip)      # 0x10170
incl %r14d
jmp 0x29d3
leaq 0x96f2(%rip), %rsi      # 0xc114
callq 0x2150
testq %rax, %rax
je 0x2af0
movq %rax, %r14
movq 0x10(%rbx,%r12,8), %rdi
leaq 0x96f1(%rip), %rsi      # 0xc130
callq 0x2150
testq %rax, %rax
je 0x2b07
movq %rax, %r15
movq 0x8(%rbx,%r12,8), %rdi
callq 0x97a9
movq %rax, 0xd73f(%rip)      # 0x101a0
testq %rax, %rax
je 0x2b1f
movslq 0xd6f7(%rip), %rdi      # 0x10168
shlq $0x4, %rdi
callq 0x21a0
movq %rax, 0xd717(%rip)      # 0x10198
movq %r14, %rdi
movq %r15, %rsi
callq 0x23d2
leaq 0xd70d(%rip), %rdi      # 0x101a0
callq 0x88f5
movq 0xd711(%rip), %rdi      # 0x101b0
callq 0x2160
movq 0xd6ed(%rip), %rdi      # 0x10198
callq 0x2160
movq %r14, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29a6
movsbl %al, %edx
movq 0xd506(%rip), %rax      # 0xffe0
movq (%rax), %rdi
leaq 0x961b(%rip), %rsi      # 0xc0ff
xorl %eax, %eax
callq 0x21d0
callq 0x29a6
movq 0xd4e9(%rip), %rax      # 0xffe0
movq (%rax), %rdi
movq (%rbx,%r12,8), %rdx
leaq 0x9611(%rip), %rsi      # 0xc116
jmp 0x2b35
movq 0xd4d2(%rip), %rax      # 0xffe0
movq (%rax), %rdi
movq 0x10(%rbx,%r12,8), %rdx
leaq 0x9615(%rip), %rsi      # 0xc132
jmp 0x2b35
movq 0xd4ba(%rip), %rax      # 0xffe0
movq (%rax), %rdi
movq 0x8(%rbx,%r12,8), %rdx
leaq 0x9618(%rip), %rsi      # 0xc14d
xorl %eax, %eax
callq 0x21d0
pushq $0x1
popq %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::Display(int, int, int)
Display::Display(int width, int height, int dpi) : width{width}, height{height}, dpi{dpi} {
	keyboardImage = new ImageRGB();
	keyboardImage->w = width;
	keyboardImage->h = height;
	keyboardImage->data = new RGB[width*height];

	//Initialize background to grey.
	//Doing not-grey would be much slower.
	memset((unsigned char*) keyboardImage->data, 0x70, width*height*3);

	margin = width / 33;
	scale = dpi / 34;

	entryWidth = dpi/3;

	keyboardWidth = width - entryWidth;

	rowWidth = keyboardWidth/4;

	stepSizePx = (height-(2*margin) - (11*8*scale))/10;

	kbScale = scale-2;

	if(kbScale < 0) {
    	kbScale = 1;
    }

    maxlen = (height-(2*margin)) / ((scale*8) + 4);

    currentKeyboard = &LCkeyboard;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x10(%rdi)
leaq 0x50(%rdi), %rax
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, (%rsp)
xorl %eax, %eax
movb %al, 0x50(%rdi)
movups 0x1b99(%rip), %xmm0     # 0x4004
movups %xmm0, 0x68(%rdi)
movups 0x1b9e(%rip), %xmm0     # 0x4014
movups %xmm0, 0x78(%rdi)
movb %al, 0x88(%rdi)
movups 0x1b9e(%rip), %xmm0     # 0x4025
movups %xmm0, 0x89(%rdi)
movups 0x1ba0(%rip), %xmm0     # 0x4035
movups %xmm0, 0x99(%rdi)
movb %al, 0xa9(%rdi)
movups 0x1b9d(%rip), %xmm0     # 0x4046
movups %xmm0, 0xaa(%rdi)
movups 0x1b9f(%rip), %xmm0     # 0x4056
movups %xmm0, 0xba(%rdi)
movb $0x7c, 0xca(%rdi)
movb %al, 0xeb(%rdi)
movups 0x1ba5(%rip), %xmm0     # 0x4077
movups %xmm0, 0xdb(%rdi)
movups 0x1b87(%rip), %xmm0     # 0x4067
movups %xmm0, 0xcb(%rdi)
pushq $0x10
popq %rdi
callq 0x2170
movq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, 0x30(%rbx)
movl %r15d, (%rax)
movl %ebp, 0x4(%rax)
movl %ebp, %r12d
imull %r15d, %r12d
movslq %r12d, %rax
pushq $0x3
popq %rcx
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x2030
leaq 0x68(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, 0x8(%r13)
leal (%r12,%r12,2), %ecx
movslq %ecx, %rdx
pushq $0x70
popq %rsi
movq %rax, %rdi
callq 0x20e0
pushq $0x21
popq %rcx
movl %r15d, %eax
cltd
idivl %ecx
movl %eax, %esi
movl %eax, 0x8(%rbx)
pushq $0x22
popq %rcx
movl %r14d, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl %eax, 0xc(%rbx)
pushq $0x3
popq %rdi
movl %r14d, %eax
cltd
idivl %edi
movl %eax, 0x14(%rbx)
subl %eax, %r15d
movl %r15d, 0x18(%rbx)
pushq $0x4
popq %rdi
movl %r15d, %eax
cltd
idivl %edi
movl %eax, 0x1c(%rbx)
addl %esi, %esi
subl %esi, %ebp
imull $-0x58, %ecx, %eax
addl %ebp, %eax
pushq $0xa
popq %rsi
cltd
idivl %esi
movl %eax, 0x20(%rbx)
leal -0x2(%rcx), %eax
cmpl $0x44, %r14d
pushq $0x1
popq %rdx
cmovgel %eax, %edx
movl %edx, 0x24(%rbx)
leal 0x4(,%rcx,8), %ecx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, 0x28(%rbx)
movq (%rsp), %rax
movq %rax, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Display::write(std::string filename){
	std::ofstream f2(filename, std::ios::binary);
    f2 << "P6" << std::endl;
    f2 << std::to_string(width) << " " << std::to_string(height) << std::endl;
    f2 << "255" << std::endl;
    f2.write((char*)keyboardImage->data, width*height*3);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq 0x48(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x2290
leaq 0x1a62(%rip), %rsi      # 0x4088
movq %r14, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movl (%rbx), %esi
leaq 0x28(%rsp), %rdi
callq 0x2cbd
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2150
leaq 0x1a3b(%rip), %rsi      # 0x4093
movq %rax, %rdi
callq 0x2160
movq %rax, %r14
movl 0x4(%rbx), %esi
leaq 0x8(%rsp), %rdi
callq 0x2cbd
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
leaq 0x19eb(%rip), %rsi      # 0x408b
leaq 0x48(%rsp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
movl (%rbx), %eax
imull 0x4(%rbx), %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rdx
leaq 0x48(%rsp), %rdi
callq 0x21e0
leaq 0x48(%rsp), %rdi
callq 0x2210
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
retq
jmp 0x26f8
jmp 0x2707
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20b0
jmp 0x26fb
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20b0
jmp 0x270a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::set_px(RGB, int, int, int)
void Display::set_px (RGB value, int x, int y, int scale) {
	for(int xscale = 0; xscale < scale; xscale++) {
		for(int yscale=0; yscale < scale; yscale++) {
			keyboardImage->data[keyboardImage->w*(y+yscale) + x+xscale].r = value.r;
			keyboardImage->data[keyboardImage->w*(y+yscale) + x+xscale].g = value.g;
			keyboardImage->data[keyboardImage->w*(y+yscale) + x+xscale].b = value.b;				
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %eax
shrl $0x8, %eax
movl %esi, %r9d
shrl $0x10, %r9d
xorl %r10d, %r10d
testl %r8d, %r8d
movl $0x0, %r11d
cmovgl %r8d, %r11d
cmpl %r11d, %r10d
je 0x2789
movq 0x30(%rdi), %rbx
leal (%r10,%rdx), %ebp
movl %ecx, %r14d
movl %r8d, %r15d
subl $0x1, %r15d
jb 0x2784
movq 0x8(%rbx), %r12
movl (%rbx), %r13d
imull %r14d, %r13d
addl %ebp, %r13d
movslq %r13d, %r13
leaq (%r13,%r13,2), %r13
movb %sil, (%r12,%r13)
movb %al, 0x1(%r12,%r13)
movb %r9b, 0x2(%r12,%r13)
incl %r14d
jmp 0x2755
incl %r10d
jmp 0x2742
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::print_letter(char, int, int, int, bool)
void Display::print_letter(char letter, int atX, int atY, int scale, bool inverted) {
	RGB white = {0xFF, 0xFF, 0xFF};
	RGB black = {0x10, 0x10, 0x10};
	for (int y=0; y < 8; y++) {
		for (int x = 0; x < 8; x++) {
			if(font8x8_basic[(uint8_t) letter][x] & (uint8_t)(1 << (7-(y)))) {
				set_px(inverted ? black : white, atX + (x*scale), atY + (y*scale), scale);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movl %ecx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq %rdi, 0x20(%rsp)
decl %r9d
orl $0x101010, %r9d         # imm = 0x101010
movl %r9d, 0x14(%rsp)
movzbl %sil, %r14d
shll $0x3, %r14d
xorl %eax, %eax
cmpl $0x8, %eax
je 0x2833
movb $0x7, %cl
subb %al, %cl
pushq $0x1
popq %rbx
shll %cl, %ebx
movq %rax, 0x18(%rsp)
movl %eax, %r13d
imull %ebp, %r13d
addl 0x10(%rsp), %r13d
movl 0xc(%rsp), %r15d
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x282a
leaq (%r14,%r12), %rax
leaq 0x396d(%rip), %rcx      # 0x6170
movzbl (%rcx,%rax), %eax
testl %eax, %ebx
je 0x2822
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
movl %r15d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
callq 0x271c
incq %r12
addl %ebp, %r15d
jmp 0x27f2
movq 0x18(%rsp), %rax
incl %eax
jmp 0x27cb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::fastRect(int, int, int, int, RGB)
void Display::fastRect(int atX, int atY, int width, int height, RGB color) {
	for(int y = 0; y < height; y++) {
		for(int x = 0; x < width; x++) {
			keyboardImage->data[((atY+y)*keyboardImage->w) + (atX + x)].r = color.r;
			keyboardImage->data[((atY+y)*keyboardImage->w) + (atX + x)].g = color.g;
			keyboardImage->data[((atY+y)*keyboardImage->w) + (atX + x)].b = color.b;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %eax
shrl $0x8, %eax
movl %r9d, %r10d
shrl $0x10, %r10d
xorl %r11d, %r11d
testl %ecx, %ecx
cmovlel %r11d, %ecx
testl %r8d, %r8d
cmovlel %r11d, %r8d
cmpl %r8d, %r11d
je 0x28a9
movq 0x30(%rdi), %rbx
movl %esi, %ebp
movl %ecx, %r14d
subl $0x1, %r14d
jb 0x28a2
movq 0x8(%rbx), %r15
movl (%rbx), %r12d
imull %edx, %r12d
addl %ebp, %r12d
movslq %r12d, %r12
leaq (%r12,%r12,2), %r12
movb %r9b, (%r15,%r12)
movb %al, 0x1(%r15,%r12)
movb %r10b, 0x2(%r15,%r12)
incl %ebp
jmp 0x2875
incl %r11d
incl %edx
jmp 0x2867
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::xLine(int, int, RGB)
void Display::xLine(int startX, int y, RGB color) {
	for(int x = startX; x < keyboardImage->w; x++) {
		keyboardImage->data[((y)*keyboardImage->w) + x].r = color.r;
		keyboardImage->data[((y)*keyboardImage->w) + x].g = color.g;
		keyboardImage->data[((y)*keyboardImage->w) + x].b = color.b;
	}
}

// Assembly:
movl %ecx, %eax
shrl $0x8, %eax
movl %ecx, %r8d
shrl $0x10, %r8d
movq 0x30(%rdi), %rdi
movslq (%rdi), %r9
imull %r9d, %edx
movslq %esi, %rsi
movslq %edx, %rdx
addq %rsi, %rdx
leaq (%rdx,%rdx,2), %rdx
addq $0x2, %rdx
cmpq %r9, %rsi
jge 0x28fa
movq 0x8(%rdi), %r10
movb %cl, -0x2(%r10,%rdx)
movb %al, -0x1(%r10,%rdx)
movb %r8b, (%r10,%rdx)
incq %rsi
addq $0x3, %rdx
jmp 0x28da
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::yLine(int, int, RGB)
void Display::yLine(int x, int startY, RGB color) {
	for(int y = startY; y < keyboardImage->h; y++) {
		keyboardImage->data[((y)*keyboardImage->w) + x].r = color.r;
		keyboardImage->data[((y)*keyboardImage->w) + x].g = color.g;
		keyboardImage->data[((y)*keyboardImage->w) + x].b = color.b;
	}
}

// Assembly:
movl %ecx, %eax
shrl $0x8, %eax
movl %ecx, %r8d
shrl $0x10, %r8d
movq 0x30(%rdi), %rdi
movl 0x4(%rdi), %r9d
cmpl %r9d, %edx
jge 0x293c
movq 0x8(%rdi), %r10
movl (%rdi), %r11d
imull %edx, %r11d
addl %esi, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
movb %cl, (%r10,%r11)
movb %al, 0x1(%r10,%r11)
movb %r8b, 0x2(%r10,%r11)
incl %edx
jmp 0x2910
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::keyAt(int, int)
char Display::keyAt(int x, int y) {
	if(x < entryWidth) {
		return 0;
	}

	for(int xCheck = 1; xCheck < 5; xCheck++) {
		//determine row of touch.

		int lastRowStart = CHAR_Y_START(entryWidth, scale, xCheck - 1, rowWidth);
		int rowStart = CHAR_Y_START(entryWidth, scale, xCheck, rowWidth);

		if(x > lastRowStart && x < rowStart) {
			//std::cout << "row: " << xCheck << std::endl;
			for(int yCheck = 1; yCheck < 12; yCheck++) {
				int lastCharStart = CHAR_X_START(margin, yCheck-1, stepSizePx, scale);
				int thisCharStart = CHAR_X_START(margin, yCheck, stepSizePx, scale);
				if(y > lastCharStart && y < thisCharStart) {
					//std::cout << "col: " << yCheck << std::endl;
					if(xCheck > 3) {
						std::cout << "col: " << yCheck << std::endl;
						switch(yCheck) {
							case 10:
								toggleSym2();
								return 0;
							case 11:
								toggleSym1();
								return 0;
							default:
								toLower();
								return ' ';
						}
					}
					char touched = (*currentKeyboard)[(xCheck-1)][10-(yCheck-1)];

					if(touched == 0x0F) {
						toggleUpper();
						return 0;
					}
					else if(touched == 0x00) {
						toLower();
					}

					return touched;
				}
			}
		}
	}
	return 0;
}

// Assembly:
movl 0x14(%rdi), %ecx
cmpl %esi, %ecx
jle 0x2948
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
movl 0xc(%rdi), %r8d
leal (%rcx,%r8,4), %ecx
movl 0x1c(%rdi), %edi
movl 0x20(%rbx), %r11d
leal (%r11,%r8,8), %r9d
addl %eax, %r11d
subl %r8d, %eax
imull $0x7, %r8d, %r10d
addl %r11d, %r10d
pushq $0x1
popq %r8
pushq $-0x1
popq %r11
cmpl $0x5, %r8d
je 0x2a66
movl %r8d, %ebp
subl %edi, %ebp
addl %ecx, %ebp
cmpl %esi, %ebp
jge 0x29c1
movl %edi, %ebp
imull %r8d, %ebp
addl %ecx, %ebp
cmpl %esi, %ebp
jle 0x29c1
movl %r10d, %ebp
movl %eax, %r15d
movl %r11d, %r14d
cmpl $-0xc, %r14d
je 0x29c1
cmpl %edx, %r15d
jge 0x29b6
cmpl %edx, %ebp
jg 0x29c6
decl %r14d
addl %r9d, %r15d
addl %r9d, %ebp
jmp 0x29a7
incl %r8d
jmp 0x297d
cmpl $0x4, %r8d
jne 0x2a0a
negl %r14d
movq 0x35ea(%rip), %rdi      # 0x5fc0
leaq 0x16b2(%rip), %rsi      # 0x408f
callq 0x2160
movq %rax, %rdi
movl %r14d, %esi
callq 0x2250
movq %rax, %rdi
callq 0x20c0
cmpl $0xb, %r14d
je 0x2a45
cmpl $0xa, %r14d
jne 0x2a73
leaq 0xcb(%rbx), %rax
jmp 0x2a4c
movq 0x60(%rbx), %rcx
decl %r8d
movslq %r8d, %rax
addl $0xb, %r14d
imulq $0xb, %rax, %rax
addq %rcx, %rax
movzbl (%r14,%rax), %eax
testl %eax, %eax
je 0x2a5e
cmpl $0xf, %eax
jne 0x2a68
leaq 0x89(%rbx), %rax
leaq 0x68(%rbx), %rdx
cmpq %rax, %rcx
cmovneq %rax, %rdx
movq %rdx, 0x60(%rbx)
jmp 0x2a66
leaq 0xaa(%rbx), %rax
leaq 0x68(%rbx), %rcx
cmpq %rax, 0x60(%rbx)
cmovneq %rax, %rcx
movq %rcx, 0x60(%rbx)
jmp 0x2a66
leaq 0x68(%rbx), %rax
movq %rax, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68(%rbx), %rax
movq %rax, 0x60(%rbx)
movb $0x20, %al
jmp 0x2a68
nop