LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnopen.cpp
// Function: DGNTestOpen
int DGNTestOpen( GByte *pabyHeader, int nByteCount )

{
    if( nByteCount < 4 )
        return TRUE;

    // Is it a cell library?
    if( pabyHeader[0] == 0x08
        && pabyHeader[1] == 0x05
        && pabyHeader[2] == 0x17
        && pabyHeader[3] == 0x00 )
        return TRUE;

    // Is it not a regular 2D or 3D file?
    if( (pabyHeader[0] != 0x08 && pabyHeader[0] != 0xC8) 
        || pabyHeader[1] != 0x09
        || pabyHeader[2] != 0xFE || pabyHeader[3] != 0x02 )
        return FALSE;

    return TRUE;
}

// Assembly:
pushq $0x1
popq %rax
cmpl $0x4, %esi
jl 0xd463
movzbl (%rdi), %ecx
cmpl $0x8, %ecx
je 0xd431
cmpl $0xc8, %ecx
jne 0xd461
movb 0x1(%rdi), %cl
jmp 0xd447
movb 0x1(%rdi), %cl
cmpb $0x5, %cl
jne 0xd447
cmpb $0x17, 0x2(%rdi)
jne 0xd461
cmpb $0x0, 0x3(%rdi)
jne 0xd461
jmp 0xd463
cmpb $0x9, %cl
jne 0xd461
cmpb $-0x2, 0x2(%rdi)
movl $0x0, %eax
jne 0xd463
xorl %eax, %eax
cmpb $0x2, 0x3(%rdi)
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnopen.cpp
// Function: DGNSpatialFilterToUOR(DGNInfo*)
void DGNSpatialFilterToUOR( DGNInfo *psDGN )

{
    DGNPoint    sMin, sMax;

    if( psDGN->sf_converted_to_uor 
        || !psDGN->has_spatial_filter 
        || !psDGN->got_tcb )
        return;

    sMin.x = psDGN->sf_min_x_geo;
    sMin.y = psDGN->sf_min_y_geo;
    sMin.z = 0;
    
    sMax.x = psDGN->sf_max_x_geo;
    sMax.y = psDGN->sf_max_y_geo;
    sMax.z = 0;

    DGNInverseTransformPoint( psDGN, &sMin );
    DGNInverseTransformPoint( psDGN, &sMax );

    psDGN->sf_min_x = (GUInt32) (sMin.x + 2147483648.0);
    psDGN->sf_min_y = (GUInt32) (sMin.y + 2147483648.0);
    psDGN->sf_max_x = (GUInt32) (sMax.x + 2147483648.0);
    psDGN->sf_max_y = (GUInt32) (sMax.y + 2147483648.0);

    psDGN->sf_converted_to_uor = TRUE;
}

// Assembly:
cmpl $0x0, 0x2037c(%rdi)
je 0xd5ee
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x20378(%rdi)
je 0xd6bc
cmpl $0x0, 0x20014(%rbx)
je 0xd6bc
movups 0x20398(%rbx), %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movups 0x203a8(%rbx), %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa375
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa375
movapd 0x2726(%rip), %xmm0     # 0xfd80
movapd (%r14), %xmm1
movapd (%r15), %xmm2
addpd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm3
addpd %xmm0, %xmm1
subpd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm2
movapd %xmm3, %xmm4
psrad $0x1f, %xmm4
cvttpd2dq %xmm1, %xmm5
pand %xmm2, %xmm4
subpd %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm0
por %xmm3, %xmm4
movapd %xmm5, %xmm1
psrad $0x1f, %xmm1
pand %xmm0, %xmm1
por %xmm5, %xmm1
punpcklqdq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0]
movdqu %xmm1, 0x20388(%rbx)
movl $0x1, 0x2037c(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/options.cc
// Function: Options::Options(int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Options::Options (int argc, char** argv, string optstring) {
    memset (options, 0, 256 * sizeof(char*));
    int opt;
    while (1) {
        optarg = 0;
        opt = getopt(argc, argv, optstring.c_str());
        if (opt < 0) {
            break;
        } else if (opt == '?') {
            exit(-1);
        }
        if (optarg) {
            options[opt] = new char[strlen(optarg) + 1];
            strcpy(options[opt], optarg);
        } else {
            options[opt] = (char*)1;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x2180
movq 0x4c67(%rip), %r12      # 0x7fc0
andq $0x0, (%r12)
movq (%rbx), %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20b0
testl %eax, %eax
js 0x33aa
cmpl $0x3f, %eax
je 0x33b9
movq (%r12), %rdi
movl %eax, %r13d
testq %rdi, %rdi
je 0x33a0
callq 0x2130
leaq 0x1(%rax), %rdi
callq 0x2030
movq %rax, (%r15,%r13,8)
movq (%r12), %rsi
movq %rax, %rdi
callq 0x2260
jmp 0x3359
movq $0x1, (%r15,%r13,8)
jmp 0x3359
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/options.cc
// Function: Options::parseIntOption(char, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Options::parseIntOption (char index, int required, int min, int max, string usage, string error) {
    int ret = 0;
    if (options[index]) {
        ret = atoi(options[index]);
        if ((ret < min) || (ret > max)) {
            cerr << usage << error;
            exit (-1);
        }
    } else {
        if (required) {
            cerr << usage << error;
            exit (-1);
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %r14
movq 0x30(%rsp), %rbx
movslq %esi, %rax
movq (%rdi,%rax,8), %rdi
testq %rdi, %rdi
je 0x33fc
movl %r8d, %ebp
movl %ecx, %r15d
callq 0x2380
cmpl %r15d, %eax
jl 0x3402
cmpl %ebp, %eax
jg 0x3402
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %edx, %edx
je 0x33f1
movq 0x4be7(%rip), %rdi      # 0x7ff0
movq %r14, %rsi
callq 0x2220
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2220
pushq $-0x1
popq %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/options.cc
// Function: Options::getStringOption(char, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char* Options::getStringOption (char index, int required, string usage, string error) {
    char* ret = 0;
    if (options[index] > (char*)1) {
        ret = options[index];
    } else {
        if (required) {
            cerr << usage << error;
            exit (-1);
        }
    }
    return ret;
}

// Assembly:
movslq %esi, %rax
movq (%rdi,%rax,8), %rax
cmpq $0x1, %rax
ja 0x3437
testl %edx, %edx
jne 0x3438
xorl %eax, %eax
retq
pushq %rbx
movq %r8, %rbx
movq 0x4bad(%rip), %rdi      # 0x7ff0
movq %rcx, %rsi
callq 0x2220
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2220
pushq $-0x1
popq %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/delay.cc
// Function: doRandomPause(timespec*, int)
void doRandomPause (struct timespec* timer, int avgDelayMS) {
    double desiredTimeNS = log((double)rand()/RAND_MAX) * -(avgDelayMS * 1000000);
    desiredTimeNS -= checkTimer(timer);
    /* limit the delay */
    if (desiredTimeNS > ((long)avgDelayMS * 1000000 * 10)) {
        desiredTimeNS = ((long)avgDelayMS * 1000000 * 10);
    }
    if (desiredTimeNS <= 0) {
        return;
    }
    /*printf ("Sleeping for %f ns\n", desiredTimeNS);*/
    struct timespec delay;
    struct timespec remaining;
    delay.tv_sec = desiredTimeNS/1000000000l;
    delay.tv_nsec = (desiredTimeNS - (delay.tv_sec * 1000000000l));
    while (nanosleep(&delay, &remaining)) {
        if (errno == EINTR) {
            memcpy (&delay, &remaining, sizeof(delay));
        } else {
            warn ("Nanosleep error");
            break;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0x20d0
cvtsi2sd %eax, %xmm0
divsd 0x2168(%rip), %xmm0     # 0x5660
callq 0x21d0
imull $0xfff0bdc0, %ebx, %eax # imm = 0xFFF0BDC0
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
callq 0x34a2
cvtsi2sd %rax, %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movslq %ebx, %rax
imulq $0x989680, %rax, %rax   # imm = 0x989680
cvtsi2sd %rax, %xmm0
minsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x35b1
movapd %xmm0, %xmm1
divsd 0x2117(%rip), %xmm1     # 0x5668
cvttsd2si %xmm1, %rax
leaq 0x10(%rsp), %rbx
movq %rax, (%rbx)
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
cvtsi2sd %rax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0x8(%rbx)
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
testl %eax, %eax
je 0x35b1
callq 0x2040
cmpl $0x4, (%rax)
jne 0x35a3
movupd 0x28(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
jmp 0x357c
leaq 0x20c6(%rip), %rdi      # 0x5670
xorl %eax, %eax
callq 0x20f0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/delay.cc
// Function: setIntervalTimer(int, void (*)(int))
void setIntervalTimer (int keepalive, sighandler_t handler) {
    struct itimerval it;
    signal (SIGALRM, handler);
    memset (&it, 0, sizeof (struct itimerval));
    it.it_interval.tv_sec = keepalive;
    it.it_interval.tv_usec = 0;
    it.it_value.tv_sec = keepalive;
    it.it_value.tv_usec = 0;
    if (setitimer(ITIMER_REAL, &it, (struct itimerval*)0)) {
         err(1, "Setitimer failed");
    }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
pushq $0xe
popq %rdi
callq 0x22d0
movslq %ebx, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rax, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
xorl %edi, %edi
xorl %edx, %edx
callq 0x2360
testl %eax, %eax
jne 0x35f2
addq $0x20, %rsp
popq %rbx
retq
leaq 0x2087(%rip), %rsi      # 0x5680
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/protocol.cc
// Function: makeSocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int makeSocket (string host, int port) {
    int fd;
    socklen_t length;
    struct addrinfo* addrinfo;
    int s;
    if ((fd = socket( PF_INET, SOCK_DGRAM, 0 )) < 0) {
        err(1, "Problem creating socket");
    }
    
    stringstream portString;
    portString << port;
    if (s = getaddrinfo (host.c_str(), portString.str().c_str(), NULL, &addrinfo)) {
        err(1, "getaddrinfo: %s\n", gai_strerror(s));
    }

    if (bind(fd, addrinfo->ai_addr, sizeof(struct sockaddr))<0) {
        err(1, "Problem binding");
    }
    
    return fd;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %esi, %ebp
movq %rdi, %r14
pushq $0x2
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
js 0x36db
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x21a0
leaq 0x38(%rsp), %rdi
movl %ebp, %esi
callq 0x23b0
movq (%r14), %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %rsi
movq %rsp, %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x2300
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x2140
testl %ebp, %ebp
jne 0x36ec
movq (%rsp), %rax
movq 0x18(%rax), %rsi
pushq $0x10
popq %rdx
movl %ebx, %edi
callq 0x2080
testl %eax, %eax
js 0x3707
leaq 0x28(%rsp), %rdi
callq 0x21b0
movl %ebx, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1fc4(%rip), %rsi      # 0x56a6
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2230
movl %ebp, %edi
callq 0x2330
leaq 0x1fc4(%rip), %rsi      # 0x56be
pushq $0x1
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2230
leaq 0x1fc1(%rip), %rsi      # 0x56cf
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2230
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2140
jmp 0x372c
jmp 0x3729
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/protocol.cc
// Function: getSockAddr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
struct sockaddr* getSockAddr (string host, int port) {
    int s;
    struct sockaddr* ret = 0;
    struct addrinfo hints;
    struct addrinfo* addrinfo;
    char portString[100];

    memset (&hints, 0, sizeof(struct addrinfo));
    hints.ai_family = AF_INET;
    hints.ai_socktype = SOCK_DGRAM;
    hints.ai_flags = AI_PASSIVE;

    snprintf (portString, 100, "%d", port);

    if (s = getaddrinfo (host.c_str(), portString, &hints, &addrinfo)) {
        err(1, "getaddrinfo: %s\n", gai_strerror(s));
    } else {
        ret = new struct sockaddr;
        memcpy (ret, addrinfo->ai_addr, sizeof(ret));
    }
    freeaddrinfo(addrinfo);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movl %esi, %ecx
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movups %xmm0, 0x8(%r14)
andq $0x0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movl $0x2, 0x8(%r14)
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, (%r14)
leaq 0x1f5d(%rip), %rdx      # 0x56df
leaq 0x40(%rsp), %r15
pushq $0x64
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x23a0
movq (%rbx), %rdi
leaq 0x8(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x2300
testl %eax, %eax
jne 0x37da
pushq $0x10
popq %rdi
callq 0x22b0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rax
movq (%rax), %rax
movq %rax, (%rbx)
callq 0x2310
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2330
leaq 0x1ed6(%rip), %rsi      # 0x56be
pushq $0x1
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/protocol.cc
// Function: sendMessage(int, int, unsigned char*, unsigned int, int, unsigned char*, unsigned int, int, char const*, int, int)
int sendMessage(
                int socketFD, 
                int ifIndex,
                uint8_t *srcMacHex,
                uint32_t srcIp,
                int srcPort,
                uint8_t *dstMacHex,
                uint32_t dstIp,
                int dstPort,
                const char* message,
                int datalen,
                int checksumLength) {
    struct sockaddr_ll device;
//    printf ("Sending message <<%s>>\n", message);
    struct frame outboundFrame;
    int frameLength;

    memset (&device, 0, sizeof (device));
    device.sll_ifindex = ifIndex;
    device.sll_family = AF_PACKET;
    memcpy (device.sll_addr, srcMacHex, 6);
    device.sll_halen = 6;

    frameLength = buildFrame(&outboundFrame, srcMacHex, dstMacHex, srcIp, dstIp, srcPort, dstPort, message, datalen, checksumLength);

    uint8_t* frameBuf = (uint8_t*) &outboundFrame;

//    printf ("Packet Dump:\n");
//    for (int ix = 0; ix < frameLength; ix ++) {
//        printf("%02x ", frameBuf[ix]);
//        if (!((ix + 1) % 4)) {
//            printf ("\n");
//        }
//    }
//    printf ("\n\n");

    int bytes = sendto(socketFD, frameBuf, frameLength, 0, (struct sockaddr *) &device, sizeof (device));
    if (bytes != frameLength) {
        perror ("sendto failed");
    }

//    printf ("sendto sent %d of %d bytes!\n", bytes, frameLength);
    return datalen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10040, %rsp          # imm = 0x10040
movl %r8d, %eax
movl %edi, %ebp
movl 0x10088(%rsp), %ebx
movl 0x10070(%rsp), %r8d
movl 0x10078(%rsp), %r10d
movq 0x10080(%rsp), %r11
movl 0x10090(%rsp), %r12d
xorps %xmm0, %xmm0
movq %rsp, %r14
andl $0x0, 0x10(%r14)
movaps %xmm0, (%r14)
movl %esi, 0x4(%r14)
movw $0x11, (%r14)
movzwl 0x4(%rdx), %esi
movw %si, 0x10(%r14)
movl (%rdx), %esi
movl %esi, 0xc(%r14)
movb $0x6, 0xb(%r14)
leaq 0x17(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %r9, %rdx
movl %eax, %r9d
pushq %r12
pushq %rbx
pushq %r11
pushq %r10
callq 0x38bc
addq $0x20, %rsp
movslq %eax, %r12
pushq $0x14
popq %r9
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2060
cmpl %eax, %r12d
jne 0x38ae
movl %ebx, %eax
addq $0x10040, %rsp          # imm = 0x10040
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e2d(%rip), %rdi      # 0x56e2
callq 0x2200
jmp 0x389c
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a7e
movzwl (%rsi), %ecx
addq $0x2, %rsi
addl %ecx, %eax
addl $-0x2, %edx
jmp 0x3a6b
cmpl $0x1, %edx
jne 0x3a8b
movzbl (%rsi), %ecx
shll $0x8, %ecx
addl %ecx, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x3a9c
movl %eax, %ecx
shrl $0x10, %ecx
movzwl %ax, %eax
jmp 0x3a89
notl %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3ab8
cmpl $0xea61, %ebx           # imm = 0xEA61
jae 0x3ac8
pushq $0x1
popq %rax
popq %rbx
retq
movq 0x4531(%rip), %rdi      # 0x7ff0
leaq 0x1c2a(%rip), %rsi      # 0x56f0
jmp 0x3ad6
movq 0x4521(%rip), %rdi      # 0x7ff0
leaq 0x1c29(%rip), %rsi      # 0x56ff
callq 0x22a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x23b0
movq %rax, %rdi
callq 0x2150
pushq $-0x1
popq %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rax
movq (%rax), %rax
movq %rax, 0x20(%r14)
cmpq %rbx, %rax
je 0x3f28
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x3f1a
leaq 0x828(%r15), %rdi
callq 0x43be
movq %r15, %rdi
callq 0x2270
movq 0x20(%r14), %rax
jmp 0x3ef9
movq 0x28(%r14), %rdi
callq 0x2270
movq 0x30(%r14), %rdi
callq 0x2270
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x41ba
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x828(%rdi), %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x2320
movq %r15, %rdi
movq %r12, %rsi
callq 0x4298
movq %rsp, %rdi
callq 0x2140
movl %ebp, 0x818(%rbx)
movq %r14, 0x838(%rbx)
andq $0x0, 0x820(%rbx)
movl $0x818, %edx            # imm = 0x818
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2180
movb $0x1, (%rbx)
xorl %edi, %edi
callq 0x2250
movq %rax, 0x8(%rbx)
andl $0x0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x404a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x2250
movq %rax, %rcx
movq 0x820(%rbx), %rsi
movq 0x838(%rbx), %rax
movslq 0x48(%rax), %rdi
movq %rcx, %rax
cqto
idivq %rdi
subq %rdx, %rcx
testq %rsi, %rsi
setne %al
je 0x40a0
cmpq %rsi, %rcx
je 0x40aa
movq %rcx, 0x820(%rbx)
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x48
popq %rbx
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 0x43f4
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 0x37f5
addq $0x30, %rsp
testl %eax, %eax
js 0x4198
movl %eax, %ebp
cmpl %ebx, %eax
je 0x4187
leaq 0x1641(%rip), %rdi      # 0x57bd
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20f0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1609(%rip), %rdi      # 0x57a8
xorl %eax, %eax
callq 0x20f0
pushq $-0x1
popq %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
movq %rsi, (%rsp)
movq (%rsi), %r15
movl $0x1, (%rdi)
andq $0x0, 0x8(%rdi)
pushq $0x1
popq %r14
pushq $0x8
popq %r12
pushq $0x2c
popq %rbp
movq %r15, %rax
incq %rax
movq %rax, %rdi
movl %ebp, %esi
callq 0x2110
testq %rax, %rax
je 0x42e4
incl %r14d
movl %r14d, (%rbx)
addq $0x8, %r12
jmp 0x42c6
movq %r12, %rdi
callq 0x2030
movq %rax, 0x8(%rbx)
pushq $0xc
popq %r12
leaq 0x14f7(%rip), %r13      # 0x57f2
xorl %ebp, %ebp
movl %ebp, 0x4(%rbx)
cmpl %r14d, %ebp
jge 0x43ae
movq %r12, %rdi
callq 0x2030
movq 0x8(%rbx), %rcx
movslq %ebp, %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x8(%rbx), %rax
movq (%rax,%rdx,8), %rax
andl $0x0, (%rax)
andw $0x0, 0x4(%rax)
movq 0x8(%rbx), %rax
movslq 0x4(%rbx), %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 %r13, %rsi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2290
addq $0x10, %rsp
cmpl $0x5, %eax
jle 0x4384
movq %r15, %rdi
pushq $0x2c
popq %rsi
callq 0x2110
movq %rax, %r15
incq %r15
movl (%rbx), %r14d
movl 0x4(%rbx), %ebp
incl %ebp
jmp 0x42fd
movq 0x3c65(%rip), %rdi      # 0x7ff0
leaq 0x147e(%rip), %rsi      # 0x5810
callq 0x22a0
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x2220
movq %rax, %rdi
callq 0x2150
andl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43ee
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rbx), %rdi
cmpl (%rbx), %eax
jge 0x43e8
cltq
movq (%rdi,%rax,8), %rdi
callq 0x2270
movl 0x4(%rbx), %eax
incl %eax
jmp 0x43cb
popq %rbx
jmp 0x2270
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, (%rsp)
cmpq %rax, 0x8(%rsi)
jne 0x41f5
movq %rdi, %r14
movl 0x35c(%rdi), %ecx
xorl %ebx, %ebx
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
leaq 0x28(%rsp), %r15
leaq 0x8(%rsp), %r12
xorl %r13d, %r13d
movl %ecx, %eax
cmpq %rax, %rbx
jae 0x41e3
movl %ebp, %edx
imull %ebx, %edx
movl 0x360(%r14), %ecx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x3250
movq %r12, %rdi
movq %r15, %rsi
callq 0x3340
movq %r14, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0x508e
movq %r12, %rdi
callq 0x3110
movq %r14, %rdi
callq 0x51d8
addl %eax, %r13d
movq %r15, %rdi
callq 0x3110
incq %rbx
movl 0x35c(%r14), %ecx
jmp 0x4184
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ebf(%rip), %rdi      # 0x90bb
leaq 0x4ed3(%rip), %rsi      # 0x90d6
leaq 0x4edb(%rip), %rcx      # 0x90e5
pushq $0x16
popq %rdx
callq 0x3170
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3110
jmp 0x4224
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9a8f(%rip), %rax      # 0xdd10
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x4298
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x42ac
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x42c0
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x42d4
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x30(%rbx)
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x42f7
pushq $0x38
popq %rdi
callq 0x3230
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x426c
movq %r15, 0x18(%rbx)
movq 0x20(%r14), %r12
testq %r12, %r12
je 0x433c
pushq $0x38
popq %rdi
callq 0x3230
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x426c
movq %r15, 0x20(%rbx)
cmpq $0x0, 0x20(%r14)
je 0x433c
pushq $0x38
popq %rdi
callq 0x3230
movq %rax, %r15
movq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x426c
movq %r15, 0x28(%rbx)
movq 0x30(%r14), %r12
testq %r12, %r12
je 0x435f
pushq $0x38
popq %rdi
callq 0x3230
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x426c
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 0x4378
jmp 0x4378
jmp 0x4378
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x3240
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43ba
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x43ce
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x43e2
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x43f6
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x98ae(%rip), %rax      # 0xdd50
movq %rax, (%rdi)
movl %esi, 0x38(%rdi)
movl %edx, 0x3c(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
andl $0x0, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x40(%rdi), %rax
andl $0x0, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
andl $0x0, 0x70(%rdi)
movl %edx, %r15d
andq $0x0, 0x78(%rdi)
movl %esi, %ebp
leaq 0x70(%rdi), %rax
movq %rax, 0x80(%rdi)
movq %rax, 0x88(%rdi)
andq $0x0, 0x90(%rdi)
leaq 0xa8(%rdi), %r14
movq %r14, %rdi
callq 0x7698
leaq 0x318(%rbx), %r12
movq %r12, %rdi
callq 0x7f74
leaq 0x328(%rbx), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x328(%rbx)
andq $0x0, 0x338(%rbx)
movl %ebp, (%rbx)
movl %r15d, 0x4(%rbx)
addl %ebp, %ebp
pushq $0x1
popq %r15
movl %ebp, %ecx
shll %cl, %r15d
leaq (,%r15,8), %rdi
callq 0x3030
movq %rax, 0x320(%rbx)
xorl %eax, %eax
cmpq %rax, %r15
je 0x45e6
movq 0x320(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x45d0
andq $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 0x63ac
movq %r12, %rdi
callq 0x7ffe
jmp 0x4615
movq %rax, %r15
movq %r14, %rdi
callq 0x76f6
jmp 0x4622
movq %rax, %r15
leaq 0x68(%rbx), %rdi
leaq 0x38(%rbx), %r14
addq $0x8, %rbx
callq 0x6602
movq %r14, %rdi
callq 0x665a
movq %rbx, %rdi
callq 0x665a
movq %r15, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movb (%rbx), %cl
addb %cl, %cl
movl %r14d, %eax
shrl %cl, %eax
testl %eax, %eax
jne 0x468f
movq 0x320(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x468a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x320(%rbx), %rax
andq $0x0, (%rax,%r14,8)
incq %r14
jmp 0x465b
movq 0x310(%rbx), %r15
testq %r15, %r15
je 0x46e3
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x46c8
addq $-0x268, %r15           # imm = 0xFD98
imulq $0x268, %r12, %r13      # imm = 0x268
leaq (%r15,%r13), %rdi
callq 0x76f6
addq $-0x268, %r13           # imm = 0xFD98
jne 0x46b6
imulq $0x268, %r12, %rsi      # imm = 0x268
addq $0x8, %rsi
movq %r14, %rdi
callq 0x3460
andq $0x0, 0x310(%rbx)
movq 0x320(%rbx), %rdi
testq %rdi, %rdi
je 0x46fc
callq 0x32e0
andq $0x0, 0x320(%rbx)
leaq 0x328(%rbx), %rdi
callq 0x63ac
leaq 0x318(%rbx), %rdi
callq 0x7ffe
leaq 0xa8(%rbx), %rdi
callq 0x76f6
leaq 0x68(%rbx), %rdi
callq 0x6602
leaq 0x38(%rbx), %rdi
callq 0x665a
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x665a
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x4d
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3300
movq %rax, %r12
cmpq $-0x1, %rax
je 0x4ddf
pushq $0x4d
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3300
movslq %eax, %r13
movq (%r14), %rax
movb $0x41, (%rax,%r13)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4d6e
movq (%r14), %rax
movb $0x43, (%rax,%r13)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4d6e
movq (%r14), %rax
movb $0x4d, (%rax,%r13)
pushq $0x52
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3300
cmpq $-0x1, %rax
je 0x4e3a
pushq $0x52
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3300
movslq %eax, %r12
movq (%r14), %rax
movb $0x41, (%rax,%r12)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4d6e
movq (%r14), %rax
movb $0x47, (%rax,%r12)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4d6e
movq (%r14), %rax
movb $0x52, (%rax,%r12)
jmp 0x4e40
cmpq $-0x1, %r12
je 0x4e4f
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 0x4748
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7f8a
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 0x51b9
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
jne 0x51b9
movq 0x348(%r14), %rcx
cmpl %ebx, 0x8(%rcx)
jbe 0x51b9
movq 0x8ee5(%rip), %r12      # 0xdff0
leaq 0x40c4(%rip), %r13      # 0x91d6
movl 0x344(%r14), %eax
cmpq %rax, 0x8(%r15)
jbe 0x51c1
movq (%r15), %rdx
movzbl (%rdx,%rax), %edx
cmpl $0x54, %edx
je 0x5150
cmpl $0x43, %edx
je 0x5144
cmpl $0x47, %edx
je 0x514a
cmpl $0x41, %edx
jne 0x5156
movq 0x18(%rcx), %rbp
jmp 0x5186
movq 0x20(%rcx), %rbp
jmp 0x5186
movq 0x28(%rcx), %rbp
jmp 0x5186
movq 0x30(%rcx), %rbp
jmp 0x5186
movq %r12, %rdi
movq %r13, %rsi
callq 0x3220
movl 0x344(%r14), %ecx
movq (%r15), %rdx
movsbl (%rdx,%rcx), %esi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
callq 0x3120
movl 0x344(%r14), %eax
movq %rbp, 0x348(%r14)
incl %eax
movl %eax, 0x344(%r14)
testq %rbp, %rbp
je 0x51b9
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x28(%rax)
testb %al, %al
jne 0x51b9
movq 0x348(%r14), %rcx
cmpl %ebx, 0x8(%rcx)
ja 0x5112
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_O2/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 0x5238
movq 0x320(%rdi), %rcx
movl %esi, %esi
movq (%rcx,%rsi,8), %rbx
testq %rbx, %rbx
je 0x5236
cmpl %edx, 0x8(%rbx)
jbe 0x5236
movq %rbx, %rsi
xorl %ecx, %ecx
movl %eax, %r8d
callq 0x5258
decq %rax
movl 0x8(%rbx), %ecx
xorl %edx, %edx
divq %rcx
incl %eax
popq %rbx
retq
leaq 0x3fb0(%rip), %rdi      # 0x91ef
leaq 0x3f13(%rip), %rsi      # 0x9159
leaq 0x3fdb(%rip), %rcx      # 0x9228
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x3170
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x52de
movl 0x8(%r14), %eax
cmpl %ebp, %eax
jbe 0x52d3
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
testb %al, %al
jne 0x52cf
movq 0x18(%r14), %rsi
incl %ebx
movq %r15, %rdi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
callq 0x5258
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5258
movq 0x28(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5258
movq %rax, %r12
movq 0x30(%r14), %r14
jmp 0x526e
movl 0x8(%r14), %eax
movl %ebx, %ecx
movl %eax, %eax
imulq %rcx, %rax
addq %rax, %r12
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5324
movq 0x320(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0x5320
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5344
movl 0x8(%rbx), %ecx
xorl %edx, %edx
divq %rcx
jmp 0x5322
xorl %eax, %eax
popq %rbx
retq
leaq 0x3ec4(%rip), %rdi      # 0x91ef
leaq 0x3e27(%rip), %rsi      # 0x9159
leaq 0x3f35(%rip), %rcx      # 0x926e
movl $0x1fe, %edx            # imm = 0x1FE
callq 0x3170
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x53c6
cmpl %ebx, %ebp
je 0x53bb
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
cmpl %ebp, %ebx
jae 0x5374
testb %al, %al
jne 0x53bb
movq 0x18(%r14), %rsi
incl %ebx
movq %r15, %rdi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
callq 0x5344
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5344
movq 0x28(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x5344
movq %rax, %r12
movq 0x30(%r14), %r14
jmp 0x535a
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_O2/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 $0x38, %rsp
movq %rdi, %rbx
movl (%rdi), %ebp
movl 0x4(%rdi), %r14d
subl %ebp, %r14d
incl %r14d
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x63ce
addl %ebp, %ebp
pushq $0x1
popq %r15
movl %ebp, %ecx
shll %cl, %r15d
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x6(%rsp), %rcx
movq %r15, %rsi
callq 0x6420
leaq 0x20(%rsp), %rdi
callq 0x6cb8
xorl %r12d, %r12d
cmpq %r15, %r12
je 0x5466
imulq $0x18, %r12, %rbp
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x5461
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x52ea
movq 0x8(%rsp), %rcx
movq (%rcx,%rbp), %rcx
movl %eax, (%rcx,%r13,4)
incq %r13
jmp 0x543c
incq %r12
jmp 0x5430
addq $0x328, %rbx            # imm = 0x328
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6476
leaq 0x8(%rsp), %rdi
callq 0x63ac
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54a9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6cb8
jmp 0x54b6
movq %rax, %rbx
jmp 0x54b6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x63ac
movq %rbx, %rdi
callq 0x3430