LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: t0mm4rx[P]piscine_cpp/day00/ex01/nul.cpp
// Function: print_helper()
void print_helper()
{
	std::cout << "Commands" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "ADD" << RESET;
	std::cout << "Add a new contact in the phone book" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "SEARCH" << RESET;
	std::cout << "Display phone book and get detail for one contact" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "EXIT" << RESET;
	std::cout << "Exit the phone book, and lose all data into the deep void of the computer memory" << std::endl;
	std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x5729(%rip), %rdi      # 0x7fc8
leaq 0x283e(%rip), %rsi      # 0x50e4
callq 0x2110
movq %rax, %rdi
movq 0x56fb(%rip), %rsi      # 0x7fb0
callq 0x2130
movq 0x5707(%rip), %rdi      # 0x7fc8
leaq 0x2791(%rip), %rsi      # 0x5059
callq 0x2110
movq %rax, -0x28(%rbp)
movl $0xa, %edi
callq 0x2b00
movq -0x28(%rbp), %rdi
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %esi
callq 0x2140
movq %rax, %rdi
leaq 0x22c(%rip), %rsi       # 0x2b20
callq 0x2080
movq %rax, %rdi
leaq 0x27ea(%rip), %rsi      # 0x50ed
callq 0x2110
movq %rax, %rdi
leaq 0x276a(%rip), %rsi      # 0x507c
callq 0x2110
movq 0x56aa(%rip), %rdi      # 0x7fc8
leaq 0x27cc(%rip), %rsi      # 0x50f1
callq 0x2110
movq %rax, %rdi
movq 0x567c(%rip), %rsi      # 0x7fb0
callq 0x2130
movq 0x5688(%rip), %rdi      # 0x7fc8
leaq 0x2712(%rip), %rsi      # 0x5059
callq 0x2110
movq %rax, -0x20(%rbp)
movl $0xa, %edi
callq 0x2b00
movq -0x20(%rbp), %rdi
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %esi
callq 0x2140
movq %rax, %rdi
leaq 0x1ad(%rip), %rsi       # 0x2b20
callq 0x2080
movq %rax, %rdi
leaq 0x2793(%rip), %rsi      # 0x5115
callq 0x2110
movq %rax, %rdi
leaq 0x26eb(%rip), %rsi      # 0x507c
callq 0x2110
movq 0x562b(%rip), %rdi      # 0x7fc8
leaq 0x2778(%rip), %rsi      # 0x511c
callq 0x2110
movq %rax, %rdi
movq 0x55fd(%rip), %rsi      # 0x7fb0
callq 0x2130
movq 0x5609(%rip), %rdi      # 0x7fc8
leaq 0x2693(%rip), %rsi      # 0x5059
callq 0x2110
movq %rax, -0x18(%rbp)
movl $0xa, %edi
callq 0x2b00
movq -0x18(%rbp), %rdi
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
callq 0x2140
movq %rax, %rdi
leaq 0x12e(%rip), %rsi       # 0x2b20
callq 0x2080
movq %rax, %rdi
leaq 0x274d(%rip), %rsi      # 0x514e
callq 0x2110
movq %rax, %rdi
leaq 0x266c(%rip), %rsi      # 0x507c
callq 0x2110
movq 0x55ac(%rip), %rdi      # 0x7fc8
leaq 0x2730(%rip), %rsi      # 0x5153
callq 0x2110
movq %rax, %rdi
movq 0x557e(%rip), %rsi      # 0x7fb0
callq 0x2130
movq 0x558a(%rip), %rdi      # 0x7fc8
movq 0x556b(%rip), %rsi      # 0x7fb0
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
// File: t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: handle_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Contact*, int*)
void handle_command(std::string cmd, Contact contacts[8], int *index)
{
	if (to_upper(cmd) == "EXIT")
		exit(0);
	else if (to_upper(cmd) == "ADD")
		add(contacts, index);
	else if (to_upper(cmd) == "SEARCH")
		search(contacts, index);
	else if (cmd != "")
		std::cout << "Not a valid command!" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, -0xf8(%rbp)
movq %rsi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x20b0
movq -0xf0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2ff0
jmp 0x2dc6
leaq 0x2381(%rip), %rsi      # 0x514e
leaq -0x38(%rbp), %rdi
callq 0x4230
movb %al, -0xf9(%rbp)
jmp 0x2dde
leaq -0x38(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdi
callq 0x20e0
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x2dfc
jmp 0x2e34
xorl %edi, %edi
callq 0x2150
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2e26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdi
callq 0x20e0
jmp 0x2fe6
movq -0xf8(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x20b0
movq -0x108(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x2ff0
jmp 0x2e63
leaq 0x2283(%rip), %rsi      # 0x50ed
leaq -0x88(%rbp), %rdi
callq 0x4230
movb %al, -0x109(%rbp)
jmp 0x2e7e
leaq -0x88(%rbp), %rdi
callq 0x20e0
leaq -0xa8(%rbp), %rdi
callq 0x20e0
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x2ea2
jmp 0x2eeb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3080
jmp 0x2fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2eda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x20e0
leaq -0xa8(%rbp), %rdi
callq 0x20e0
jmp 0x2fe6
movq -0xf8(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x20b0
movq -0x118(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x2ff0
jmp 0x2f1a
leaq 0x21f4(%rip), %rsi      # 0x5115
leaq -0xc8(%rbp), %rdi
callq 0x4230
movb %al, -0x119(%rbp)
jmp 0x2f35
leaq -0xc8(%rbp), %rdi
callq 0x20e0
leaq -0xe8(%rbp), %rdi
callq 0x20e0
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x2f59
jmp 0x2f9c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3a60
jmp 0x2fd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2f8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x20e0
leaq -0xe8(%rbp), %rdi
callq 0x20e0
jmp 0x2fe6
movq -0xf8(%rbp), %rdi
leaq 0x20ae(%rip), %rsi      # 0x5058
callq 0x4260
testb $0x1, %al
jne 0x2fb5
jmp 0x2fd7
movq 0x500c(%rip), %rdi      # 0x7fc8
leaq 0x21e3(%rip), %rsi      # 0x51a6
callq 0x2110
movq %rax, %rdi
movq 0x4fde(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x2fd9
jmp 0x2fdb
jmp 0x2fdd
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2210
nop
// File: t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: to_upper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string to_upper(std::string str)
{
	int str_len = str.length();

	for (int i = 0; i < str_len; i++)
		str[i] = std::toupper(str[i]);
	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, %rax
movq -0x30(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x21b0
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3062
movq -0x30(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x2250
movsbl (%rax), %edi
callq 0x2230
movq -0x30(%rbp), %rdi
movb %al, -0x31(%rbp)
movslq -0x18(%rbp), %rsi
callq 0x2250
movb -0x31(%rbp), %cl
movb %cl, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3025
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdi
callq 0x20c0
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: search(Contact*, int*)
void search(Contact contacts[8], int *index)
{
	std::string	buffer;
	int					detail;

	print_contacts(contacts, index);
	if (*index == 0)
		return;
	std::cin.ignore();
	std::cout << "Enter the index of the contact: ";
	std::getline(std::cin, buffer);
	try {
		detail = std::stoi(buffer);
		if (detail >= 0 && detail < *index)
		{
			contacts[detail].print();
			std::cout << std::endl;
		}
		else
			std::cout << "No contact with this id!" << std::endl << std::endl;
	}
	catch (std::invalid_argument)
	{
		std::cout << "Invalid index!" << std::endl << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2190
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3c80
jmp 0x3a8b
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3ab1
movl $0x1, -0x48(%rbp)
jmp 0x3be7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3c62
movq 0x4528(%rip), %rdi      # 0x7fe0
callq 0x2220
jmp 0x3abf
movq 0x4502(%rip), %rdi      # 0x7fc8
leaq 0x16ee(%rip), %rsi      # 0x51bb
callq 0x2110
jmp 0x3ad4
movq 0x4505(%rip), %rdi      # 0x7fe0
leaq -0x30(%rbp), %rsi
callq 0x2050
jmp 0x3ae6
xorl %eax, %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
movl $0xa, %edx
callq 0x4290
movl %eax, -0x5c(%rbp)
jmp 0x3afd
movl -0x5c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x3bf9
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3bf9
movq -0x8(%rbp), %rdi
movslq -0x34(%rbp), %rax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rdi
callq 0x4770
jmp 0x3b35
movq 0x448c(%rip), %rdi      # 0x7fc8
movq 0x446d(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x3b4a
jmp 0x3c42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3c62
movq -0x40(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x2160
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x42d0
movq -0x70(%rbp), %rdi
callq 0x2090
movq 0x4434(%rip), %rdi      # 0x7fc8
leaq 0x165a(%rip), %rsi      # 0x51f5
callq 0x2110
movq %rax, -0x68(%rbp)
jmp 0x3ba6
movq -0x68(%rbp), %rdi
movq 0x43ff(%rip), %rsi      # 0x7fb0
callq 0x2130
movq %rax, -0x78(%rbp)
jmp 0x3bbc
movq -0x78(%rbp), %rdi
movq 0x43e9(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x3bce
leaq -0x58(%rbp), %rdi
callq 0x21e0
callq 0x21d0
jmp 0x3bde
jmp 0x3be0
movl $0x0, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x20e0
addq $0x90, %rsp
popq %rbp
retq
movq 0x43c8(%rip), %rdi      # 0x7fc8
leaq 0x15d5(%rip), %rsi      # 0x51dc
callq 0x2110
movq %rax, -0x80(%rbp)
jmp 0x3c12
movq -0x80(%rbp), %rdi
movq 0x4393(%rip), %rsi      # 0x7fb0
callq 0x2130
movq %rax, -0x88(%rbp)
jmp 0x3c2b
movq -0x88(%rbp), %rdi
movq 0x4377(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x3c40
jmp 0x3c42
jmp 0x3be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x21e0
callq 0x21d0
jmp 0x3c60
jmp 0x3c62
leaq -0x30(%rbp), %rdi
callq 0x20e0
movq -0x40(%rbp), %rdi
callq 0x2210
movq %rax, %rdi
callq 0x4310
nopl (%rax)
// File: dustin[P]kvtest/sqlite3-test.cc
// Function: main
int main(int argc, char **args) {
    const char *env_path = getenv("SQLITE_TEST_DB");
    Sqlite3 sq(env_path ? env_path : "/tmp/test.db",
               getenv("KVSTORE_AUDITABLE"));
    TestSuite suite(&sq);
    return suite.run() ? 0 : 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x97d4(%rip), %rdi      # 0xe004
callq 0x4390
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x484d
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x485d
leaq 0x97bf(%rip), %rax      # 0xe013
movq %rax, -0x88(%rbp)
jmp 0x485d
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x97ae(%rip), %rdi      # 0xe020
callq 0x4390
movq -0x98(%rbp), %rsi
testq %rax, %rax
setne %al
movzbl %al, %edx
leaq -0x50(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x4930
movq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x80f0
jmp 0x48a9
leaq -0x70(%rbp), %rdi
callq 0x8370
movb %al, -0x99(%rbp)
jmp 0x48ba
movb -0x99(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x82a0
leaq -0x50(%rbp), %rdi
callq 0x49a0
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4911
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x82a0
leaq -0x50(%rbp), %rdi
callq 0x49a0
movq -0x78(%rbp), %rdi
callq 0x44b0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::PreparedStatement(sqlite3*, char const*)
PreparedStatement::PreparedStatement(sqlite3 *d, const char *query) {
        db = d;
        if(sqlite3_prepare_v2(db, query, (int)strlen(query), &st, NULL)
           != SQLITE_OK) {
            throw std::runtime_error(sqlite3_errmsg(db));
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4100
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl %eax, %edx
addq $0x8, %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4290
cmpl $0x0, %eax
je 0x4a7c
movl $0x10, %edi
callq 0x4110
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq (%rax), %rdi
callq 0x42a0
movq %rax, -0x48(%rbp)
jmp 0x4a3f
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x40c0
jmp 0x4a4e
movq -0x50(%rbp), %rdi
movq 0x10597(%rip), %rsi     # 0x14ff0
movq 0x10558(%rip), %rdx     # 0x14fb8
callq 0x4480
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x41d0
jmp 0x4a82
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x44b0
nopl (%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::execute()
int PreparedStatement::execute() {
        int steps_run = 0, rc = 0;
        while ((rc = sqlite3_step(st)) != SQLITE_DONE) {
            steps_run++;
            assert(steps_run < MAX_STEPS);
            if (rc == SQLITE_ROW) {
                // This is rather normal
            } else if (rc == SQLITE_BUSY) {
                std::cerr << "SQLITE_BUSY (retrying)" << std::endl;
            } else {
                const char *msg = sqlite3_errmsg(db);
                std::cerr << "sqlite error:  " << msg << std::endl;
                assert(false);
            }
        }
        return sqlite3_changes(db);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x43e0
movl %eax, -0x10(%rbp)
cmpl $0x65, %eax
je 0x4c27
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x2710, -0xc(%rbp)     # imm = 0x2710
jge 0x4b6f
jmp 0x4b8e
leaq 0x94bc(%rip), %rdi      # 0xe032
leaq 0x94cb(%rip), %rsi      # 0xe048
movl $0x1d, %edx
leaq 0x94ce(%rip), %rcx      # 0xe057
callq 0x4170
cmpl $0x64, -0x10(%rbp)
jne 0x4b99
jmp 0x4c22
cmpl $0x5, -0x10(%rbp)
jne 0x4bc3
movq 0x10442(%rip), %rdi     # 0x14fe8
leaq 0x94d3(%rip), %rsi      # 0xe080
callq 0x42c0
movq %rax, %rdi
movq 0x103ec(%rip), %rsi     # 0x14fa8
callq 0x42f0
jmp 0x4c20
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x42a0
movq %rax, -0x18(%rbp)
movq 0x1040e(%rip), %rdi     # 0x14fe8
leaq 0x94b6(%rip), %rsi      # 0xe097
callq 0x42c0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x42c0
movq %rax, %rdi
movq 0x103ac(%rip), %rsi     # 0x14fa8
callq 0x42f0
leaq 0x949f(%rip), %rdi      # 0xe0a7
leaq 0x9439(%rip), %rsi      # 0xe048
movl $0x25, %edx
leaq 0x943c(%rip), %rcx      # 0xe057
callq 0x4170
jmp 0x4c22
jmp 0x4b42
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x4310
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::fetch()
bool PreparedStatement::fetch() {
        bool rv = true;
        assert(st);
        switch(sqlite3_step(st)) {
        case SQLITE_BUSY:
            throw std::runtime_error("DB was busy.");
            break;
        case SQLITE_ROW:
            break;
        case SQLITE_DONE:
            rv = false;
            break;
        default:
            throw std::runtime_error("Unhandled case.");
        }
        return rv;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x1, -0x9(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x4c61
jmp 0x4c80
leaq 0x9a32(%rip), %rdi      # 0xe69a
leaq 0x93d9(%rip), %rsi      # 0xe048
movl $0x2d, %edx
leaq 0x9432(%rip), %rcx      # 0xe0ad
callq 0x4170
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x43e0
movl %eax, %ecx
movl %ecx, -0x2c(%rbp)
subl $0x5, %eax
je 0x4cad
jmp 0x4c99
movl -0x2c(%rbp), %eax
subl $0x64, %eax
je 0x4cfd
jmp 0x4ca3
movl -0x2c(%rbp), %eax
subl $0x65, %eax
je 0x4cff
jmp 0x4d05
movl $0x10, %edi
callq 0x4110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x940d(%rip), %rsi      # 0xe0d5
callq 0x40c0
jmp 0x4ccf
movq -0x38(%rbp), %rdi
movq 0x10316(%rip), %rsi     # 0x14ff0
movq 0x102d7(%rip), %rdx     # 0x14fb8
callq 0x4480
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x41d0
jmp 0x4d60
jmp 0x4d55
movb $0x0, -0x9(%rbp)
jmp 0x4d55
movl $0x10, %edi
callq 0x4110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x93c2(%rip), %rsi      # 0xe0e2
callq 0x40c0
jmp 0x4d27
movq -0x40(%rbp), %rdi
movq 0x102be(%rip), %rsi     # 0x14ff0
movq 0x1027f(%rip), %rdx     # 0x14fb8
callq 0x4480
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x41d0
jmp 0x4d60
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x44b0
nopl (%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::open()
void BaseSqlite3::open() {
        if(!db) {
            if(sqlite3_open(filename, &db) !=  SQLITE_OK) {
                throw std::runtime_error("Error initializing sqlite3");
            }

            if(sqlite3_extended_result_codes(db, 1) != SQLITE_OK) {
                throw std::runtime_error("Error enabling extended RCs");
            }

            intransaction = false;
            initTables();
            initStatements();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x4f97
movq -0x20(%rbp), %rsi
movq 0x10(%rsi), %rdi
addq $0x8, %rsi
callq 0x44a0
cmpl $0x0, %eax
je 0x4f18
movl $0x10, %edi
callq 0x4110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
leaq 0x922d(%rip), %rsi      # 0xe10d
callq 0x40c0
jmp 0x4ee7
movq -0x28(%rbp), %rdi
movq 0x100fe(%rip), %rsi     # 0x14ff0
movq 0x100bf(%rip), %rdx     # 0x14fb8
callq 0x4480
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x41d0
jmp 0x4f9d
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x4190
cmpl $0x0, %eax
je 0x4f7f
movl $0x10, %edi
callq 0x4110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x91de(%rip), %rsi      # 0xe128
callq 0x40c0
jmp 0x4f51
movq -0x30(%rbp), %rdi
movq 0x10094(%rip), %rsi     # 0x14ff0
movq 0x10055(%rip), %rdx     # 0x14fb8
callq 0x4480
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x41d0
jmp 0x4f9d
movq -0x20(%rbp), %rdi
movb $0x0, 0x18(%rdi)
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0x30, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x44b0
nopw %cs:(%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::close()
void BaseSqlite3::close() {
        if(db) {
            intransaction = false;
            destroyStatements();
            sqlite3_close(db);
            db = NULL;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x5032
movq -0x10(%rbp), %rdi
movb $0x0, 0x18(%rdi)
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4120
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::reset()
void BaseSqlite3::reset() {
        if(db) {
            rollback();
            close();
            open();
            destroyTables();
            initTables();
            execute("vacuum");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x50ab
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq -0x10(%rbp), %rdi
callq 0x4ff0
movq -0x10(%rbp), %rdi
callq 0x4e90
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x10(%rbp), %rdi
leaq 0x909e(%rip), %rsi      # 0xe144
callq 0x50c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::destroyStatements()
void Sqlite3::destroyStatements() {
        delete ins_stmt;
        delete sel_stmt;
        delete del_stmt;
        ins_stmt = sel_stmt = del_stmt = NULL;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x5349
movq -0x10(%rbp), %rdi
callq 0x4a90
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x42e0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x5372
movq -0x20(%rbp), %rdi
callq 0x4a90
movq -0x20(%rbp), %rdi
movl $0x10, %esi
callq 0x42e0
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x539b
movq -0x28(%rbp), %rdi
callq 0x4a90
movq -0x28(%rbp), %rdi
movl $0x10, %esi
callq 0x42e0
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq $0x0, 0x28(%rax)
movq $0x0, 0x20(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::initTables()
void Sqlite3::initTables() {
        execute("create table if not exists kv"
                " (k varchar(250) primary key on conflict replace,"
                "  v text)");
        if(auditable) {
            execute("create table if not exists history ("
                    " id integer primary key autoincrement,"
                    " op char(1) not null,"
                    " key varchar(250) not null,"
                    " value text null)");
            execute("create trigger if not exists on_audit_insert"
                    " before insert on kv for each row begin"
                    "  insert into history (op,key,value)"
                    "         values ('s', new.k, new.v);"
                    " end");
            execute("create trigger if not exists on_audit_delete"
                    " before delete on kv for each row begin"
                    "  insert into history (op,key)"
                    "         values ('d', old.k);"
                    " end");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
leaq 0x8ddf(%rip), %rsi      # 0xe1ba
callq 0x50c0
movq -0x10(%rbp), %rax
testb $0x1, 0x19(%rax)
je 0x541a
movq -0x10(%rbp), %rdi
leaq 0x8e1d(%rip), %rsi      # 0xe212
callq 0x50c0
movq -0x10(%rbp), %rdi
leaq 0x8e99(%rip), %rsi      # 0xe29e
callq 0x50c0
movq -0x10(%rbp), %rdi
leaq 0x8f29(%rip), %rsi      # 0xe33e
callq 0x50c0
addq $0x10, %rsp
popq %rbp
retq
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::destroyTables()
void Sqlite3::destroyTables() {
        execute("drop table if exists kv");
        execute("drop table if exists history");
        execute("drop trigger if exists on_audit_insert");
        execute("drop trigger if exists on_audit_delete");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
leaq 0x8f96(%rip), %rsi      # 0xe3d1
callq 0x50c0
movq -0x10(%rbp), %rdi
leaq 0x8f9e(%rip), %rsi      # 0xe3e9
callq 0x50c0
movq -0x10(%rbp), %rdi
leaq 0x8fab(%rip), %rsi      # 0xe406
callq 0x50c0
movq -0x10(%rbp), %rdi
leaq 0x8fc2(%rip), %rsi      # 0xe42d
callq 0x50c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*, kvtest::Callback<bool>&)
void Sqlite3::set(std::string &key, const char *val,
                      kvtest::Callback<bool> &cb) {
        ins_stmt->bind(1, key.c_str());
        ins_stmt->bind(2, val);
        bool rv = ins_stmt->execute() == 1;
        cb.callback(rv);
        ins_stmt->reset();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40e0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movl $0x1, %esi
callq 0x4ac0
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rdx
movl $0x2, %esi
callq 0x4ac0
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4b20
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
leaq -0x21(%rbp), %rsi
callq *0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4da0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::del(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, kvtest::Callback<bool>&)
void Sqlite3::del(std::string &key, kvtest::Callback<bool> &cb) {
        del_stmt->bind(1, key.c_str());
        bool rv = del_stmt->execute() == 1;
        cb.callback(rv);
        del_stmt->reset();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40e0
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movl $0x1, %esi
callq 0x4ac0
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x4b20
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
leaq -0x19(%rbp), %rsi
callq *0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x4da0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: markondej[P]phase_correl/phase_correl.cpp
// Function: main
int main()
{
    int deltax, deltay;

    // Generate pair of images
    GrayscaleImage image1(256, 128, 0x00), image2(256, 128, 0xff);
    image1.DrawRectangle(16, 32, 60, 60, 0x80);
    image2.DrawRectangle(8, 40, 60, 60, 0x10);

    PhaseCorrelation::ComputeShift(image1, image2, deltax, deltay);

    std::cout << "Calculated shift: [" << deltax << ", " << deltay << "]" << std::endl;

    return 0;
}

// Assembly:
subq $0x48, %rsp
movl $0x0, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x80, %edx
xorl %ecx, %ecx
callq 0x1420
leaq 0x8(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x80, %edx
movl $0xff, %ecx
callq 0x1420
leaq 0x20(%rsp), %rdi
movl $0x10, %esi
movl $0x20, %edx
movl $0x3c, %r8d
movl $0x80, %r9d
movq %r8, %rcx
callq 0x14a0
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x28, %edx
movl $0x3c, %r8d
movl $0x10, %r9d
movq %r8, %rcx
callq 0x14a0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x3c(%rsp), %rcx
callq 0x1580
movq 0x6c0f(%rip), %rdi      # 0x7fd0
leaq 0x3c98(%rip), %rsi      # 0x5060
callq 0x1120
movq %rax, %rdi
movl 0x40(%rsp), %esi
callq 0x11a0
movq %rax, %rdi
leaq 0x3c91(%rip), %rsi      # 0x5074
callq 0x1120
movq %rax, %rdi
movl 0x3c(%rsp), %esi
callq 0x11a0
movq %rax, %rdi
leaq 0x3c79(%rip), %rsi      # 0x5077
callq 0x1120
movq %rax, %rdi
movq 0x6bab(%rip), %rsi      # 0x7fb8
callq 0x1140
xorl %eax, %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: markondej[P]phase_correl/phase_correl.cpp
// Function: GrayscaleImage::GrayscaleImage(unsigned long, unsigned long, unsigned char)
GrayscaleImage(std::size_t width, std::size_t height, unsigned char fill) {
        data = new unsigned char[width * height];
        memset(data, fill, sizeof(unsigned char) * width * height);
        this->width = width;
        this->height = height;
    }

// Assembly:
subq $0x28, %rsp
movb %cl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movb %al, 0xf(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
imulq 0x10(%rsp), %rdi
callq 0x1030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rdi
movzbl 0xf(%rsp), %eax
movq 0x18(%rsp), %rdx
shlq $0x0, %rdx
imulq 0x10(%rsp), %rdx
movzbl %al, %esi
callq 0x10b0
movq (%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: markondej[P]phase_correl/phase_correl.cpp
// Function: GrayscaleImage::DrawRectangle(unsigned long, unsigned long, unsigned long, unsigned long, unsigned char)
void DrawRectangle(std::size_t x, std::size_t y, std::size_t width, std::size_t height, unsigned char fill) {
        for (std::size_t j = y; j < y + height; j++) {
            for (std::size_t i = x; i < x + width; i++) {
                if ((i < this->width) && (j < this->height)) {
                    data[i + j * this->width] = fill;
                }
            }
        }
    }

// Assembly:
movb %r9b, %al
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movq %r8, -0x28(%rsp)
movb %al, -0x29(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x48(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
movq -0x18(%rsp), %rcx
addq -0x28(%rsp), %rcx
cmpq %rcx, %rax
jae 0x1571
movq -0x10(%rsp), %rax
movq %rax, -0x40(%rsp)
movq -0x40(%rsp), %rax
movq -0x10(%rsp), %rcx
addq -0x20(%rsp), %rcx
cmpq %rcx, %rax
jae 0x155c
movq -0x48(%rsp), %rcx
movq -0x40(%rsp), %rax
cmpq (%rcx), %rax
jae 0x154a
movq -0x48(%rsp), %rcx
movq -0x38(%rsp), %rax
cmpq 0x8(%rcx), %rax
jae 0x154a
movq -0x48(%rsp), %rdi
movb -0x29(%rsp), %dl
movq 0x10(%rdi), %rax
movq -0x40(%rsp), %rcx
movq -0x38(%rsp), %rsi
imulq (%rdi), %rsi
addq %rsi, %rcx
movb %dl, (%rax,%rcx)
jmp 0x154c
movq -0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rsp)
jmp 0x14f6
jmp 0x155e
movq -0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
jmp 0x14d4
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::GenInputOrder(unsigned long)
static std::vector<std::size_t> GenInputOrder(std::size_t size) {
        std::size_t stride = 1;
        std::vector<std::size_t> offset;
        offset.resize(size);

        std::memset(offset.data(), 0xff, sizeof(std::size_t) * size);
        offset[0] = 0;

        for (std::size_t step = size >> 1; step > 0; step >>= 1) {
            std::size_t base = 0;
            for (std::size_t i = 0; i < size; i += step) {
                if (offset[i] != SIZE_MAX) {
                    base = offset[i];
                } else {
                    offset[i] = base + stride;
                }
            }
            stride <<= 1;
        }

        return offset;
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq $0x1, 0x50(%rsp)
movb $0x0, 0x4f(%rsp)
callq 0x3c40
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x3c50
jmp 0x33ef
movq 0x18(%rsp), %rdi
callq 0x3cf0
movq %rax, %rdi
movq 0x58(%rsp), %rdx
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x10b0
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3690
movq $0x0, (%rax)
movq 0x58(%rsp), %rax
shrq %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jbe 0x3502
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x34e3
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3690
cmpq $-0x1, (%rax)
je 0x34a7
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3690
movq (%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x34cd
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x3be0
jmp 0x3522
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rsi
callq 0x3690
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x34cf
movq 0x30(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x344f
movq 0x50(%rsp), %rax
shlq %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
shrq %rax
movq %rax, 0x30(%rsp)
jmp 0x3431
movb $0x1, 0x4f(%rsp)
testb $0x1, 0x4f(%rsp)
jne 0x3518
movq 0x18(%rsp), %rdi
callq 0x3be0
movq 0x10(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x11c0
nopl (%rax)
// File: markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::Radix2FFT(std::complex<double> const*, std::complex<double>*, unsigned long)
static void Radix2FFT(const std::complex<double> *input, std::complex<double> *output, std::size_t stride) {
        output[0].real(input[0].real() + input[stride].real());
        output[0].imag(input[0].imag() + input[stride].imag());

        output[1].real(input[0].real() - input[stride].real());
        output[1].imag(input[0].imag() - input[stride].imag());
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x2130
movsd %xmm0, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2130
movq (%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0x4820
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2140
movsd %xmm0, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2140
movq 0x10(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0x4840
movq 0x48(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2130
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2130
movq 0x20(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
subsd %xmm1, %xmm0
callq 0x4820
movq 0x48(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2140
movsd %xmm0, 0x38(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x2140
movq 0x30(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
subsd %xmm1, %xmm0
callq 0x4840
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: JohnWoodman[P]SHellNo/listener.cpp
// Function: listener::test()
void listener::test(){
	printf("server: waiting for connections...\n");
	sin_size = sizeof their_addr;
	new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
	if (new_fd == -1) {
		cout<<"accepted error"<<endl;
	}
	cout<<"got connection"<<endl;
	status = 1;
	inet_ntop(their_addr.ss_family, get_in_addr((struct sockaddr *)&their_addr), s, sizeof s);
	//postExploitMenu(this);

	//close(sockfd);
	//close(new_fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x4a17(%rip), %rdi      # 0x35152
movb $0x0, %al
callq 0x6090
movq -0x10(%rbp), %rdx
movl $0x80, 0xe0(%rdx)
movl 0x10(%rdx), %edi
movq %rdx, %rsi
addq $0x60, %rsi
addq $0xe0, %rdx
callq 0x6190
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
cmpl $-0x1, 0x14(%rax)
jne 0x30797
movq 0x1c82c(%rip), %rdi     # 0x4cfa8
leaq 0x49f3(%rip), %rsi      # 0x35176
callq 0x64a0
movq %rax, %rdi
movq 0x1c7de(%rip), %rsi     # 0x4cf70
callq 0x64f0
movq 0x1c80a(%rip), %rdi     # 0x4cfa8
leaq 0x49e0(%rip), %rsi      # 0x35185
callq 0x64a0
movq %rax, %rdi
movq 0x1c7bc(%rip), %rsi     # 0x4cf70
callq 0x64f0
movq -0x10(%rbp), %rdi
movl $0x1, 0x184(%rdi)
movzwl 0x60(%rdi), %eax
movl %eax, -0x14(%rbp)
addq $0x60, %rdi
callq 0x30400
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %edi
movq %rax, %rsi
addq $0x188, %rdx            # imm = 0x188
movl $0x2e, %ecx
callq 0x6510
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: JohnWoodman[P]SHellNo/listener.cpp
// Function: printingThing(void*)
void 
*printingThing(void* in){
	int new_fd = *(int*)in;
	char* recvbuf = new char[2048];
	int n = 1000;
	int buflen = 2048;
	int byte_recv;
	do{
		byte_recv = recv(new_fd, recvbuf, buflen, 0);
		for(int i=0;i<byte_recv;i++){
			printf("%c",recvbuf[i]);
		}
		n--;
	}while(n>0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl $0x800, %edi            # imm = 0x800
callq 0x6040
movq %rax, -0x18(%rbp)
movl $0x3e8, -0x1c(%rbp)     # imm = 0x3E8
movl $0x800, -0x20(%rbp)     # imm = 0x800
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x61a0
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x311da
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %esi
leaq 0x4108(%rip), %rdi      # 0x352d0
movb $0x0, %al
callq 0x6090
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x311ad
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x31191
ud2
nopl (%rax,%rax)
// File: JohnWoodman[P]SHellNo/listener.cpp
// Function: listener::dropIntoShell()
int listener::dropIntoShell() {
	printf("Dropping into Shell...\n");

	char* sendbuf = new char[2048];
	char* recvbuf = new char[2048];
	int buflen = 2048;
	memset(sendbuf, '\0', buflen);
	memset(recvbuf, '\0', buflen);

	char cmd[] = "dropshell:";
	send(new_fd, cmd, strlen(cmd), 0);

	printf("Dropped into shell!\n");

	int bytes;
	int byte_recv;
	int n;
	pthread_attr_t attr;
	void* status;
    	// Initialize and set thread joinable
    	pthread_attr_init(&attr);
    	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
	pthread_t t;
	pthread_create(&t,&attr,printingThing,(void*)&new_fd);

	do {
		n = 0;
		fgets(sendbuf,1024,stdin);

		n = strlen(sendbuf);
		sendbuf[n]='\n'; sendbuf[n+1]='\0';

		bytes = send(new_fd, sendbuf, strlen(sendbuf), 0);

	} while (true);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x40c2(%rip), %rdi      # 0x352d3
movb $0x0, %al
callq 0x6090
movl $0x800, %edi            # imm = 0x800
callq 0x6040
movq %rax, -0x10(%rbp)
movl $0x800, %edi            # imm = 0x800
callq 0x6040
movq %rax, -0x18(%rbp)
movl $0x800, -0x1c(%rbp)     # imm = 0x800
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x62c0
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x62c0
movq -0x88(%rbp), %rax
movq 0x4084(%rip), %rcx      # 0x352eb
movq %rcx, -0x27(%rbp)
movw 0x4081(%rip), %cx       # 0x352f3
movw %cx, -0x1f(%rbp)
movb 0x4079(%rip), %cl       # 0x352f5
movb %cl, -0x1d(%rbp)
movl 0x14(%rax), %eax
movl %eax, -0x94(%rbp)
leaq -0x27(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x6240
movl -0x94(%rbp), %edi
movq -0x90(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x6290
leaq 0x403c(%rip), %rdi      # 0x352f6
movb $0x0, %al
callq 0x6090
leaq -0x70(%rbp), %rdi
callq 0x65b0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x6680
movq -0x88(%rbp), %rcx
addq $0x14, %rcx
leaq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x18f(%rip), %rdx      # 0x31160
callq 0x68a0
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movq 0x1bc8a(%rip), %rax     # 0x4cf90
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x6760
movq -0x10(%rbp), %rdi
callq 0x6240
movq %rax, %rcx
movq -0x88(%rbp), %rax
movl %ecx, -0x34(%rbp)
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movb $0xa, (%rcx,%rdx)
movq -0x10(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movb $0x0, (%rcx,%rdx)
movl 0x14(%rax), %eax
movl %eax, -0xa4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6240
movl -0xa4(%rbp), %edi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x6290
movl %eax, -0x2c(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x312f4
jmp 0x31389
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnWoodman[P]SHellNo/listenerManager.cpp
// Function: listenerManager::addListener(int)
int
listenerManager::addListener(int port){
    listener* newListener = new listener(port);
    listeners.push_back(newListener);
    thread t1(&listener::test,newListener);
    t1.detach();
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x1c0, %edi            # imm = 0x1C0
callq 0x64b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %esi
callq 0x30440
jmp 0x32135
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
movq %rsi, -0x60(%rbp)
callq 0x322e0
movq -0x60(%rbp), %rdx
leaq -0x1a39(%rip), %rax     # 0x30720
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x32350
movq -0x58(%rbp), %rdi
callq 0x6830
jmp 0x32181
leaq -0x30(%rbp), %rdi
callq 0x32410
movl $0x1, %eax
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x64c0
jmp 0x321c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x32410
movq -0x20(%rbp), %rdi
callq 0x6850
nop
// File: ushitora-anqou[P]aqtfhe2/main.cpp
// Function: aqtfhe2::detail::nd_array<bool, 1000ul> (anonymous namespace)::random_bool_array<1000ul, std::random_device>(std::random_device&)
nd_array<bool, N> random_bool_array(RandomEngine& rand)
{
    nd_array<bool, N> ret;
    std::binomial_distribution<int> binary;
    for (bool& v : ret)
        v = binary(rand);
    return ret;
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, (%rsp)
movq %rsi, 0xc0(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xac10
movq 0x8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3300
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3310
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x2fc2
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xc0(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0xac30
cmpl $0x0, %eax
setne %cl
movq 0x10(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2f7a
movq (%rsp), %rax
addq $0xc8, %rsp
retq
nop
// File: ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::secret_key<aqtfhe2::params::CGGI16> aqtfhe2::secret_key<aqtfhe2::params::CGGI16>::make<std::random_device>(std::random_device&)
static secret_key make(RandomEngine &rand)
    {
        std::binomial_distribution<uint32_t> binary;

        container_key_lvl0 key_lvl0;
        for (uint32_t &v : key_lvl0)
            v = binary(rand);

        container_key_lvl1 key_lvl1;
        for (uint32_t &v : key_lvl1)
            v = binary(rand);

        return secret_key{std::move(key_lvl0), std::move(key_lvl1)};
    }

// Assembly:
subq $0x4868, %rsp           # imm = 0x4868
movq %rdi, 0x17e0(%rsp)
movq %rdi, 0x17e8(%rsp)
movq %rsi, 0x4860(%rsp)
leaq 0x47d0(%rsp), %rdi
callq 0x39d0
leaq 0x4000(%rsp), %rax
movq %rax, 0x3ff8(%rsp)
movq 0x3ff8(%rsp), %rdi
callq 0x39f0
movq %rax, 0x3ff0(%rsp)
movq 0x3ff8(%rsp), %rdi
callq 0x3a00
movq %rax, 0x3fe8(%rsp)
movq 0x3ff0(%rsp), %rax
cmpq 0x3fe8(%rsp), %rax
je 0x312f
movq 0x3ff0(%rsp), %rax
movq %rax, 0x3fe0(%rsp)
movq 0x4860(%rsp), %rsi
leaq 0x47d0(%rsp), %rdi
callq 0x3a10
movl %eax, %ecx
movq 0x3fe0(%rsp), %rax
movl %ecx, (%rax)
movq 0x3ff0(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x3ff0(%rsp)
jmp 0x30d6
leaq 0x2fe0(%rsp), %rax
movq %rax, 0x2fd8(%rsp)
movq 0x2fd8(%rsp), %rdi
callq 0x3a40
movq %rax, 0x2fd0(%rsp)
movq 0x2fd8(%rsp), %rdi
callq 0x3a50
movq %rax, 0x2fc8(%rsp)
movq 0x2fd0(%rsp), %rax
cmpq 0x2fc8(%rsp), %rax
je 0x31c2
movq 0x2fd0(%rsp), %rax
movq %rax, 0x2fc0(%rsp)
movq 0x4860(%rsp), %rsi
leaq 0x47d0(%rsp), %rdi
callq 0x3a10
movl %eax, %ecx
movq 0x2fc0(%rsp), %rax
movl %ecx, (%rax)
movq 0x2fd0(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x2fd0(%rsp)
jmp 0x3169
leaq 0x27f0(%rsp), %rdi
leaq 0x4000(%rsp), %rsi
movl $0x7d0, %edx            # imm = 0x7D0
callq 0x2160
leaq 0x17f0(%rsp), %rdi
leaq 0x2fe0(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2160
movq %rsp, %rdi
movq %rdi, 0x17d8(%rsp)
movl $0xfa, %ecx
leaq 0x27f0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x17d8(%rsp), %rdi
addq $0x7d0, %rdi            # imm = 0x7D0
movl $0x200, %ecx            # imm = 0x200
leaq 0x17f0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x17e0(%rsp), %rdi
callq 0x3a60
movq 0x17e8(%rsp), %rax
addq $0x4868, %rsp           # imm = 0x4868
retq
nopl (%rax)
// File: ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::cloud_key<aqtfhe2::params::CGGI16>::cloud_key<std::random_device>(std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 500ul> const&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&)
cloud_key(RandomEngine &rand,
              const typename secret_key<P>::container_key_lvl0 &key_lvl0,
              const typename secret_key<P>::container_key_lvl1 &key_lvl1)
        : ksk_(std::make_unique<key_switching_key<P>>(rand, key_lvl0, key_lvl1))
    {
        // Fill bkfftlvl01_
        bkfftlvl01_.reserve(P::n());
        for (size_t i = 0; i < P::n(); i++) {
            bkfftlvl01_.push_back(trgswfft_lvl1<P>::sym_encrypt(
                rand, key_lvl1, P::alphabk(),
                static_cast<uint32_t>(key_lvl0[i])));
        }
    }

// Assembly:
subq $0x10098, %rsp          # imm = 0x10098
movq %rdi, 0x10090(%rsp)
movq %rsi, 0x10088(%rsp)
movq %rdx, 0x10080(%rsp)
movq %rcx, 0x10078(%rsp)
movq 0x10090(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq 0x10088(%rsp), %rsi
movq 0x10080(%rsp), %rdx
movq 0x10078(%rsp), %rcx
callq 0x5410
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
callq 0x54a0
callq 0x55c0
movl %eax, 0x5c(%rsp)
jmp 0x52df
movq 0x48(%rsp), %rdi
movl 0x5c(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x54b0
jmp 0x52f3
movq $0x0, 0x10060(%rsp)
movq 0x10060(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x55c0
movl %eax, 0x34(%rsp)
jmp 0x5317
movq 0x28(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x53f3
movq 0x38(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x10088(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10078(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x5ac0
vmovsd %xmm0, 0x20(%rsp)
jmp 0x5360
movq 0x10080(%rsp), %rdi
movq 0x10060(%rsp), %rsi
callq 0x5ad0
movq %rax, (%rsp)
jmp 0x537b
vmovsd 0x20(%rsp), %xmm0
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq (%rsp), %rax
movl (%rax), %ecx
leaq 0x60(%rsp), %rdi
callq 0x5600
jmp 0x539d
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x55d0
jmp 0x53ae
jmp 0x53b0
movq 0x10060(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10060(%rsp)
jmp 0x52ff
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10070(%rsp)
movl %eax, 0x1006c(%rsp)
callq 0x5b00
movq 0x40(%rsp), %rdi
callq 0x5b60
jmp 0x53fb
addq $0x10098, %rsp          # imm = 0x10098
retq
movq 0x10070(%rsp), %rdi
callq 0x2290
nopl (%rax,%rax)