LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/protocol.cc
// Function: udp4_checksum2(ip, udphdr, unsigned short*, int)
uint16_t udp4_checksum2 (struct ip iphdr, struct udphdr udphdr, uint16_t *payload, int payloadlen)
{
    register uint32_t sum = 0;

    sum += (iphdr.ip_src.s_addr & 0xffff);
    sum += (iphdr.ip_src.s_addr >> 16);
    sum += (iphdr.ip_dst.s_addr & 0xffff);
    sum += (iphdr.ip_dst.s_addr >> 16);
    uint16_t tmp = iphdr.ip_p;
    tmp = tmp << 8;
    sum += tmp;
    sum += udphdr.len;
    sum += udphdr.source;
    sum += udphdr.dest;
    sum += udphdr.len;
    while (payloadlen > 1) {
        sum += *(payload++);
        payloadlen -= 2;
    }
    if (payloadlen == 1) {
        uint16_t tmp = *((uint8_t *)payload);
        tmp = tmp << 8;
        sum += tmp;
    }
    while (sum >> 16) {
        sum = (sum & 0xffff) + (sum >> 16);
    }
    return ~sum;
}

// Assembly:
movq %rdi, %rax
movl %eax, %ecx
shrl $0x10, %ecx
movl 0x14(%rsp), %edi
movl 0x18(%rsp), %r8d
movl $0xffff, %r9d           # imm = 0xFFFF
movl %edi, %r10d
andl %r9d, %r10d
shrl $0x10, %edi
movl %r8d, %r11d
andl %r9d, %r11d
addl %r10d, %r11d
shrl $0x10, %r8d
movzbl 0x11(%rsp), %r10d
shll $0x8, %r10d
addl %r8d, %r10d
andl %eax, %r9d
addl %ecx, %r9d
shrq $0x1f, %rax
andl $0x1fffe, %eax          # imm = 0x1FFFE
addl %r9d, %eax
addl %edi, %eax
addl %r11d, %eax
addl %r10d, %eax
cmpl $0x2, %edx
jl 0x401b
movzwl (%rsi), %ecx
addq $0x2, %rsi
addl %ecx, %eax
leal -0x2(%rdx), %ecx
cmpl $0x3, %edx
movl %ecx, %edx
jg 0x4006
jmp 0x401d
movl %edx, %ecx
cmpl $0x1, %ecx
jne 0x402c
movzbl (%rsi), %ecx
shll $0x8, %ecx
addl %eax, %ecx
movl %ecx, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x4045
movl $0xffff, %ecx           # imm = 0xFFFF
movl %eax, %edx
shrl $0x10, %edx
andl %ecx, %eax
addl %edx, %eax
cmpl %ecx, %eax
ja 0x4038
notl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/clientsession.cc
// Function: isValidPort(int)
int isValidPort(int port) {
    if (port < MIN_PORT) {
        cerr << "Port too low: " << port << endl;
        exit(-1);
    }
    if (port > MAX_PORT) {
        cerr << "Port too high: " << port << endl;
        exit(-1);
    }
    return 1;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
cmpl $0x3ff, %edi            # imm = 0x3FF
jle 0x4062
cmpl $0xea61, %ebx           # imm = 0xEA61
jge 0x4072
movl $0x1, %eax
popq %rbx
retq
movq 0x3f87(%rip), %rdi      # 0x7ff0
leaq 0x16a0(%rip), %rsi      # 0x5710
jmp 0x4080
movq 0x3f77(%rip), %rdi      # 0x7ff0
leaq 0x169f(%rip), %rsi      # 0x571f
callq 0x22c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x23e0
movq %rax, %rdi
callq 0x2160
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/clientsession.cc
// Function: ClientSessionList::~ClientSessionList()
ClientSessionList::~ClientSessionList () {
    for (curSession = sessions.begin(); curSession != sessions.end(); curSession++) {
        delete *curSession;
    }
    delete srcAddr;
    delete dstAddr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rax
movq %rax, 0x20(%rdi)
cmpq %r15, %rax
je 0x45e9
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x45dc
leaq 0x828(%r14), %rdi
callq 0x4aa8
movq %r14, %rdi
callq 0x2280
movq 0x20(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x45ba
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x45f7
callq 0x2280
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4605
callq 0x2280
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x461d
movq (%rdi), %rbx
callq 0x2280
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x460d
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/clientsession.cc
// Function: ClientSession::ClientSession(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ClientSessionList*)
ClientSession::ClientSession(int port, string dstMacs, ClientSessionList* parent) :
    dstMacList(dstMacs)
{
    this->port = port;
    this->parent = parent;
    lastRollover = 0;
    memset (&p, 0, sizeof(paddedPacket));
    p.header.protoVersion = PROTOVERSION;
    p.header.clientStartTime = time(0);
    p.header.seqNum = 0;
    reset();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x828(%rdi), %r15
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x36ea
movq %r15, %rdi
movq %r12, %rsi
callq 0x4914
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x46e9
callq 0x2280
movl %ebp, 0x818(%rbx)
movq %r14, 0x838(%rbx)
movq $0x0, 0x820(%rbx)
movl $0x818, %edx            # imm = 0x818
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2190
movb $0x1, (%rbx)
xorl %edi, %edi
callq 0x2260
movq %rax, 0x8(%rbx)
movl $0x0, 0x28(%rbx)
movq $-0x14, %r14
leaq 0x10ce(%rip), %r15      # 0x5801
callq 0x20e0
leal 0xf(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x10, %ecx
subl %ecx, %eax
cltq
movb (%rax,%r15), %al
movb %al, 0x24(%rbx,%r14)
incq %r14
jne 0x4733
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4776
callq 0x2280
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/clientsession.cc
// Function: ClientSession::rollover()
bool ClientSession::rollover() {
    time_t curTime = time(0);
    curTime -= curTime % parent->getInterval();
    if (!lastRollover) {
        lastRollover = curTime;
    }
    if (curTime == lastRollover) {
        return false;
    }
    lastRollover = curTime;
    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2260
movq %rax, %rcx
movq 0x838(%rbx), %rax
movslq 0x48(%rax), %rsi
movq %rcx, %rax
cqto
idivq %rsi
subq %rdx, %rcx
cmpq $0x0, 0x820(%rbx)
jne 0x47fd
movq %rcx, 0x820(%rbx)
movq 0x820(%rbx), %rax
cmpq %rax, %rcx
je 0x4810
movq %rcx, 0x820(%rbx)
cmpq %rax, %rcx
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/clientsession.cc
// Function: ClientSession::sendPacket(int)
int ClientSession::sendPacket (int size) {
    if (size < sizeof(packet)) size = sizeof(packet);
    p.header.size = size;
    int n_sent = sendMessage (
                parent->getSocketFD(),
                parent->getIfIndex(),
                parent->getSrcMac(),
                parent->getSrcAddr()->sin_addr.s_addr,
                port,
                dstMacList.nextMac(),
                parent->getDstAddr()->sin_addr.s_addr,
                parent->getDstPort(),
                (char*)&p,
                size,
                sizeof(packet));

    if (n_sent < 0) {
        warn ("Problem sending data");
        exit (-1);
    }
    if (n_sent != size) {
        warn("Sendto attempted %d, sent %d bytes\n",size, n_sent);
    }
    return n_sent;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x49, %esi
movl $0x48, %ebx
cmovael %esi, %ebx
movl %ebx, 0x40(%rdi)
movq 0x838(%rdi), %r15
movl 0x44(%r15), %eax
movl %eax, 0x4(%rsp)
movl 0x38(%r15), %r12d
movq 0x28(%r15), %rax
addq $0x3c, %r15
movl 0x4(%rax), %r13d
movl 0x818(%rdi), %ebp
addq $0x828, %rdi            # imm = 0x828
callq 0x4af4
movq 0x838(%r14), %rcx
movq 0x30(%rcx), %rdx
movl 0x4(%rdx), %r10d
movl 0x4c(%rcx), %r11d
subq $0x8, %rsp
movl 0xc(%rsp), %edi
movl %r12d, %esi
movq %r15, %rdx
movl %r13d, %ecx
movl %ebp, %r8d
movq %rax, %r9
pushq $0x48
pushq %rbx
pushq %r14
pushq %r11
pushq %r10
callq 0x3d75
addq $0x30, %rsp
testl %eax, %eax
js 0x48fc
movl %eax, %ebp
cmpl %ebx, %eax
je 0x48eb
leaq 0xefd(%rip), %rdi       # 0x57dd
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2100
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xec5(%rip), %rdi       # 0x57c8
xorl %eax, %eax
callq 0x2100
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/maclist.cc
// Function: MacList::MacList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MacList::MacList (string macListString) {
    const char* mls = macListString.c_str();
    numMacs = 1;
    macs = 0;
    const char* nextString = mls;
    while ((nextString = strchr(nextString + 1, ',')) != 0) {
        numMacs++;
    }
    macs = new uint8_t *[numMacs];
    nextString = mls;
    for (curMac = 0; curMac < numMacs; curMac++) {
        macs[curMac] = new uint8_t[12];
        memset (macs[curMac], 0, 6);
        int numFields = sscanf(mls, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", 
                        &(macs[curMac][0]),
                        &(macs[curMac][1]),
                        &(macs[curMac][2]),
                        &(macs[curMac][3]),
                        &(macs[curMac][4]),
                        &(macs[curMac][5]));
        if (numFields < 6) {
            cerr << "Invalid MAC string: " << macListString << endl;
            numMacs = 0;
            return;
        };
        mls = strchr (mls, ',') + 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movl $0x1, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0x1(%r15), %rdi
movl $0x2c, %esi
callq 0x2120
testq %rax, %rax
je 0x4968
movl $0x2, %ebp
movl %ebp, (%r14)
incq %rax
movq %rax, %rdi
movl $0x2c, %esi
callq 0x2120
incl %ebp
testq %rax, %rax
jne 0x494e
movslq (%r14), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x8(%r14)
movl $0x0, 0x4(%r14)
cmpl $0x0, (%r14)
jle 0x4a98
leaq 0xe6f(%rip), %r12       # 0x5812
xorl %ebp, %ebp
movl $0xc, %edi
callq 0x2030
movq 0x8(%r14), %rcx
movslq %ebp, %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x8(%r14), %rax
movq (%rax,%rdx,8), %rax
movl $0x0, (%rax)
movw $0x0, 0x4(%rax)
movq 0x8(%r14), %rax
movslq 0x4(%r14), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1(%rdx), %rcx
leaq 0x2(%rdx), %r8
leaq 0x3(%rdx), %r9
leaq 0x4(%rdx), %r10
leaq 0x5(%rdx), %r11
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x22b0
addq $0x10, %rsp
movl %eax, %ebp
cmpl $0x5, %eax
jle 0x4a1f
movq %r15, %rdi
movl $0x2c, %esi
callq 0x2120
movq %rax, %r15
incq %r15
jmp 0x4a80
movl $0x14, %edx
movq 0x35c5(%rip), %r13      # 0x7ff0
movq %r13, %rdi
leaq 0xdfb(%rip), %rsi       # 0x5830
callq 0x22e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r13, %rdi
callq 0x22e0
movq %r12, %r13
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22a0
movsbl %al, %esi
movq %r12, %rdi
movq %r13, %r12
callq 0x2040
movq %rax, %rdi
callq 0x21a0
movl $0x0, (%r14)
cmpl $0x6, %ebp
jl 0x4a98
movl 0x4(%r14), %ebp
incl %ebp
movl %ebp, 0x4(%r14)
cmpl (%r14), %ebp
jl 0x49a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/maclist.cc
// Function: MacList::~MacList()
MacList::~MacList () {
    if (!macs) {
        return;
    }
    for (curMac = 0; curMac < numMacs; curMac++) {
        delete macs[curMac];
    }
    delete macs;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x4aef
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x4(%rdi)
cmpl $0x0, (%rdi)
jle 0x4ae1
xorl %eax, %eax
movq 0x8(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x4ad5
callq 0x2280
movl 0x4(%rbx), %eax
incl %eax
movl %eax, 0x4(%rbx)
cmpl (%rbx), %eax
jl 0x4ac1
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
popq %rbx
jne 0x2280
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/basicSolver.cc
// Function: BasicSolver::solveDNA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
unsigned int BasicSolver::solveDNA(string DNA) {
	assert(DNA.length() == readLength);

	unsigned int interval = readLength / seedNum;

	unsigned int totalFreq = 0;

	for (int i = 0; i < seedNum; i++) {
		string seed = DNA.substr(i * interval, seedLength);

		tree.query(seed);
		totalFreq += tree.frequency();
	}

	return totalFreq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x358(%rdi), %eax
movq %rsi, 0x40(%rsp)
cmpq %rax, 0x8(%rsi)
jne 0x46bb
movq %rdi, %r14
xorl %ebx, %ebx
xorl %edx, %edx
divl 0x35c(%rdi)
movl %eax, %ebp
movq %rsp, %r12
xorl %r13d, %r13d
movl %ebp, %edx
imull %ebx, %edx
movl 0x360(%r14), %ecx
leaq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3290
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x41d6
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x57fa
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x466c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r14, %rdi
callq 0x5998
movl %eax, %r15d
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4693
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
addl %r15d, %r13d
incq %rbx
movl 0x35c(%r14), %eax
cmpq %rax, %rbx
jb 0x4608
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x49f9(%rip), %rdi      # 0x90bb
leaq 0x4a0d(%rip), %rsi      # 0x90d6
leaq 0x4a15(%rip), %rcx      # 0x90e5
movl $0x16, %edx
callq 0x3190
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x46fd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x46fd
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4719
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3450
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: TreeNode::TreeNode(TreeNode const&)
TreeNode::TreeNode(const TreeNode& rhs) {
	if (A != NULL) {
		delete A;
		A = NULL;
	}
	if (C != NULL) {
		delete C;
		C = NULL;
	}
	if (G != NULL) {
		delete G;
		G = NULL;
	}
	if (T != NULL) {
		delete T;
		T = NULL;
	}

	if (rhs.A != NULL)
		A = new TreeNode(*rhs.A);
	if (rhs.C != NULL)
		C = new TreeNode(*rhs.C);
	if (rhs.C != NULL)
		G = new TreeNode(*rhs.G);
	if (rhs.T != NULL)
		T = new TreeNode(*rhs.T);

	this->locNum = rhs.locNum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8597(%rip), %rax      # 0xcd08
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x478b
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x47a2
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x47b9
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x47d0
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x30(%rbx)
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x47f5
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x475c
movq %r15, 0x18(%rbx)
movq 0x20(%r14), %r12
testq %r12, %r12
je 0x481a
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x475c
movq %r15, 0x20(%rbx)
cmpq $0x0, 0x20(%r14)
je 0x483e
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x475c
movq %r15, 0x28(%rbx)
movq 0x30(%r14), %r12
testq %r12, %r12
je 0x4863
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x475c
movq %r15, 0x30(%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x487c
jmp 0x487c
jmp 0x487c
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
callq 0x3280
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: TreeNode::deleteChildren()
void TreeNode::deleteChildren() {

	if (A != NULL) {
		delete A;
		A = NULL;
	}

	if (C != NULL) {
		delete C;
		C = NULL;
	}

	if (G != NULL) {
		delete G;
		G = NULL;
	}

	if (T != NULL) {
		delete T;
		T = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x48c5
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x48dc
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x48f3
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x490a
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: LeafNode::LeafNode(unsigned int, unsigned int)
TreeNode::TreeNode() {
	locNum = 0;
	A = NULL;
	C = NULL;
	G = NULL;
	T = NULL;
}

// Assembly:
movl $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x8377(%rip), %rax      # 0xcd48
movq %rax, (%rdi)
movl %esi, 0x38(%rdi)
movl %edx, 0x3c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::HashTree(unsigned int, unsigned int)
HashTree::HashTree(unsigned int hashLength, unsigned int fullLength) {
	this->hashLength = hashLength;
	this->fullLength = fullLength;

	root = new TreeNode*[1 << (2 * hashLength)];

	for (int i = 0; i < 1 << (2 * hashLength); i++)
		root[i] = NULL;

	checkdb = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
leaq 0x40(%rdi), %rax
movl %ecx, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movq %rcx, 0x60(%rdi)
leaq 0x70(%rdi), %rax
movl %ecx, 0x70(%rdi)
movq %rcx, 0x78(%rdi)
movq %rax, 0x80(%rdi)
movq %rax, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
leaq 0xa8(%rdi), %r14
movq %r14, %rdi
callq 0x7fd0
leaq 0x318(%rbx), %r12
movq %r12, %rdi
callq 0x8b58
leaq 0x328(%rbx), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x328(%rbx)
movq $0x0, 0x338(%rbx)
movl %ebp, (%rbx)
movl %r15d, 0x4(%rbx)
addl %ebp, %ebp
movl $0x1, %r15d
movl %ebp, %ecx
shll %cl, %r15d
leaq (,%r15,8), %rdi
callq 0x3030
movq %rax, 0x320(%rbx)
movl %r15d, %eax
xorl %ecx, %ecx
movq 0x320(%rbx), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4b25
movq $0x0, 0x310(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r13, %rdi
callq 0x6e72
movq %r12, %rdi
callq 0x8bf4
jmp 0x4b6e
movq %rax, %r15
movq %r14, %rdi
callq 0x802e
jmp 0x4b7b
movq %rax, %r15
leaq 0x68(%rbx), %rdi
leaq 0x38(%rbx), %r14
addq $0x8, %rbx
callq 0x7238
movq %r14, %rdi
callq 0x7288
movq %rbx, %rdi
callq 0x7288
movq %r15, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::~HashTree()
HashTree::~HashTree() {
	for (int i = 0; i < 1 << (2 * hashLength); i++) {
		if (root[i] != NULL) {
			delete root[i];
			root[i] = NULL;
		}
	}

	if (checkdb != NULL) {
		delete[] checkdb;
		checkdb = NULL;
	}

	if (root != NULL) {
		delete[] root;
		root = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x320(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x4bd8
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x320(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movb (%rbx), %cl
addb %cl, %cl
movl %r14d, %eax
shrl %cl, %eax
testl %eax, %eax
je 0x4bb3
movq 0x310(%rbx), %r15
testq %r15, %r15
je 0x4c3f
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x4c21
addq $-0x268, %r15           # imm = 0xFD98
imulq $0x268, %r12, %r13      # imm = 0x268
leaq (%r15,%r13), %rdi
callq 0x802e
addq $-0x268, %r13           # imm = 0xFD98
jne 0x4c0f
imulq $0x268, %r12, %rsi      # imm = 0x268
addq $0x8, %rsi
movq %r14, %rdi
callq 0x3490
movq $0x0, 0x310(%rbx)
movq 0x320(%rbx), %rdi
testq %rdi, %rdi
je 0x4c5b
callq 0x3330
movq $0x0, 0x320(%rbx)
leaq 0x328(%rbx), %rdi
callq 0x6e72
leaq 0x318(%rbx), %rdi
callq 0x8bf4
leaq 0xa8(%rbx), %rdi
callq 0x802e
leaq 0x68(%rbx), %rdi
callq 0x7238
leaq 0x38(%rbx), %rdi
callq 0x7288
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7288
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::checkDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int, unsigned int)
void HashTree::checkDouble(string& DNA, unsigned int chrNum, unsigned int location) {
	bool leaf = true;

	if (DNA.find('M') != string::npos) {
		int pos = DNA.find('M');
		DNA[pos] = 'A';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'C';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'M';

		leaf = false;
	}

	if (DNA.find('R') != string::npos) {
		int pos = DNA.find('R');
		DNA[pos] = 'A';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'G';
		checkDouble(DNA, chrNum, location);
		DNA[pos] = 'R';

		leaf = false;
	}

	//Add DNA to database unless we have resolved all cases
	if (leaf)
		addEntry(DNA, chrNum, location);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movl $0x4d, %esi
xorl %edx, %edx
callq 0x3340
movq %rax, %r12
cmpq $-0x1, %rax
je 0x5487
movq %r14, %rdi
movl $0x4d, %esi
xorl %edx, %edx
callq 0x3340
movslq %eax, %r13
movq (%r14), %rax
movb $0x41, (%rax,%r13)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x5412
movq (%r14), %rax
movb $0x43, (%rax,%r13)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x5412
movq (%r14), %rax
movb $0x4d, (%rax,%r13)
movq %r14, %rdi
movl $0x52, %esi
xorl %edx, %edx
callq 0x3340
cmpq $-0x1, %rax
je 0x54e6
movq %r14, %rdi
movl $0x52, %esi
xorl %edx, %edx
callq 0x3340
movslq %eax, %r12
movq (%r14), %rax
movb $0x41, (%rax,%r12)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x5412
movq (%r14), %rax
movb $0x47, (%rax,%r12)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x5412
movq (%r14), %rax
movb $0x52, (%rax,%r12)
jmp 0x54ec
cmpq $-0x1, %r12
je 0x54fb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ca6
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
void HashTree::query(string DNA, unsigned int threshold) {
	hashVal = hashgen.calculateHash(DNA, hashLength);
	queryCursor = root[hashVal];
	length = hashLength;

	TreeNode* nextCursor;

	hitLeaf = false;

	if (queryCursor == NULL || queryCursor->isLeaf() || queryCursor->getLocNum() <= threshold ) {
		hitLeaf = true;
		return;
	}

	while (length < DNA.length() ) {


		switch (DNA[length]) {
			case 'A':
				nextCursor = queryCursor->getA();
				break;
			case 'C':
				nextCursor = queryCursor->getC();
				break;
			case 'G':
				nextCursor = queryCursor->getG();
				break;
			case 'T':
				nextCursor = queryCursor->getT();
				break;
			default:
				cerr << "unrecognized character: " << DNA[length] << endl;
				break;
		}

		queryCursor = nextCursor;
		length++;

		if (queryCursor == NULL || queryCursor->isLeaf() || queryCursor->getLocNum() <= threshold ) {
			hitLeaf = true;
			return;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
addq $0x318, %rdi            # imm = 0x318
movl (%r14), %edx
callq 0x8b72
movl %eax, 0x340(%r14)
movq 0x320(%r14), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rdi
movq %rdi, 0x348(%r14)
movl (%r14), %eax
movl %eax, 0x344(%r14)
movb $0x0, 0x350(%r14)
testq %rdi, %rdi
je 0x5979
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
jne 0x5979
movq 0x348(%r14), %rax
cmpl %ebx, 0x8(%rax)
jbe 0x5979
movq 0x7779(%rip), %r12      # 0xcff0
movl 0x344(%r14), %eax
cmpq %rax, 0x8(%r15)
jbe 0x5981
movq (%r15), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x46, %eax
jg 0x58b2
cmpl $0x41, %eax
je 0x5930
cmpl $0x43, %eax
jne 0x58cd
movq 0x348(%r14), %rax
movq 0x20(%rax), %r13
jmp 0x5948
cmpl $0x47, %eax
je 0x593d
cmpl $0x54, %eax
jne 0x58cd
movq 0x348(%r14), %rax
movq 0x30(%rax), %r13
jmp 0x5948
movl $0x18, %edx
movq %r12, %rdi
leaq 0x390a(%rip), %rsi      # 0x91e6
callq 0x32d0
movl 0x344(%r14), %eax
movq (%r15), %rcx
movb (%rcx,%rax), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x7(%rsp), %rsi
callq 0x32d0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31c0
jmp 0x5948
movq 0x348(%r14), %rax
movq 0x18(%rax), %r13
jmp 0x5948
movq 0x348(%r14), %rax
movq 0x28(%rax), %r13
movq %r13, 0x348(%r14)
incl 0x344(%r14)
testq %r13, %r13
je 0x5979
movq (%r13), %rax
movq %r13, %rdi
callq *0x28(%rax)
testb %al, %al
jne 0x5979
movq 0x348(%r14), %rax
cmpl %ebx, 0x8(%rax)
ja 0x5877
movb $0x1, 0x350(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::estimateFreqLength(unsigned int, unsigned int)
unsigned int HashTree::estimateFreqLength(unsigned int hash, unsigned int freqThreshold/*, string DNA*/) {
	assert(hash < static_cast<unsigned int>(1 << (2 * hashLength) ) );

	TreeNode* base = root[hash];

	if (base == NULL || base->getLocNum() <= freqThreshold)
		return static_cast<unsigned int>(hashLength);

	unsigned long long freqSum = 0;
	freqSum = estimateFreqLengthHelper(base, freqThreshold, freqSum, hashLength/*, DNA*/);

	return (freqSum - 1) / base->getLocNum() + 1;
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
leal (%rax,%rax), %ecx
movl %esi, %r8d
shrl %cl, %r8d
testl %r8d, %r8d
jne 0x59f8
movq 0x320(%rdi), %rcx
movl %esi, %esi
movq (%rcx,%rsi,8), %rbx
testq %rbx, %rbx
je 0x59f6
cmpl %edx, 0x8(%rbx)
jbe 0x59f6
movq %rbx, %rsi
xorl %ecx, %ecx
movl %eax, %r8d
callq 0x5a18
decq %rax
movl 0x8(%rbx), %ecx
xorl %edx, %edx
divq %rcx
incl %eax
popq %rbx
retq
leaq 0x3800(%rip), %rdi      # 0x91ff
leaq 0x3763(%rip), %rsi      # 0x9169
leaq 0x382b(%rip), %rcx      # 0x9238
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x3190
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::estimateFreqLengthHelper(TreeNode*, unsigned int, unsigned long long, unsigned int)
unsigned long long HashTree::estimateFreqLengthHelper(TreeNode* node, unsigned int freqThreshold, unsigned long long freqSum, unsigned int curLength/*, string DNA*/) {
	if (node == NULL) {
		//cout << DNA << " curLength: " << curLength << " NULL." << endl;
		return freqSum;
	}

	if (node->getLocNum() <= freqThreshold || node->isLeaf() ) {
		//cout << DNA << " curLength: " << curLength << " frequency: " << node->getLocNum() << endl;
		return freqSum + (unsigned long long) curLength * node->getLocNum();
	}

	freqSum = estimateFreqLengthHelper(node->getA(), freqThreshold, freqSum, curLength + 1/*, DNA + 'A'*/);
	freqSum = estimateFreqLengthHelper(node->getC(), freqThreshold, freqSum, curLength + 1/*, DNA + 'C'*/);
	freqSum = estimateFreqLengthHelper(node->getG(), freqThreshold, freqSum, curLength + 1/*, DNA + 'G'*/);
	freqSum = estimateFreqLengthHelper(node->getT(), freqThreshold, freqSum, curLength + 1/*, DNA + 'T'*/);

	return freqSum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
testq %r14, %r14
je 0x5a9a
cmpl %ebp, 0x8(%r14)
jbe 0x5a8d
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
testb %al, %al
jne 0x5a8d
movq 0x18(%r14), %rsi
incl %ebx
movq %r15, %rdi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
callq 0x5a18
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5a18
movq 0x28(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5a18
movq %rax, %r12
movq 0x30(%r14), %r14
jmp 0x5a2e
movl %ebx, %eax
movl 0x8(%r14), %ecx
imulq %rax, %rcx
addq %rcx, %r12
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::averageFreqDepth(unsigned int, unsigned int)
unsigned int HashTree::averageFreqDepth(unsigned int hash, unsigned int depth)
{
	assert(hash < static_cast<unsigned int>(1 << (2 * hashLength) ) );

	TreeNode* base = root[hash];

	if (base == NULL)
		return 0;

	unsigned long long weightedSum = 0;
	weightedSum = averageFreqDepthHelp(base, depth, weightedSum, 0);

	return weightedSum / base->getLocNum();
}

// Assembly:
pushq %rbx
movb (%rdi), %cl
addb %cl, %cl
movl %esi, %eax
shrl %cl, %eax
testl %eax, %eax
jne 0x5ae0
movq 0x320(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0x5adc
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5b00
movl 0x8(%rbx), %ecx
xorl %edx, %edx
divq %rcx
jmp 0x5ade
xorl %eax, %eax
popq %rbx
retq
leaq 0x3718(%rip), %rdi      # 0x91ff
leaq 0x367b(%rip), %rsi      # 0x9169
leaq 0x3789(%rip), %rcx      # 0x927e
movl $0x1fe, %edx            # imm = 0x1FE
callq 0x3190
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::averageFreqDepthHelp(TreeNode*, unsigned int, unsigned long long, unsigned int)
unsigned long long HashTree::averageFreqDepthHelp(TreeNode* node, unsigned int depth, unsigned long long weightedSum, unsigned int currDepth/*, string DNA*/) {
	if (node == NULL) {
		return weightedSum;
	}

	if(currDepth == depth || (node->isLeaf() && currDepth < depth))
	{
		unsigned long long freq =  node->getLocNum();
		return freq * freq + weightedSum;
	}
	else
	{
		weightedSum = averageFreqDepthHelp(node->getA(), depth, weightedSum, currDepth + 1/*, DNA + 'A'*/);
		weightedSum = averageFreqDepthHelp(node->getC(), depth, weightedSum, currDepth + 1/*, DNA + 'C'*/);
		weightedSum = averageFreqDepthHelp(node->getG(), depth, weightedSum, currDepth + 1/*, DNA + 'G'*/);
		weightedSum = averageFreqDepthHelp(node->getT(), depth, weightedSum, currDepth + 1/*, DNA + 'T'*/);
	}

	return weightedSum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
testq %r14, %r14
je 0x5b82
cmpl %ebx, %ebp
je 0x5b77
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
cmpl %ebp, %ebx
jae 0x5b30
testb %al, %al
jne 0x5b77
movq 0x18(%r14), %rsi
incl %ebx
movq %r15, %rdi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
callq 0x5b00
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5b00
movq 0x28(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5b00
movq %rax, %r12
movq 0x30(%r14), %r14
jmp 0x5b16
movl 0x8(%r14), %eax
imulq %rax, %rax
addq %rax, %r12
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::calculateLenToFreqTable()
void HashTree::calculateLenToFreqTable()
{
	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);

	vector< vector<unsigned int> > hashLenTable (tableHeight, vector<unsigned>(tableWidth));

	for(int i = 0; i < static_cast<int>(tableHeight); i++)
		for(int j=0; j<tableWidth; j++)
			hashLenTable[i][j] = averageFreqDepth(i, j);

	this->hashLenTable = hashLenTable;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl (%rdi), %ecx
movl 0x4(%rdi), %esi
subl %ecx, %esi
incl %esi
addl %ecx, %ecx
movl $0x1, %ebp
shll %cl, %ebp
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rsi, 0x10(%rsp)
callq 0x6ec0
movl %ebp, %r15d
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %r15, %rsi
callq 0x6f4a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5bf6
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movl 0x10(%rsp), %ebp
xorl %r12d, %r12d
cmpl $0x0, 0x10(%rsp)
je 0x5c2e
leaq (%r12,%r12,2), %r14
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x5aa6
movq 0x30(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movl %eax, (%rcx,%r13,4)
incq %r13
cmpq %r13, %rbp
jne 0x5c0b
incq %r12
cmpq %r15, %r12
jne 0x5bfd
addq $0x328, %rbx            # imm = 0x328
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x6fe2
leaq 0x30(%rsp), %rdi
callq 0x6e72
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c86
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5c93
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
jmp 0x5c93
movq %rax, %rbx
jmp 0x5c93
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6e72
movq %rbx, %rdi
callq 0x3450
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::printHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::printHashLenTable(string filename)
{
	std::ofstream f;
	f.open(filename.c_str(), ios::out | ios::binary);

	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);
	if(&hashLenTable != NULL)
	{
		for(int i = 0; i < static_cast<int>(tableHeight); i++)
		{
			f << "Index: " << i << " ";
			for(int j = 0; j < static_cast<int>(tableWidth); j++)
			{
				f << hashLenTable[i][j] << "\t";
			}
			f << "\n";
		}
	}
	else
		cout << "Empty table. " << endl;

	f.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3420
movq (%r14), %rsi
movq %r15, %rdi
movl $0x14, %edx
callq 0x3050
movl (%rbx), %eax
movl 0x4(%rbx), %r13d
subl %eax, %r13d
incl %r13d
addl %eax, %eax
movl %eax, 0xc(%rsp)
xorl %r14d, %r14d
leaq 0x18(%rsp), %r12
leaq 0x35d9(%rip), %r15      # 0x92ca
movl $0x7, %edx
movq %r12, %rdi
leaq 0x35c2(%rip), %rsi      # 0x92c2
callq 0x32d0
movq %r12, %rdi
movl %r14d, %esi
callq 0x3430
movl $0x1, %edx
movq %rax, %rdi
leaq 0x369f(%rip), %rsi      # 0x93be
callq 0x32d0
movq %r14, 0x10(%rsp)
testl %r13d, %r13d
jle 0x5d69
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rbp
xorl %r14d, %r14d
movq 0x328(%rbx), %rax
movq (%rax,%rbp,8), %rax
movl (%rax,%r14,4), %esi
movq %r12, %rdi
callq 0x31b0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x32d0
incq %r14
cmpq %r14, %r13
jne 0x5d3a
movl $0x1, %edx
movq %r12, %rdi
leaq 0x32ee(%rip), %rsi      # 0x9066
callq 0x32d0
movq 0x10(%rsp), %r14
incq %r14
movl %r14d, %eax
movl 0xc(%rsp), %ecx
shrl %cl, %eax
testl %eax, %eax
je 0x5cf1
leaq 0x18(%rsp), %rdi
callq 0x3380
movq 0x7219(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x20(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x18(%rsp,%rcx)
callq 0x3210
leaq 0x110(%rsp), %rdi
callq 0x30f0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5dea
jmp 0x5dea
jmp 0x5dea
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x33a0
movq %rbx, %rdi
callq 0x3450
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::storeHashLenTable(string filename)
{
	unsigned int tableWidth = fullLength - hashLength + 1;
	unsigned int tableHeight = 1 << (2 * hashLength);

	if(&hashLenTable == NULL)
		cout << "Empty table. " << endl;

	std::ofstream f;
	f.open(filename.c_str(), ios::out | ios::binary);

	int hl[] = {(int)(fullLength - hashLength + 1)};
	int fl[] = {(int)(1 << (2 * hashLength))};

	f.write((char*)&hl, sizeof(int));
	f.write((char*)&fl, sizeof(int));

	for(int i = 0; i < static_cast<int>(tableHeight); i++)
		for(int j = 0; j < static_cast<int>(tableWidth); j++)
		{
			int h[] = {(int)(hashLenTable[i][j])};
			f.write((char*)&h, sizeof(int));
		}
	f.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %ebp
movl 0x4(%rdi), %r12d
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x3420
movq (%r14), %rsi
movq %r15, %rdi
movl $0x14, %edx
callq 0x3050
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
subl %ecx, %eax
incl %eax
leaq 0x24(%rsp), %rsi
movl %eax, (%rsi)
addl %ecx, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x3350
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x4, %edx
callq 0x3350
subl %ebp, %r12d
incl %r12d
addl %ebp, %ebp
movl %ebp, 0x14(%rsp)
movl %r12d, 0x18(%rsp)
movl %r12d, %r13d
movq $0x0, 0x8(%rsp)
leaq 0x28(%rsp), %r14
leaq 0x1c(%rsp), %r15
cmpl $0x0, 0x18(%rsp)
jle 0x5edd
movq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %r12
xorl %ebp, %ebp
movq 0x328(%rbx), %rax
movq (%rax,%r12,8), %rax
movl (%rax,%rbp,4), %eax
movl %eax, 0x1c(%rsp)
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3350
incq %rbp
cmpq %rbp, %r13
jne 0x5eb3
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, %rax
movq %rcx, 0x8(%rsp)
movl 0x14(%rsp), %ecx
shrl %cl, %eax
testl %eax, %eax
je 0x5ea1
leaq 0x28(%rsp), %rdi
callq 0x3380
movq 0x70b8(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x3210
leaq 0x120(%rsp), %rdi
callq 0x30f0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f49
jmp 0x5f49
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a0
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::readHashLenTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::readHashLenTable(string filename)
{
	std::ifstream f;
	f.open(filename.c_str(),  ios::in | ios::binary);
	if(f.is_open())
	{
		f.seekg(0, ios::beg);

		int curr[1];
		f.read((char*)(&curr), sizeof(int));
		unsigned int tableWidth = (unsigned int)(curr[0]);

		int curr2[1];
		f.read((char*)(&curr2), sizeof(int));
		unsigned int tableHeight = (unsigned int)(curr2[0]);

		vector< vector <unsigned int> > hashLenTable (tableHeight,
			vector<unsigned int>(tableWidth));

		for(int i=0; i<tableHeight; i++)
			for(int j=0; j<tableWidth; j++)
			{
				int curr[1];
				f.read((char*)(&curr), sizeof(int));
				hashLenTable[i][j] = (unsigned int)(curr[0]);
			}

		this->hashLenTable = hashLenTable;
		f.close();
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x32c0
movq (%r14), %rsi
movq %r15, %rdi
movl $0xc, %edx
callq 0x3180
leaq 0xc8(%rsp), %rdi
callq 0x30b0
testb %al, %al
je 0x60b2
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3370
leaq 0x50(%rsp), %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x3310
movl 0xc(%rsp), %r14d
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x4, %edx
callq 0x3310
movl 0x8(%rsp), %r15d
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x6ec0
movq %rbx, 0x28(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x6(%rsp), %rcx
movq %r15, %rsi
callq 0x6f4a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x602c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r15, 0x30(%rsp)
testq %r15, %r15
je 0x6088
xorl %ebp, %ebp
leaq 0x50(%rsp), %r12
leaq 0x10(%rsp), %r13
testq %r14, %r14
je 0x607e
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
xorl %r15d, %r15d
movl $0x4, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3310
movl 0x10(%rsp), %eax
movq 0x38(%rsp), %rcx
movq (%rcx,%rbx,8), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
cmpq %r15, %r14
jne 0x6055
incq %rbp
cmpq 0x30(%rsp), %rbp
jne 0x6042
movq 0x28(%rsp), %rdi
addq $0x328, %rdi            # imm = 0x328
leaq 0x38(%rsp), %rsi
callq 0x6fe2
leaq 0x50(%rsp), %rdi
callq 0x3090
leaq 0x38(%rsp), %rdi
callq 0x6e72
leaq 0x50(%rsp), %rdi
callq 0x30c0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6104
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
jmp 0x6104
jmp 0x60f2
jmp 0x60f2
jmp 0x60f2
jmp 0x60f7
movq %rax, %rbx
jmp 0x6104
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x6e72
leaq 0x50(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::calculateFreqMap()
void HashTree::calculateFreqMap()
{
	/*
	 * Map which stores <freq, numfreq > pairs
	 */
	map <unsigned int, unsigned long long> freqMap;
	unsigned int cfreq;
	freqMap.clear();
	if(&hashLenTable != NULL)
	{
		unsigned int counter = 0;
		/* Iterate through the table */
		for(int i = 0; i < 1 << (2 * hashLength); i++)
		{
			for(int j = 0; j < (fullLength - hashLength + 1); j++)
			{
				counter++;

				cfreq = hashLenTable[i][j];
				/* Increase counter */
				if (freqMap.find(cfreq) == freqMap.end())
					freqMap[cfreq] = 1;
				else
					freqMap[cfreq]++;

				/* We only want the first element with frequency 1
				   since we are guaranteed the rest are 1. */
				if(cfreq == 1)
					break;
			}
		}
		this->freqMap = freqMap;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movl $0x0, (%r12)
xorl %r13d, %r13d
movq %r13, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
movq %r13, 0x20(%r12)
leaq 0x8(%rsp), %rdi
callq 0x7b96
leaq 0x4(%rsp), %r15
movl 0x4(%rbx), %eax
incl %eax
cmpl (%rbx), %eax
je 0x6206
leaq (,%r13,2), %rbp
addq %r13, %rbp
xorl %r14d, %r14d
movq 0x328(%rbx), %rax
movq (%rax,%rbp,8), %rax
movl (%rax,%r14,4), %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdx
movq %r12, %rcx
testq %rdx, %rdx
je 0x61af
movq %r12, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x6198
movq %r12, %rdx
cmpq %r12, %rcx
je 0x61c1
cmpl 0x20(%rcx), %eax
cmovbq %r12, %rcx
movq %rcx, %rdx
cmpq %r12, %rdx
je 0x61d8
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x715a
incq (%rax)
jmp 0x61ec
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x715a
movq $0x1, (%rax)
cmpl $0x1, 0x4(%rsp)
je 0x6206
incq %r14
movl 0x4(%rbx), %eax
subl (%rbx), %eax
incl %eax
cmpq %rax, %r14
jb 0x6175
incq %r13
movb (%rbx), %cl
addb %cl, %cl
movl %r13d, %eax
shrl %cl, %eax
testl %eax, %eax
je 0x615a
addq $0x8, %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x72d8
leaq 0x8(%rsp), %rdi
callq 0x7288
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6246
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7288
movq %rbx, %rdi
callq 0x3450
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::searchCDFFreqMap(double)
int HashTree::searchCDFFreqMap(double val)
{
	int ret_freq = -1;
	for(map<unsigned int, double>::iterator i = cdfFreqMap.begin(); i != cdfFreqMap.end(); i++)
	{
		if(val <= cdfFreqMap[i->first])
		{
			ret_freq = i->second;
		}
	}
	return ret_freq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq 0x80(%rdi), %r14
leaq 0x70(%rdi), %r15
cmpq %r15, %r14
je 0x64cb
movq %rdi, %rbx
addq $0x68, %rbx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x71be
movsd (%rax), %xmm0
ucomisd (%rsp), %xmm0
jb 0x64b9
cvttsd2si 0x28(%r14), %ebp
movq %r14, %rdi
callq 0x31d0
movq %rax, %r14
cmpq %r15, %rax
jne 0x649c
jmp 0x64d0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeTreeHelp(TreeNode*, std::basic_ofstream<char, std::char_traits<char>>&)
void HashTree::storeTreeHelp(TreeNode * toOut, ofstream &f)
{
	if (toOut == NULL || toOut -> getLocNum() == 0)
	{
		int c[] = {0};
		f.write((char*)(&c), sizeof(int));
	}
	else
	{
		int c[] = {(int) toOut->getLocNum()};
		f.write((char*)&c, sizeof(int));
		storeTreeHelp(toOut->getA(), f);
		storeTreeHelp(toOut->getC(), f);
		storeTreeHelp(toOut->getG(), f);
		storeTreeHelp(toOut->getT(), f);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
je 0x6ad8
movq %rsi, %r15
movl 0x8(%rsi), %eax
testl %eax, %eax
je 0x6ad8
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3350
movq 0x18(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6a68
movq 0x20(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6a68
movq 0x28(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6a68
movq 0x30(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6a68
jmp 0x6af0
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3350
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::storeTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::storeTree(string dbName)
{
	std::ofstream f;
	f.open(dbName.c_str(),ios::out | ios::binary);

	int hl[] = {(int) hashLength};
	int fl[] = {(int) fullLength};

	f.write((char*)&hl, sizeof(int));
	f.write((char*)&fl, sizeof(int));

	for (int toPrint=0; toPrint< 1 << (2 * hashLength); toPrint++)
	{
		storeTreeHelp(root[toPrint], f);
	}
	f.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x3420
movq (%r14), %rsi
movq %r15, %rdi
movl $0x14, %edx
callq 0x3050
movl (%rbx), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl 0x4(%rbx), %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x4, %edx
callq 0x3350
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x4, %edx
callq 0x3350
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq 0x320(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6a68
incq %r15
movb (%rbx), %cl
addb %cl, %cl
movl %r15d, %eax
shrl %cl, %eax
testl %eax, %eax
je 0x6b64
leaq 0x10(%rsp), %rdi
callq 0x3380
movq 0x6425(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x18(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x10(%rsp,%rcx)
callq 0x3210
leaq 0x108(%rsp), %rdi
callq 0x30f0
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6bd7
jmp 0x6bd7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a0
movq %rbx, %rdi
callq 0x3450