LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: luisremis[P]SDFS/connections.cpp
// Function: char42String[abi:cxx11](char*)
std::string char42String(char* buf) // buf must be size 4
{
    std::stringstream aux;
    aux << (unsigned int) ((uint8_t)buf[0]) << ".";
    aux << (unsigned int) ((uint8_t)buf[1]) << ".";
    aux << (unsigned int) ((uint8_t)buf[2]) << ".";
    aux << (unsigned int) ((uint8_t)buf[3]);

    return aux.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x1c0(%rbp)
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x42d0
leaq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x44e0
movq %rax, -0x1b0(%rbp)
jmp 0x1a4cc
movq -0x1b0(%rbp), %rdi
leaq 0x22e0(%rip), %rsi      # 0x1c7ba
callq 0x43f0
jmp 0x1a4e1
leaq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %esi
callq 0x44e0
movq %rax, -0x1c8(%rbp)
jmp 0x1a4fe
movq -0x1c8(%rbp), %rdi
leaq 0x22ae(%rip), %rsi      # 0x1c7ba
callq 0x43f0
jmp 0x1a513
leaq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %esi
callq 0x44e0
movq %rax, -0x1d0(%rbp)
jmp 0x1a530
movq -0x1d0(%rbp), %rdi
leaq 0x227c(%rip), %rsi      # 0x1c7ba
callq 0x43f0
jmp 0x1a545
leaq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %esi
callq 0x44e0
jmp 0x1a55b
movq -0x1c0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x43e0
jmp 0x1a570
leaq -0x198(%rbp), %rdi
callq 0x42f0
movq -0x1b8(%rbp), %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x42f0
movq -0x1a0(%rbp), %rdi
callq 0x46a0
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: getOwnIPAddr[abi:cxx11]()
std::string getOwnIPAddr(){
    struct ifaddrs * ifAddrStruct=NULL;
    struct ifaddrs * ifa=NULL;
    void * tmpAddrPtr=NULL;

    getifaddrs(&ifAddrStruct);
    std::string result;

    int i=0;
    for (ifa = ifAddrStruct; ifa != NULL; ifa = ifa->ifa_next) {
        if (!ifa->ifa_addr) {
            continue;
        }
        i++;
        if(i==4){
            tmpAddrPtr=&((struct sockaddr_in *)ifa->ifa_addr)->sin_addr;
            char addressBuffer[INET_ADDRSTRLEN];
            inet_ntop(AF_INET, tmpAddrPtr, addressBuffer, INET_ADDRSTRLEN);
            result = addressBuffer;
        }
    }
    
    if (ifAddrStruct!=NULL) freeifaddrs(ifAddrStruct);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x4710
movq -0x58(%rbp), %rdi
movb $0x0, -0x21(%rbp)
callq 0x4520
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1a6a0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1a62c
jmp 0x1a690
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jne 0x1a68e
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movl $0x2, %edi
leaq -0x40(%rbp), %rdx
movq %rdx, -0x68(%rbp)
movl $0x10, %ecx
callq 0x4420
movq -0x58(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x4500
jmp 0x1a675
jmp 0x1a68e
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x42a0
jmp 0x1a6cd
jmp 0x1a690
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1a614
cmpq $0x0, -0x10(%rbp)
je 0x1a6b0
movq -0x10(%rbp), %rdi
callq 0x4690
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x1a6c3
movq -0x58(%rbp), %rdi
callq 0x42a0
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x46a0
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: bindSocket(int)
int bindSocket(int port)
{
    struct sockaddr_in svrAdd, clntAdd;
    
    //create socket
    int sockfd = socket(AF_INET, SOCK_DGRAM, 0);

    if(sockfd < 0)
    {
        std::cout << "Cannot open socket" << std::endl;
        exit(1);
    }
    
    memset((char*) &svrAdd,0, sizeof(svrAdd));
    
    svrAdd.sin_family = AF_INET;
    svrAdd.sin_addr.s_addr = INADDR_ANY;
    svrAdd.sin_port = htons(port);
    
    //bind socket
    int ret = ::bind(sockfd, (struct sockaddr *)&svrAdd, sizeof(svrAdd));
    if( ret < 0)
    {
        std::cout << "open_socket: Cannot bind" << std::endl;
        exit(1);
    }
    // printf("UDP Listening at port %d...\n", port);

    return sockfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x4110
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jge 0x1a74e
movq 0xc897(%rip), %rdi      # 0x26fc0
leaq 0x2653(%rip), %rsi      # 0x1cd83
callq 0x43f0
movq %rax, %rdi
movq 0xc869(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
leaq -0x14(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4240
movw $0x2, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
movzwl %ax, %edi
callq 0x4080
movw %ax, -0x12(%rbp)
movl -0x28(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x10, %edx
callq 0x40d0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x1a7c0
movq 0xc825(%rip), %rdi      # 0x26fc0
leaq 0x25f4(%rip), %rsi      # 0x1cd96
callq 0x43f0
movq %rax, %rdi
movq 0xc7f7(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: receiveUDP(int, char*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int receiveUDP(int sockfd, char* buf, uint32_t len, std::string& sender)
{
    struct sockaddr addr;
    socklen_t fromlen = sizeof addr;

    int byte_count = recvfrom(sockfd, buf, len, 0, &addr, &fromlen);

    if (byte_count == -1)
    {
        printf("ERROR RECEIVING!!!\n");
        exit(-1);
    }

    struct sockaddr_in *sin = (struct sockaddr_in *) &addr;

    sender = inet_ntoa(sin->sin_addr);

    UDPreceived++;

    return byte_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x10, -0x34(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
xorl %ecx, %ecx
leaq -0x30(%rbp), %r8
leaq -0x34(%rbp), %r9
callq 0x4310
movl %eax, -0x38(%rbp)
cmpl $-0x1, -0x38(%rbp)
jne 0x1a829
leaq 0x2597(%rip), %rdi      # 0x1cdaf
movb $0x0, %al
callq 0x4060
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4460
leaq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %edi
callq 0x4200
movq %rax, %rsi
movq -0x20(%rbp), %rdi
callq 0x4500
movl 0xcd97(%rip), %eax      # 0x275ec
addl $0x1, %eax
movl %eax, 0xcd8e(%rip)      # 0x275ec
movl -0x38(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: sendUDP(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, char*, unsigned int)
void sendUDP(int sockfd, std::string& add, int port, char* buf, uint32_t len)
{
    struct sockaddr_in servaddr,cliaddr;
    struct hostent *server;

    server = gethostbyname(add.c_str());

    if(server == NULL)
    {
        std::cout << "Host does not exist" << std::endl;
        exit(1);
    }

    memset((char *) &servaddr,0, sizeof(servaddr));
    servaddr.sin_family = AF_INET;
    memcpy((char *) &servaddr.sin_addr.s_addr,(char *) server -> h_addr, server -> h_length);
    servaddr.sin_port = htons(port);
/*
    //int random = rand() % 100;
    //if ((random) <= 10 ) return; 

    static int counter = 1;
    if ((counter++) % 4 == 0 ){
        //std::cout << "Drop message: " << (unsigned int) (((Message* )(buf))->type) << " " << add << std::endl;
        return; 
    } 
*/

    int ret = sendto(sockfd,buf, len, 0, (struct sockaddr *)&servaddr,sizeof(servaddr));

    if (ret == -1)
    {
        printf("Error in sendUDP: cannot send\n");
        return;
    }
    UDPsent++;
    //printf("Message sent\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41d0
movq %rax, %rdi
callq 0x4450
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x1a8d2
movq 0xc713(%rip), %rdi      # 0x26fc0
leaq 0x250f(%rip), %rsi      # 0x1cdc3
callq 0x43f0
movq %rax, %rdi
movq 0xc6e5(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
leaq -0x34(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4240
movw $0x2, -0x34(%rbp)
leaq -0x34(%rbp), %rdi
addq $0x4, %rdi
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rax
movslq 0x14(%rax), %rdx
callq 0x4330
movl -0x14(%rbp), %eax
movzwl %ax, %edi
callq 0x4080
movw %ax, -0x32(%rbp)
movl -0x4(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
xorl %ecx, %ecx
leaq -0x34(%rbp), %r8
movl $0x10, %r9d
callq 0x4090
movl %eax, -0x54(%rbp)
cmpl $-0x1, -0x54(%rbp)
jne 0x1a94d
leaq 0x2493(%rip), %rdi      # 0x1cdd7
movb $0x0, %al
callq 0x4060
jmp 0x1a95c
movl 0xcc95(%rip), %eax      # 0x275e8
addl $0x1, %eax
movl %eax, 0xcc8c(%rip)      # 0x275e8
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: open_socket(int)
int open_socket(int port)
{
    struct sockaddr_in svrAdd, clntAdd;
    int listenFd;
    
    //create socket
    listenFd = socket(AF_INET, SOCK_STREAM, 0);
    int yes = 1;

    if (setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) 
    {
        printf("setsockopt\n");
        exit(1);
    }
    
    if(listenFd < 0)
    {
        std::cout << "Cannot open socket" << std::endl;
        exit(1);
    }
    
    memset((char*) &svrAdd,0, sizeof(svrAdd));
    
    svrAdd.sin_family = AF_INET;
    svrAdd.sin_addr.s_addr = INADDR_ANY;
    svrAdd.sin_port = htons(port);
    
    //bind socket

    int ret = ::bind(listenFd, (struct sockaddr *)&svrAdd, sizeof(svrAdd));
    if(ret < 0)
    {
        std::cout << "open_socket: Cannot bind" << std::endl;
        exit(1);
    }
    // printf("TCP Listening at port %d...\n", port);

    return listenFd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x4110
movl %eax, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
movl -0x28(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rcx
movl $0x4, %r8d
callq 0x46d0
cmpl $-0x1, %eax
jne 0x1a9cf
leaq 0x2438(%rip), %rdi      # 0x1cdf6
movb $0x0, %al
callq 0x4060
movl $0x1, %edi
callq 0x4460
cmpl $0x0, -0x28(%rbp)
jge 0x1aa01
movq 0xc5e4(%rip), %rdi      # 0x26fc0
leaq 0x23a0(%rip), %rsi      # 0x1cd83
callq 0x43f0
movq %rax, %rdi
movq 0xc5b6(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
leaq -0x14(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4240
movw $0x2, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
movzwl %ax, %edi
callq 0x4080
movw %ax, -0x12(%rbp)
movl -0x28(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x10, %edx
callq 0x40d0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x1aa73
movq 0xc572(%rip), %rdi      # 0x26fc0
leaq 0x2341(%rip), %rsi      # 0x1cd96
callq 0x43f0
movq %rax, %rdi
movq 0xc544(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: listen_socket(int)
int listen_socket(int listenFd)
{

    socklen_t len; //store size of the address
    int connFd;
    struct sockaddr_in clntAdd;

    listen(listenFd, 5);
    
    len = sizeof(clntAdd);

    //this is where client connects. svr will hang in this mode until client conn
    connFd = accept(listenFd, (struct sockaddr *)&clntAdd, &len);

    if (connFd < 0)
    {
        std::cout << "Cannot accept connection" << std::endl;
        exit(1);
    }
    else
    {
        //std::cout << "Server Connection successful " << std::endl;
    }

    return connFd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
movl $0x5, %esi
callq 0x4440
movl $0x10, -0x8(%rbp)
movl -0x4(%rbp), %edi
leaq -0x1c(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0x4170
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x1aae4
movq 0xc501(%rip), %rdi      # 0x26fc0
leaq 0x233c(%rip), %rsi      # 0x1ce02
callq 0x43f0
movq %rax, %rdi
movq 0xc4d3(%rip), %rsi      # 0x26fa8
callq 0x4410
movl $0x1, %edi
callq 0x4460
jmp 0x1aae6
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: luisremis[P]SDFS/connections.cpp
// Function: robustRead(int, char*, int)
int robustRead(int connFd, char * buffer, int length){
    int count = 0, add = 0;
    while(count < length){
        if( (add = read(connFd, buffer, length)) > 0 ){
            count += add;
            buffer += add;
        }
        else if( add < 0 ){
            return -10;
        }
        else if(add == 0){
            break;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1acf9
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x4560
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jle 0x1acdc
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x1acf7
cmpl $0x0, -0x1c(%rbp)
jge 0x1aceb
movl $0xfffffff6, -0x4(%rbp) # imm = 0xFFFFFFF6
jmp 0x1acff
cmpl $0x0, -0x1c(%rbp)
jne 0x1acf3
jmp 0x1acf9
jmp 0x1acf5
jmp 0x1acf7
jmp 0x1aca0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: luisremis[P]SDFS/connections.cpp
// Function: robustWrite(int, char*, int)
int robustWrite(int connFd, char * buffer, int length){
    int count = 0, add = 0;
    while(count < length){
        if( ( add = write(connFd, buffer, length)) > 0 ){
            count += add;
            buffer += add;
        }
        else if( add < 0 ){
            return -1;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1ad7f
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x4190
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jle 0x1ad6c
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x1ad7d
cmpl $0x0, -0x1c(%rbp)
jge 0x1ad7b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1ad85
jmp 0x1ad7d
jmp 0x1ad30
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: luisremis[P]SDFS/ChronoCpu.cpp
// Function: ChronoCpu::doTic()
void ChronoCpu::doTic(void)
{
	lastTicTime = ticTime;

#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
	clock_serv_t cclock;
	mach_timespec_t mts;
	host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
	clock_get_time(cclock, &mts);
	mach_port_deallocate(mach_task_self(), cclock);
	ticTime.tv_sec = mts.tv_sec;
	ticTime.tv_nsec = mts.tv_nsec;

#else
	if (clock_gettime(CLOCK_REALTIME, &ticTime) != 0){
		++errors;
		cerr << "ChronoCpu::doTic - " << name << ": clock_gettime() failed!" << endl;
		return;
	}
#endif

	++ticCounter;

	if (ticCounter > 1){
		float period_s = (float)(ticTime.tv_sec - lastTicTime.tv_sec);
		float period_ns = (float)(ticTime.tv_nsec - lastTicTime.tv_nsec);
		periodStats.lastTime_ms = period_s * 1e3f + period_ns / 1e6f;
		updateStats(periodStats);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x18(%rbp)
movq 0xc0(%rsi), %rax
movq %rax, 0xb0(%rsi)
movq 0xc8(%rsi), %rax
movq %rax, 0xb8(%rsi)
addq $0xc0, %rsi
xorl %edi, %edi
callq 0x4390
cmpl $0x0, %eax
je 0x1b2a6
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq 0xbd89(%rip), %rdi      # 0x26ff0
leaq 0x1be6(%rip), %rsi      # 0x1ce54
callq 0x43f0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x1bdb(%rip), %rsi      # 0x1ce68
callq 0x43f0
movq %rax, %rdi
movq 0xbd0c(%rip), %rsi      # 0x26fa8
callq 0x4410
jmp 0x1b330
movq -0x18(%rbp), %rax
movl 0xe0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xe0(%rax)
cmpl $0x1, 0xe0(%rax)
jbe 0x1b330
movq -0x18(%rbp), %rdi
movq 0xc0(%rdi), %rax
subq 0xb0(%rdi), %rax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0xc(%rbp)
movq 0xc8(%rdi), %rax
subq 0xb8(%rdi), %rax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0x10(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss 0x1b48(%rip), %xmm2     # 0x1ce50
divss %xmm2, %xmm1
movss 0x1b38(%rip), %xmm2     # 0x1ce4c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xa4(%rdi)
movq %rdi, %rsi
addq $0x70, %rsi
callq 0x1bba0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/ChronoCpu.cpp
// Function: ChronoCpu::doTac()
void ChronoCpu::doTac(void)
{
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
	clock_serv_t cclock;
	mach_timespec_t mts;
	host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
	clock_get_time(cclock, &mts);
	mach_port_deallocate(mach_task_self(), cclock);
	tacTime.tv_sec = mts.tv_sec;
	tacTime.tv_nsec = mts.tv_nsec;

#else
	if (clock_gettime(CLOCK_REALTIME, &tacTime) != 0){
		++errors;
		cerr << "ChronoCpu::doTac - " << name << ": clock_gettime() failed!" << endl;
		return;
	}
#endif

	float elapsed_s = (float)(tacTime.tv_sec - ticTime.tv_sec);
	float elapsed_ns = (float)(tacTime.tv_nsec - ticTime.tv_nsec);
	elapsedStats.lastTime_ms = elapsed_s * 1e3f + elapsed_ns / 1e6f;
	updateStats(elapsedStats);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x18(%rbp)
addq $0xd0, %rsi
xorl %edi, %edi
callq 0x4390
cmpl $0x0, %eax
je 0x1b3b7
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq 0xbc75(%rip), %rdi      # 0x26ff0
leaq 0x1b00(%rip), %rsi      # 0x1ce82
callq 0x43f0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x1ac7(%rip), %rsi      # 0x1ce68
callq 0x43f0
movq %rax, %rdi
movq 0xbbf8(%rip), %rsi      # 0x26fa8
callq 0x4410
jmp 0x1b422
movq -0x18(%rbp), %rdi
movq 0xd0(%rdi), %rax
subq 0xc0(%rdi), %rax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0xc(%rbp)
movq 0xd8(%rdi), %rax
subq 0xc8(%rdi), %rax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0x10(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss 0x1a53(%rip), %xmm2     # 0x1ce50
divss %xmm2, %xmm1
movss 0x1a43(%rip), %xmm2     # 0x1ce4c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x64(%rdi)
movq %rdi, %rsi
addq $0x30, %rsi
callq 0x1bba0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::reset()
void Chrono::reset(void)
{
	ticIdle = true;
	errors = 0;
	resetStats(elapsedStats);
	resetStats(periodStats);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movb $0x1, 0x29(%rdi)
movl $0x0, 0x2c(%rdi)
movq %rdi, %rsi
addq $0x30, %rsi
callq 0x1b6d0
movq -0x10(%rbp), %rdi
movq %rdi, %rsi
addq $0x70, %rsi
callq 0x1b6d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::tic()
void Chrono::tic(void)
{
	if (!enabled){
		return;
	}

	if (ticIdle){
		ticIdle = false;
		doTic();
	} else{
		++errors;
		cerr << "Chrono::tic - " << name << ": Calling Chrono::tic with no matching Chrono::tag!" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x28(%rax)
jne 0x1b5cc
jmp 0x1b634
movq -0x10(%rbp), %rax
testb $0x1, 0x29(%rax)
je 0x1b5e6
movq -0x10(%rbp), %rdi
movb $0x0, 0x29(%rdi)
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1b634
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq 0xb9f6(%rip), %rdi      # 0x26ff0
leaq 0x18c0(%rip), %rsi      # 0x1cec1
callq 0x43f0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x18b0(%rip), %rsi      # 0x1ced0
callq 0x43f0
movq %rax, %rdi
movq 0xb979(%rip), %rsi      # 0x26fa8
callq 0x4410
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::tac()
void Chrono::tac(void)
{
	if (!enabled){
		return;
	}

	if (!ticIdle){
		ticIdle = true;
		doTac();
	} else{
		++errors;
		cerr << "Chrono::tac - " << name << ": Calling Chrono::tac with no matching Chrono::tic!" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x28(%rax)
jne 0x1b65c
jmp 0x1b6c4
movq -0x10(%rbp), %rax
testb $0x1, 0x29(%rax)
jne 0x1b676
movq -0x10(%rbp), %rdi
movb $0x1, 0x29(%rdi)
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x1b6c4
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq 0xb966(%rip), %rdi      # 0x26ff0
leaq 0x1873(%rip), %rsi      # 0x1cf04
callq 0x43f0
movq -0x10(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x1863(%rip), %rsi      # 0x1cf13
callq 0x43f0
movq %rax, %rdi
movq 0xb8e9(%rip), %rsi      # 0x26fa8
callq 0x4410
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::resetStats(Chrono::ChronoStats&)
void Chrono::resetStats(ChronoStats& stats)
{
	stats.counter = 0;
	stats.totalTime_ms = 0.0f;
	stats.totalSquaredTime_ms2 = 0.0f;
	stats.averageTime_ms = 0.0f;
	stats.stdDevTime_ms = 0.0f;
	stats.lastTime_ms = 0.0f;
	stats.minTime_ms = 0.0f;
	stats.maxTime_ms = 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rax)
popq %rbp
retq
nopl (%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::printAvgTime(Chrono::ChronoStats const&, std::ostream&) const
std::ostream& Chrono::printAvgTime(const Chrono::ChronoStats& stats, std::ostream& os) const
{
	os.precision(2);
	os << fixed;
	os << name << ": " << stats.name << " -> " << "averageTime: " << stats.averageTime_ms << " [ms]" << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x2, %esi
callq 0x1bd10
movq -0x18(%rbp), %rdi
leaq 0x334(%rip), %rsi       # 0x1bd40
callq 0x4180
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x9ef(%rip), %rsi       # 0x1c41b
callq 0x43f0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x155c(%rip), %rsi      # 0x1cfa3
callq 0x43f0
movq %rax, %rdi
leaq 0x150f(%rip), %rsi      # 0x1cf65
callq 0x43f0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
callq 0x42e0
movq %rax, %rdi
leaq 0x14e8(%rip), %rsi      # 0x1cf5e
callq 0x43f0
movq %rax, %rdi
movq 0xb523(%rip), %rsi      # 0x26fa8
callq 0x4410
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::printAvgTime(Chrono::ChronoStats const&, std::ostream&, float) const
std::ostream& Chrono::printAvgTime(const Chrono::ChronoStats& stats, std::ostream& os, const float ref) const
{
	os.precision(2);
	os << fixed;
	os << name << ": " << stats.name << " -> " << "averageTime: " << stats.averageTime_ms << " [ms] (";
	os << (stats.averageTime_ms/ref*100.0f) << "%)" << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x2, %esi
callq 0x1bd10
movq -0x18(%rbp), %rdi
leaq 0x25f(%rip), %rsi       # 0x1bd40
callq 0x4180
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x8, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x91a(%rip), %rsi       # 0x1c41b
callq 0x43f0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x1487(%rip), %rsi      # 0x1cfa3
callq 0x43f0
movq %rax, %rdi
leaq 0x143a(%rip), %rsi      # 0x1cf65
callq 0x43f0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
callq 0x42e0
movq %rax, %rdi
leaq 0x145d(%rip), %rsi      # 0x1cfa8
callq 0x43f0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
divss -0x1c(%rbp), %xmm0
movss 0x133a(%rip), %xmm1     # 0x1cea4
mulss %xmm1, %xmm0
callq 0x42e0
movq %rax, %rdi
leaq 0x1433(%rip), %rsi      # 0x1cfb0
callq 0x43f0
movq %rax, %rdi
movq 0xb41c(%rip), %rsi      # 0x26fa8
callq 0x4410
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::updateStats(Chrono::ChronoStats&)
void Chrono::updateStats(ChronoStats& stats)
{
	++stats.counter;
	stats.totalTime_ms += stats.lastTime_ms;
	stats.totalSquaredTime_ms2 += stats.lastTime_ms * stats.lastTime_ms;
	stats.averageTime_ms = stats.totalTime_ms / (float)stats.counter;
	stats.stdDevTime_ms = sqrtf(stats.totalSquaredTime_ms2 / (float)stats.counter - stats.averageTime_ms * stats.averageTime_ms);
	if (stats.counter > 1){
		stats.maxTime_ms = max(stats.lastTime_ms, stats.maxTime_ms);
		stats.minTime_ms = min(stats.lastTime_ms, stats.minTime_ms);
	} else{
		stats.maxTime_ms = stats.lastTime_ms;
		stats.minTime_ms = stats.lastTime_ms;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
incl %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movss 0x24(%rax), %xmm0
movss 0x34(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x24(%rax)
movq -0x10(%rbp), %rax
movss 0x28(%rax), %xmm1
movss 0x34(%rax), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
movss 0x24(%rax), %xmm0
movl 0x20(%rax), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movss 0x28(%rax), %xmm1
movl 0x20(%rax), %eax
cvtsi2ss %rax, %xmm0
divss %xmm0, %xmm1
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x46f0
movq -0x10(%rbp), %rax
movss %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jbe 0x1bca2
movq -0x10(%rbp), %rdi
addq $0x34, %rdi
movq -0x10(%rbp), %rsi
addq $0x3c, %rsi
callq 0x1bd70
movss (%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movq -0x10(%rbp), %rdi
addq $0x34, %rdi
movq -0x10(%rbp), %rsi
addq $0x38, %rsi
callq 0x1bdb0
movss (%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x38(%rax)
jmp 0x1bcc6
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x38(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::FreqFilenames::FreqFilenames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
Throttle::FreqFilenames::FreqFilenames(
	const std::string &prefix, const std::string &suffix, unsigned numCores)
	: numCores(numCores), templates(log10(numCores) + 1), prefix_size(prefix.size())
{
	size_t suffix_size = suffix.size();
	for (unsigned i = 0; i != templates.size(); ++i) {
		templates[i].reserve(prefix_size + (i + 1) + suffix_size);
		templates[i] = prefix;
		templates[i].append(i + 1, '#');
		templates[i] += suffix;
		DEBUG_PRINT("[Throttle] Template for length " << i + 1 << ": " << templates[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, (%rax)
addq $0x8, %rax
movq %rax, -0x58(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ed0
incl %eax
movq %rax, -0x50(%rbp)
leaq -0x1d(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x4760
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4780
jmp 0x3d7d
leaq -0x1d(%rbp), %rdi
callq 0x3cf0
movq -0x10(%rbp), %rdi
callq 0x31c0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rdi
callq 0x31c0
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rdi
movl -0x3c(%rbp), %eax
movq %rax, -0x68(%rbp)
addq $0x8, %rdi
callq 0x47f0
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
je 0x3ebb
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
movl -0x3c(%rbp), %eax
movl %eax, %esi
callq 0x4810
movq %rax, %rdi
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rsi
movl -0x3c(%rbp), %eax
incl %eax
addq %rax, %rsi
movq -0x38(%rbp), %rax
addq %rax, %rsi
callq 0x33a0
jmp 0x3e05
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x8, %rdi
movl -0x3c(%rbp), %eax
movl %eax, %esi
callq 0x4810
movq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x3030
jmp 0x3e2d
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
movl -0x3c(%rbp), %eax
movl %eax, %esi
callq 0x4810
movq %rax, %rdi
movl -0x3c(%rbp), %eax
incl %eax
movl %eax, %esi
movl $0x23, %edx
callq 0x3290
jmp 0x3e55
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
addq $0x8, %rdi
movl -0x3c(%rbp), %eax
movl %eax, %esi
callq 0x4810
movq -0x78(%rbp), %rsi
movq %rax, %rdi
callq 0x3330
jmp 0x3e7d
jmp 0x3e7f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3dae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x3cf0
jmp 0x3ec4
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3ac0
jmp 0x3ec4
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x3420
nopl (%rax)
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: log10(unsigned int)
static unsigned log10(unsigned x)
{
	// Not the fastest implementation, but we don't expect very large numbers.
	unsigned log = 0;
	while ((x /= 10) != 0)
		++log;
	return log;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
je 0x3efd
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3ede
movl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::FreqFilenames::operator[](unsigned int) const
const char *Throttle::FreqFilenames::operator[](unsigned core) const
{
	unsigned bucket = log10(core);
	std::string &ret = templates[bucket];
	unsigned print = core;
	do {
		ret[prefix_size + bucket] = '0' + char(print % 10);
		print /= 10;
	} while (bucket--);
	DEBUG_PRINT("[Throttle] Filename for core " << core << ": " << ret);
	return ret.c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %edi
callq 0x3ed0
movq -0x28(%rbp), %rdi
movl %eax, -0x10(%rbp)
addq $0x8, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0x4810
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movsbl %cl, %ecx
addl $0x30, %ecx
movb %cl, -0x29(%rbp)
movq -0x18(%rbp), %rdi
movq 0x20(%rax), %rsi
movl -0x10(%rbp), %eax
addq %rax, %rsi
callq 0x3490
movb -0x29(%rbp), %cl
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x1c(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
jne 0x3f4e
movq -0x18(%rbp), %rdi
callq 0x30e0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::operator()()
void Throttle::operator()()
{
	// Look if there is new input in the pipe
	queue.update();

	if (override_freq) {
		if (freq != override_freq) {
			freq = override_freq;
			writeFreq();
		}
	}
	else
		adjust();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x78, %rdi
callq 0x7e40
movq -0x10(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x442d
movq -0x10(%rbp), %rcx
movl 0x68(%rcx), %eax
cmpl 0x88(%rcx), %eax
je 0x442b
movq -0x10(%rbp), %rdi
movl 0x88(%rdi), %eax
movl %eax, 0x68(%rdi)
callq 0x4440
jmp 0x4436
movq -0x10(%rbp), %rdi
callq 0x4520
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::writeFreq() const
void Throttle::writeFreq() const
{
	DEBUG_PRINT("[Throttle] New frequency: " << (float)freq/1000 << " MHz");

	// loop over the files, write the frequency in each
       for (unsigned core = 0; core != freq_fn.size(); ++core) {
		std::ofstream freq_file(freq_fn[core]);
		freq_file << freq;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x228(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x228(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x22c(%rbp)
addq $0x20, %rdi
callq 0x4c50
movl %eax, %ecx
movl -0x22c(%rbp), %eax
cmpl %ecx, %eax
je 0x450a
movq -0x228(%rbp), %rdi
addq $0x20, %rdi
movl -0xc(%rbp), %esi
callq 0x3f10
movq %rax, %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
movl $0x10, %edx
callq 0x32b0
movq -0x228(%rbp), %rax
movq -0x238(%rbp), %rdi
movl 0x68(%rax), %esi
callq 0x3410
jmp 0x44d0
leaq -0x210(%rbp), %rdi
callq 0x3370
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x3370
jmp 0x4513
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x218(%rbp), %rdi
callq 0x3420
nop
// File: aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::adjust()
void Throttle::adjust()
{
	int temp = readTemp();
	std::vector<int>::const_iterator new_freq = freqs.end();

	DEBUG_PRINT("[Throttle] Temperature: " << (float)temp/1000 << "°C");

	// slowly reset stabilize counter
	if (stabilize > 0) --stabilize;
	if (stabilize < 0) ++stabilize;

	// If the temperature exceeds a threshold, find the next best frequency.
	if (temp > temp_max && stabilize >= 0) {
		new_freq = std::lower_bound(freqs.begin(), freqs.end(), freq);
		if (new_freq == freqs.begin())
			return;     // There is nothing we can do.
		else
			--new_freq;
		stabilize = -wait_after_adjust;
	}
	if (temp < temp_min && stabilize <= 0) {
		new_freq = std::upper_bound(freqs.begin(), freqs.end(), freq);
		stabilize = wait_after_adjust;
	}

	// Have we found one? Then adjust.
	if (new_freq != freqs.end()) {
		freq = *new_freq;
		writeFreq();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x46d0
movq -0x60(%rbp), %rdi
movl %eax, -0xc(%rbp)
addq $0x50, %rdi
callq 0x4a90
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x18(%rbp)
cmpl $0x0, 0x70(%rax)
jle 0x4567
movq -0x60(%rbp), %rax
movl 0x70(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x70(%rax)
movq -0x60(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jge 0x457e
movq -0x60(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
movq -0x60(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x48(%rcx), %eax
jle 0x461d
movq -0x60(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jl 0x461d
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
callq 0x4b10
movq -0x60(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x50, %rdi
callq 0x4a90
movq -0x60(%rbp), %rdx
movq %rax, -0x30(%rbp)
addq $0x68, %rdx
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4ac0
movq -0x60(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x50, %rdi
callq 0x4b10
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4b40
testb $0x1, %al
jne 0x4603
jmp 0x4608
jmp 0x46be
leaq -0x18(%rbp), %rdi
callq 0x4b80
movq -0x60(%rbp), %rax
xorl %ecx, %ecx
subl 0x6c(%rax), %ecx
movl %ecx, 0x70(%rax)
movq -0x60(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4c(%rcx), %eax
jge 0x4683
movq -0x60(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jg 0x4683
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
callq 0x4b10
movq -0x60(%rbp), %rdi
movq %rax, -0x48(%rbp)
addq $0x50, %rdi
callq 0x4a90
movq -0x60(%rbp), %rdx
movq %rax, -0x50(%rbp)
addq $0x68, %rdx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4ba0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x6c(%rax), %ecx
movl %ecx, 0x70(%rax)
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
callq 0x4a90
movq %rax, -0x58(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4bf0
testb $0x1, %al
jne 0x46a7
jmp 0x46be
leaq -0x18(%rbp), %rdi
callq 0x4c30
movq -0x60(%rbp), %rdi
movl (%rax), %eax
movl %eax, 0x68(%rdi)
callq 0x4440
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: aaronpuchert[P]throttle/src/throttle.hpp
// Function: Conf::Parser<std::vector<int, std::allocator<int>>>::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<T> Conf::Parser<std::vector<T>>::parse(const std::string &str)
{
	std::istringstream stream(str);

	std::vector<T> ret;
	T cur;
	while (stream >> cur)
		ret.push_back(cur);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x1b0(%rbp)
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x190(%rbp), %rdi
movl $0x8, %edx
callq 0x33f0
movq -0x1b0(%rbp), %rdi
movb $0x0, -0x191(%rbp)
callq 0x5730
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3180
movq %rax, -0x1c0(%rbp)
jmp 0x5678
movq -0x1c0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3310
movb %al, -0x1c1(%rbp)
jmp 0x5696
movb -0x1c1(%rbp), %al
testb $0x1, %al
jne 0x56a2
jmp 0x56e5
movq -0x1b0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x5750
jmp 0x56b7
jmp 0x565c
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
callq 0x3890
leaq -0x190(%rbp), %rdi
callq 0x3120
jmp 0x571d
movb $0x1, -0x191(%rbp)
testb $0x1, -0x191(%rbp)
jne 0x5701
movq -0x1b0(%rbp), %rdi
callq 0x3890
leaq -0x190(%rbp), %rdi
callq 0x3120
movq -0x1b8(%rbp), %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x1a0(%rbp), %rdi
callq 0x3420
nopl (%rax)
// File: aaronpuchert[P]throttle/src/conf.cpp
// Function: Conf::GetAttr[abi:cxx11](char const*) const
const std::string& Conf::GetAttr(const char *name) const
{
	auto it = std::find_if(attributes.begin(), attributes.end(),
		[name](const std::pair<std::string, std::string>& p)
		{
			return p.first == name;
		});

	if (it != attributes.end())
		return it->second;
	else
		throw std::runtime_error(std::string("No such attribute: ") + name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x86e0
movq -0x98(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x8710
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x7c20
movq -0x98(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x8710
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x8740
testb $0x1, %al
jne 0x7b07
jmp 0x7b1d
leaq -0x18(%rbp), %rdi
callq 0x8780
addq $0x20, %rax
addq $0xb0, %rsp
popq %rbp
retq
movb $0x1, -0x8d(%rbp)
movl $0x10, %edi
callq 0x3140
movq %rax, -0xa8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x3430
movq -0xa0(%rbp), %rdx
leaq 0x25a5(%rip), %rsi      # 0xa0f8
leaq -0x78(%rbp), %rdi
callq 0x85a0
jmp 0x7b5e
movq -0x10(%rbp), %rdx
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x8550
jmp 0x7b71
movq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x33c0
jmp 0x7b83
movq -0xa8(%rbp), %rdi
movb $0x0, -0x8d(%rbp)
movq 0x7458(%rip), %rsi      # 0xeff0
movq 0x7429(%rip), %rdx      # 0xefc8
callq 0x3400
jmp 0x7c20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7bf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7be9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3190
leaq -0x78(%rbp), %rdi
callq 0x3190
leaq -0x79(%rbp), %rdi
callq 0x32a0
testb $0x1, -0x8d(%rbp)
jne 0x7c06
jmp 0x7c12
movq -0xa8(%rbp), %rdi
callq 0x31e0
jmp 0x7c14
movq -0x88(%rbp), %rdi
callq 0x3420
// File: aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::CommQueue(Throttle*, char const*)
CommQueue::CommQueue(Throttle *parent, const char *pipe_fn) : Throt(parent)
{
	// Open the command pipe
	comm_file = open(pipe_fn, O_RDONLY | O_NONBLOCK);

	if (comm_file < 0)
		throw std::runtime_error(std::string("Couldn't open command pipe '") + pipe_fn + '\'');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movl $0x800, %esi            # imm = 0x800
movb $0x0, %al
callq 0x31f0
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x0, 0x8(%rax)
jge 0x7dfa
movb $0x1, -0x8d(%rbp)
movl $0x10, %edi
callq 0x3140
movq %rax, -0xa8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x3430
movq -0xa0(%rbp), %rdx
leaq 0x2407(%rip), %rsi      # 0xa10c
leaq -0x78(%rbp), %rdi
callq 0x85a0
jmp 0x7d10
movq -0x18(%rbp), %rdx
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x8550
jmp 0x7d23
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x27, %edx
callq 0x8500
jmp 0x7d37
movq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x33c0
jmp 0x7d49
movq -0xa8(%rbp), %rdi
movb $0x0, -0x8d(%rbp)
movq 0x7292(%rip), %rsi      # 0xeff0
movq 0x7263(%rip), %rdx      # 0xefc8
callq 0x3400
jmp 0x7e0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7dd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7dcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7dc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3190
leaq -0x58(%rbp), %rdi
callq 0x3190
leaq -0x78(%rbp), %rdi
callq 0x3190
leaq -0x79(%rbp), %rdi
callq 0x32a0
testb $0x1, -0x8d(%rbp)
jne 0x7dec
jmp 0x7df8
movq -0xa8(%rbp), %rdi
callq 0x31e0
jmp 0x7e03
addq $0xb0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x3420
nop
// File: aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::update()
void CommQueue::update()
{
	char buf[LINE_LENGTH];
	ssize_t ret;
	while (true) {
		ret = read(comm_file, buf, LINE_LENGTH-1);
		if (ret <= 0)
			break;
		processCommand(std::string(buf, ret));
	}

	// This should be because there's nothing more to read
	if (ret != 0 && errno != EAGAIN)
		throw std::runtime_error("Read error while checking command pipe");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0x458(%rbp), %rax
movl 0x8(%rax), %edi
leaq -0x410(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x3350
movq %rax, -0x418(%rbp)
cmpq $0x0, -0x418(%rbp)
jg 0x7e8b
jmp 0x7f41
movq -0x418(%rbp), %rax
movq %rax, -0x468(%rbp)
leaq -0x439(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x3430
movq -0x468(%rbp), %rdx
movq -0x460(%rbp), %rcx
leaq -0x438(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x32e0
jmp 0x7ecf
movq -0x458(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x7fd0
jmp 0x7ee4
leaq -0x438(%rbp), %rdi
callq 0x3190
leaq -0x439(%rbp), %rdi
callq 0x32a0
jmp 0x7e5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x448(%rbp)
movl %eax, -0x44c(%rbp)
jmp 0x7f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x448(%rbp)
movl %eax, -0x44c(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x3190
leaq -0x439(%rbp), %rdi
callq 0x32a0
jmp 0x7fbd
cmpq $0x0, -0x418(%rbp)
je 0x7fb4
callq 0x3040
cmpl $0xb, (%rax)
je 0x7fb4
movl $0x10, %edi
callq 0x3140
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x470(%rbp)
leaq 0x21b6(%rip), %rsi      # 0xa129
callq 0x30c0
jmp 0x7f7a
movq -0x470(%rbp), %rdi
movq 0x7068(%rip), %rsi      # 0xeff0
movq 0x7039(%rip), %rdx      # 0xefc8
callq 0x3400
movq -0x470(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x448(%rbp)
movl %eax, -0x44c(%rbp)
callq 0x31e0
jmp 0x7fbd
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
movq -0x448(%rbp), %rdi
callq 0x3420
nopl (%rax)