LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/SoftwearDevelopment[P]xattr_syscall_wrapper/setxattr.cc
// Function: main
int main(int argc, char** argv) {
  if (argc != 3) {
    std::cerr << "USAGE: setxattr [FILE] [XATTR] < data" << std::endl;
    return 1;
  }

  auto &file = argv[1], &attr = argv[2];
  std::vector<char> payload;

  // load the data

  size_t have = 0, alloc = 1024*4; // One page
  while (true) {
    payload.resize(alloc);
    std::cin.read(payload.data()+have, payload.size() - have);

    alloc *=2;
    have += std::cin.gcount();

    if (std::cin.eof()) { // success
      payload.resize(have);
      break;

    } else if (alloc > max_buf_size) { // to large
      std::cerr << "read error: data larger than " << max_buf_size << " bytes. "
                << "Refusing to allocate more.";
      return 1;
    }
  }

  // return the data
  int r = setxattr(file, attr, payload.data(), payload.size(), 0);
  if (r == -1)
    fatal_errno(file, "setxattr");

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x3, %edi
jne 0x13b4
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r15)
movl $0x1000, %r12d          # imm = 0x1000
xorl %r14d, %r14d
movq 0x2cb1(%rip), %r13      # 0x3fd8
movq %r15, %rdi
movq %r12, %rsi
callq 0x14b2
movq 0x10(%rsp), %rsi
addq %r14, %rsi
movq 0x18(%rsp), %rdx
subq %rsi, %rdx
movq %r13, %rdi
callq 0x1160
movq (%r13), %rax
movq -0x18(%rax), %rax
addq 0x8(%r13), %r14
testb $0x2, 0x20(%r13,%rax)
jne 0x13d7
leaq (%r12,%r12), %rax
cmpq $0x3200001, %r12        # imm = 0x3200001
movq %rax, %r12
jb 0x1327
movq 0x2c7b(%rip), %rdi      # 0x3ff0
leaq 0xcae(%rip), %rsi       # 0x202a
callq 0x1120
movl $0x6400000, %esi        # imm = 0x6400000
movq %rax, %rdi
callq 0x10d0
leaq 0xcb3(%rip), %rsi       # 0x2048
movq %rax, %rdi
callq 0x1120
leaq 0xcad(%rip), %rsi       # 0x2051
movq %rax, %rdi
callq 0x1120
pushq $0x1
popq %rbp
jmp 0x145f
movq 0x2c35(%rip), %rdi      # 0x3ff0
leaq 0xc42(%rip), %rsi       # 0x2004
callq 0x1120
movq %rax, %rdi
callq 0x10a0
pushq $0x1
popq %rbp
jmp 0x1469
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x14b2
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
subq %rdx, %rcx
xorl %ebp, %ebp
xorl %r8d, %r8d
callq 0x1170
cmpl $-0x1, %eax
jne 0x145f
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x154a
leaq 0xc4a(%rip), %rsi       # 0x206c
leaq 0x28(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x154a
callq 0x1030
movslq (%rax), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x1
popq %rcx
callq 0x14de
leaq 0x28(%rsp), %rdi
callq 0x1090
leaq 0x48(%rsp), %rdi
callq 0x1090
leaq 0x10(%rsp), %rdi
callq 0x1590
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1090
jmp 0x148c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x1090
jmp 0x149f
jmp 0x149c
jmp 0x149c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1590
movq %rbx, %rdi
callq 0x11a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: main
int main (int argc, char *argv[]) {
    /* check for valid command line arguments */
    if (argc != 2)
        stateProperUsageAndDie(0);


    /* convert the URL to a string (to make parsing easier) */
   	string URL(argv[1]);
	parseURL(URL); // then parse it

    /*set up a TCP connection to the robot*/
    setupRobotConnection();

    initializeProxyServer();
    middlewareMainLoop();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
je 0x2634
xorl %edi, %edi
callq 0x3b6b
movq 0x8(%rbx), %rsi
leaq -0x50(%rbp), %rbx
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x33e8
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x2280
leaq -0x30(%rbp), %rdi
callq 0x2697
leaq -0x30(%rbp), %rdi
callq 0x2398
callq 0x2760
callq 0x27e1
callq 0x285c
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2398
jmp 0x2686
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: parseURL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void parseURL(string URL) {
	size_t serverName_endIndex;

	// basic checks for valid URL
   	if (URL.length() < HTTP_URL_SECTION + 1) // check if the url is long enough
	    dieWithError((char *)"parseURL() failed: URL is too short");
	else if (URL.substr(0, HTTP_URL_SECTION).compare("http://") != 0) // check if the url starts with "http://"
	    dieWithError((char *)"parseURL() failed: URL does not start with \"http://\"");

    serverName_endIndex = URL.find_first_of("/", HTTP_URL_SECTION);

    if (serverName_endIndex == URL.npos) { // no path 
        SERVER_NAME = URL.substr(HTTP_URL_SECTION, URL.length() - HTTP_URL_SECTION);
    }
    else {
        SERVER_NAME = URL.substr(HTTP_URL_SECTION, serverName_endIndex - HTTP_URL_SECTION);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x7, 0x8(%rdi)
ja 0x26b7
leaq 0x19f4(%rip), %rdi      # 0x40a9
jmp 0x26f1
leaq -0x38(%rbp), %r14
pushq $0x7
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2200
leaq 0x19fb(%rip), %rsi      # 0x40cd
movq %r14, %rdi
callq 0x2090
movl %eax, %r15d
movq %r14, %rdi
callq 0x2398
testl %r15d, %r15d
je 0x26f6
leaq 0x19e4(%rip), %rdi      # 0x40d5
callq 0x3b44
leaq 0x19d6(%rip), %rsi      # 0x40d3
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x2100
cmpq $-0x1, %rax
je 0x2724
addq $-0x7, %rax
leaq -0x38(%rbp), %r14
pushq $0x7
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
jmp 0x2739
movq 0x8(%rbx), %rcx
addq $-0x7, %rcx
leaq -0x38(%rbp), %r14
pushq $0x7
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2200
leaq 0x4ab3(%rip), %rdi      # 0x71f8
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x2398
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: setupRobotConnection()
void setupRobotConnection() {
    struct hostent *thehost; /* Hostent from gethostbyname() */
   
    /* Create a TCP socket for communication with the robot */
    if ((ROBOT_SOCKET = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
        dieWithError((char *)"socket() failed");

    /* Construct the server address structure */
    memset(&ROBOT_ADDR, 0, sizeof(ROBOT_ADDR));    /* Zero out structure */
    ROBOT_ADDR.sin_family = AF_INET;                 /* Internet addr family */
    ROBOT_ADDR.sin_addr.s_addr = inet_addr(SERVER_NAME.c_str()); /* Server IP address */
    ROBOT_ADDR.sin_port = htons(ROBOT_PORT);     /* Server port */

    /* If user gave a non dotted decimal address, we need to resolve it  */
    if ((int)ROBOT_ADDR.sin_addr.s_addr == -1) {
        thehost = gethostbyname(SERVER_NAME.c_str());
        ROBOT_ADDR.sin_addr.s_addr = *((unsigned long *) thehost->h_addr_list[0]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
callq 0x2070
movl %eax, 0x4b80(%rip)      # 0x72f8
testl %eax, %eax
jns 0x2788
leaq 0x18fa(%rip), %rdi      # 0x407d
callq 0x3b44
xorps %xmm0, %xmm0
movups %xmm0, 0x4b6e(%rip)     # 0x7300
movw $0x2, 0x4b65(%rip)      # 0x7300
movq 0x4a56(%rip), %rdi      # 0x71f8
callq 0x21e0
movl %eax, 0x4b57(%rip)      # 0x7304
movzwl 0x4a24(%rip), %ecx      # 0x71d8
rolw $0x8, %cx
movw %cx, 0x4b43(%rip)       # 0x7302
cmpl $-0x1, %eax
jne 0x27df
movq 0x4a2d(%rip), %rdi      # 0x71f8
callq 0x2220
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x4b25(%rip)      # 0x7304
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: initializeProxyServer()
void initializeProxyServer() {
    /* Create socket for sending/receiving datagrams */
    if ((PROXY_SOCKET = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
        dieWithError((char *)"socket() failed");

    /* Construct local address structure */
    memset(&PROXY_ADDR, 0, sizeof(PROXY_ADDR));   /* Zero out structure */
    PROXY_ADDR.sin_family = AF_INET;                /* Internet address family */
    PROXY_ADDR.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */
    PROXY_ADDR.sin_port = htons(PROXY_PORT);      /* Local port */

    /* Bind to the local address */
    if (bind(PROXY_SOCKET, (struct sockaddr *) &PROXY_ADDR, sizeof(PROXY_ADDR)) < 0)
        dieWithError((char *)"bind() failed");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x2
popq %rdi
pushq $0x11
popq %rdx
movl %edi, %esi
callq 0x2070
movl %eax, 0x4b04(%rip)      # 0x72fc
testl %eax, %eax
jns 0x280e
leaq 0x187a(%rip), %rdi      # 0x407d
callq 0x3b44
movl 0x4aee(%rip), %eax      # 0x72fc
andq $0x0, 0x4b02(%rip)      # 0x7318
leaq 0x4af3(%rip), %rsi      # 0x7310
movw $0x2, 0x4aea(%rip)      # 0x7310
andl $0x0, 0x4ae7(%rip)      # 0x7314
movzwl 0x49a6(%rip), %ecx      # 0x71da
rolw $0x8, %cx
movw %cx, 0x4ad3(%rip)       # 0x7312
pushq $0x10
popq %rdx
movl %eax, %edi
callq 0x2050
testl %eax, %eax
js 0x284f
popq %rbp
retq
leaq 0x1837(%rip), %rdi      # 0x408d
popq %rbp
jmp 0x3b44
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: middlewareMainLoop()
void middlewareMainLoop() {
    while(true) {
        getCommandFromClient();
        buildRequestHeader();
        setupRobotConnection();
        sendRobotTheCommand();
        getHTTPResponse(); // get a response from the robot
        sendRobotResponseToClient();
        cleanup();
        close(ROBOT_SOCKET); // close the connection with the robot
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x2890
callq 0x2905
callq 0x2760
callq 0x29d0
callq 0x2a2f
callq 0x2aec
callq 0x2c58
movl 0x4a6f(%rip), %edi      # 0x72f8
callq 0x2370
jmp 0x2860
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: getCommandFromClient()
void getCommandFromClient() {
    int messageLen;
    unsigned int clientAddrLen = sizeof(CLIENT_ADDR);
    char clientRequestBuffer[1000];
    char *command;

    bzero(clientRequestBuffer, 1000);

    if ((messageLen = recvfrom(PROXY_SOCKET, clientRequestBuffer, RECV_BUFF_SIZE, 
        0, (struct sockaddr *) &CLIENT_ADDR, &clientAddrLen)) < 0)
        dieWithError((char *)"recv() failed");
    
    //parse out header
    
    command = clientRequestBuffer;
    detectCommand(command);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x3f0, %rsp            # imm = 0x3F0
leaq -0x14(%rbp), %rbx
movl $0x10, (%rbx)
leaq -0x400(%rbp), %r14
movl $0x3e8, %edx            # imm = 0x3E8
movq %r14, %rdi
xorl %esi, %esi
callq 0x2120
movl 0x4a38(%rip), %edi      # 0x72fc
leaq 0x4a55(%rip), %r8       # 0x7320
movl $0xf4240, %edx          # imm = 0xF4240
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x2150
testl %eax, %eax
jns 0x28ed
leaq 0x1787(%rip), %rdi      # 0x406f
callq 0x3b44
leaq -0x400(%rbp), %rdi
callq 0x2c83
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: buildRequestHeader()
void buildRequestHeader() {
    REQUEST_MESSAGE += FILE_PATH;
    REQUEST_MESSAGE += " HTTP/1.1\r\n";
    REQUEST_MESSAGE += "Host: " + SERVER_NAME + "\r\n";
    REQUEST_MESSAGE += "Connection: close\r\n";
    REQUEST_MESSAGE += "\r\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq 0x4963(%rip), %rbx      # 0x7278
leaq 0x48fc(%rip), %rsi      # 0x7218
movq %rbx, %rdi
callq 0x2360
leaq 0x17df(%rip), %rsi      # 0x410a
movq %rbx, %rdi
callq 0x2340
leaq 0x17dc(%rip), %rsi      # 0x4116
leaq 0x48b7(%rip), %rdx      # 0x71f8
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x352a
leaq 0x17df(%rip), %rdx      # 0x4133
leaq -0x28(%rbp), %rdi
movq %rbx, %rsi
callq 0x3501
leaq 0x4911(%rip), %rdi      # 0x7278
leaq -0x28(%rbp), %rsi
callq 0x2360
leaq -0x28(%rbp), %rdi
callq 0x2398
leaq -0x48(%rbp), %rdi
callq 0x2398
leaq 0x48ef(%rip), %rbx      # 0x7278
leaq 0x178d(%rip), %rsi      # 0x411d
movq %rbx, %rdi
callq 0x2340
leaq 0x1794(%rip), %rsi      # 0x4133
movq %rbx, %rdi
callq 0x2340
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2398
jmp 0x29bf
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: sendRobotTheCommand()
void sendRobotTheCommand() {
    /* Establish the connection to the robot */
    if (connect(ROBOT_SOCKET, (struct sockaddr *) &ROBOT_ADDR, sizeof(ROBOT_ADDR)) < 0)
        dieWithError((char *)"connect() failed");

    /* Send the string to the robot */
    if (send(ROBOT_SOCKET, REQUEST_MESSAGE.c_str(), REQUEST_MESSAGE.length(), 0) != (int)REQUEST_MESSAGE.length())
        dieWithError((char *)"send() sent a different number of bytes than expected");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x491e(%rip), %edi      # 0x72f8
leaq 0x491f(%rip), %rsi      # 0x7300
pushq $0x10
popq %rdx
callq 0x2180
testl %eax, %eax
jns 0x29f9
leaq 0x1634(%rip), %rdi      # 0x4028
callq 0x3b44
movl 0x48f9(%rip), %edi      # 0x72f8
movq 0x4872(%rip), %rsi      # 0x7278
movq 0x4873(%rip), %rdx      # 0x7280
xorl %ecx, %ecx
callq 0x20f0
movslq 0x4865(%rip), %rcx      # 0x7280
cmpq %rcx, %rax
jne 0x2a22
popq %rbp
retq
leaq 0x1610(%rip), %rdi      # 0x4039
popq %rbp
jmp 0x3b44
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: getHTTPResponse()
void getHTTPResponse() {
    char *httpRequestBuffer = (char *) malloc(RECV_BUFF_SIZE * sizeof(char));
    int messageLen;

    if ((messageLen = recv(ROBOT_SOCKET, httpRequestBuffer, RECV_BUFF_SIZE, 0)) < 0)
        dieWithError((char *)"recv() failed");
       
     int total_bytes_recieved = 0;

     if (messageLen < 200)  {
         if ((messageLen = recv(ROBOT_SOCKET, httpRequestBuffer, RECV_BUFF_SIZE, 0)) < 0)
             dieWithError((char *)"recv() failed");

         total_bytes_recieved += messageLen;
     }
    
    cout << messageLen << endl;

    /* build the HTTP_RESPONSE as a string */
    for (int i = 0; i < messageLen; ++i) {
        HTTP_RESPONSE += httpRequestBuffer[i];
    }

    //cout << "WE GOT HERE!!\nHTTP_RESPONSE:\n" << messageLen << "\n\n" << HTTP_RESPONSE << endl;

    // int content_length = getContentLength();
    // int start_of_content = getStartOfContent();

    // cout << "Content Length: " << content_length <<
    // "\nStart of Content: " << start_of_content << "\n\n" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x2260
movq %rax, %rbx
movl 0x48ab(%rip), %edi      # 0x72f8
movl $0xf4240, %edx          # imm = 0xF4240
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x20a0
movq %rax, %r14
testl %r14d, %r14d
js 0x2a6f
cmpl $0xc7, %r14d
jbe 0x2a7b
jmp 0x2aa4
leaq 0x15f9(%rip), %rdi      # 0x406f
callq 0x3b44
movl 0x4877(%rip), %edi      # 0x72f8
movl $0xf4240, %edx          # imm = 0xF4240
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x20a0
movq %rax, %r14
testl %r14d, %r14d
jns 0x2aa4
leaq 0x15d0(%rip), %rdi      # 0x406f
callq 0x3b44
movq 0x4525(%rip), %rdi      # 0x6fd0
movl %r14d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20e0
xorl %r12d, %r12d
testl %r14d, %r14d
cmovlel %r12d, %r14d
leaq 0x478c(%rip), %r15      # 0x7258
cmpq %r12, %r14
je 0x2ae3
movsbl (%rbx,%r12), %esi
movq %r15, %rdi
callq 0x2190
incq %r12
jmp 0x2acc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: sendRobotResponseToClient()
void sendRobotResponseToClient() {
    //cout << HTTP_RESPONSE << endl; // test - remove later
    vector<string> fragmented_response;

    /* first remove the header from the HTTP response */
    removeHeaderFromHTTPResponse();

    /* then fragement the response into 1000 Byte chunks */
    if (HTTP_RESPONSE.length() > UDP_PACKET_MAX_SIZE - 12) // subtract 12 for header
        fragmented_response = fragmentHTTPResponse();
    else // only one UDP packet needed
        fragmented_response.push_back(HTTP_RESPONSE);

    /* add the header to the fragments of the response */
    fragmented_response = addHeaderToResponseToClient(fragmented_response);

    // cout << HTTP_RESPONSE.length() << endl;

    // cout << "\n\nNEW MESSASGE:" << endl;

    // for (int i = 0; i < (int)fragmented_response.size(); i++) {
    //     cout << fragmented_response.at(i) << "\n" << endl;
    // }

    for (int i = 0; i < fragmented_response.size(); ++i) {
        cout << fragmented_response.at(i) << "\n" << endl;
        sendto(PROXY_SOCKET, fragmented_response.at(i).data(), fragmented_response.at(i).length(),
               0, (struct sockaddr *) &CLIENT_ADDR, sizeof(CLIENT_ADDR));
    }

    // char * hello_world = "hello world";
    // sendto(PROXY_SOCKET, hello_world, strlen(hello_world), 0, (struct sockaddr *) &CLIENT_ADDR, sizeof(CLIENT_ADDR));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
andq $0x0, -0x30(%rbp)
callq 0x3119
cmpq $0x3dd, 0x4747(%rip) # imm = 0x3DD
jb 0x2b3e
leaq -0x70(%rbp), %rdi
callq 0x3168
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rbx
movq %rbx, %rsi
callq 0x3720
movq %rbx, %rdi
callq 0x3424
jmp 0x2b4e
leaq 0x4713(%rip), %rsi      # 0x7258
leaq -0x40(%rbp), %rdi
callq 0x3450
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x348c
leaq -0x70(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3215
leaq -0x40(%rbp), %rbx
leaq -0x70(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3720
movq %r14, %rdi
callq 0x3424
leaq -0x58(%rbp), %rdi
callq 0x3424
xorl %r14d, %r14d
pushq $0x10
popq %r15
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x2c18
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34e0
movq 0x441a(%rip), %rdi      # 0x6fd0
movq %rax, %rsi
callq 0x21b0
movq %rax, %rdi
leaq 0x156c(%rip), %rsi      # 0x4134
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movl 0x4720(%rip), %r12d     # 0x72fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34e0
movq (%rax), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34e0
movq 0x8(%rax), %rdx
movl %r12d, %edi
movq %r13, %rsi
xorl %ecx, %ecx
leaq 0x4718(%rip), %r8       # 0x7320
movl %r15d, %r9d
callq 0x2030
incq %r14
jmp 0x2b93
leaq -0x40(%rbp), %rdi
callq 0x3424
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c44
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3424
jmp 0x2c47
jmp 0x2c44
jmp 0x2c44
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3424
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: fragmentHTTPResponse[abi:cxx11]()
vector<string> fragmentHTTPResponse() {
    size_t index;
    size_t size;
    vector<string> fragmented_response;

    /* split the HTTP response into 1000 byte chunks */
    for (index = 0; index < HTTP_RESPONSE.length(); index += UDP_PACKET_MAX_SIZE - 12) {
        /* get the size of the fragment */
        if ((HTTP_RESPONSE.length() - index) > UDP_PACKET_MAX_SIZE - 12)
            size = UDP_PACKET_MAX_SIZE - 12;
        else
            size = HTTP_RESPONSE.length() - index;

        fragmented_response.push_back(HTTP_RESPONSE.substr(index, size));
    }

    return fragmented_response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
xorl %r13d, %r13d
movl $0x3dc, %r14d           # imm = 0x3DC
leaq -0x48(%rbp), %r15
xorl %r12d, %r12d
movq 0x40c2(%rip), %rcx      # 0x7260
cmpq %rcx, %r12
jae 0x31e2
addq %r13, %rcx
cmpq %r14, %rcx
cmovaeq %r14, %rcx
movq %r15, %rdi
leaq 0x40a1(%rip), %rsi      # 0x7258
movq %r12, %rdx
callq 0x2200
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a40
movq %r15, %rdi
callq 0x2398
addq $0x3dc, %r12            # imm = 0x3DC
addq $-0x3dc, %r13           # imm = 0xFC24
jmp 0x3197
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x2398
jmp 0x3205
movq %rax, %r14
movq %rbx, %rdi
callq 0x3424
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: addHeaderToResponseToClient(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
vector<string> addHeaderToResponseToClient(vector<string> fragmented_response) {
    uint32_t number_of_messages = fragmented_response.size();
    uint32_t sequence_number = 0;
    string body;
    int i;

    number_of_messages = fragmented_response.size();

    /* add header to each of the fragmented responses */
    for (i = 0; i < (int) number_of_messages; i++) {
        sequence_number = i;
        int body_length = fragmented_response[i].length();
        cout << "Body length: " << body_length << endl;
        char * body = (char *) calloc(body_length + 12, sizeof(char));
        memcpy(body, &REQUEST_ID, 4);
        memcpy(body + 4, &number_of_messages, 4);
        memcpy(body + 8, &sequence_number, 4);
        memcpy(body + 12, fragmented_response[i].data(), body_length);
        fragmented_response.at(i).assign(body, body_length + 12);
    }

    return fragmented_response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x8(%rsi), %rcx
movq %rsi, -0x30(%rbp)
subq (%rsi), %rcx
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, -0x40(%rbp)
movb $0x0, (%rax)
shrq $0x5, %rcx
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %eax
movq %rcx, -0x48(%rbp)
cmovgl %ecx, %eax
movq %rax, -0x50(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq %r14, -0x50(%rbp)
je 0x330f
movq %rdx, -0x38(%rbp)
movq 0x8(%rax,%rdx), %r15
movq 0x3d4b(%rip), %rdi      # 0x6fd0
leaq 0xe0f(%rip), %rsi       # 0x409b
callq 0x21c0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20e0
leal 0xc(%r15), %eax
movslq %eax, %r12
movq %r12, %rdi
pushq $0x1
popq %rsi
callq 0x2130
movq %rax, %r13
movl 0x3f1d(%rip), %eax      # 0x71dc
movl %eax, (%r13)
movq -0x48(%rbp), %rax
movl %eax, 0x4(%r13)
movl %r14d, 0x8(%r13)
leaq 0xc(%r13), %rdi
movq (%rbx), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx), %rsi
movslq %r15d, %rdx
callq 0x2170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34e0
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2270
incq %r14
movq -0x38(%rbp), %rdx
addq $0x20, %rdx
jmp 0x3264
movq -0x40(%rbp), %rbx
movq %rax, (%rbx)
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
leaq -0x70(%rbp), %rdi
callq 0x2398
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3352
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Middleware.cpp
// Function: convertHeaderInfoToString[abi:cxx11](unsigned int)
string convertHeaderInfoToString(uint32_t header_info) {
    string header_info_string;
    char uint4_chunk;
    int size_of_uint32_t = 4;
    int bits_in_a_byte = 8;

    for (int i = 0; i < size_of_uint32_t; ++i) {
        uint4_chunk = (char) ((header_info << (i * bits_in_a_byte)) >> (3 * bits_in_a_byte));
        header_info_string.push_back(uint4_chunk);
    }

    return header_info_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movl %esi, %r14d
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
cmpl $0x20, %r15d
je 0x33a8
movl %r14d, %esi
movl %r15d, %ecx
shll %cl, %esi
sarl $0x18, %esi
movq %rbx, %rdi
callq 0x2190
addl $0x8, %r15d
jmp 0x3389
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2398
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/ErrorFunctions.cpp
// Function: stateProperUsageAndDie(int)
void stateProperUsageAndDie(int program_id) {
    if (program_id == 0) // middleware
        dieWithError((char *)"Improper Usage - See proper usage below\n"
                             "$> <path_to_executable> <port number>\n");
    else if (program_id == 1) // client
        dieWithError((char *)"Improper Usage - See proper usage below\n"
                             "$> <path_to_executable> <ip of middleware> <port of middleware>"
                             " <ip of robot> <id of robot> <length> <number of"
                             "edges>");
    else
        dieWithError((char *)"Improper Usage");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x1, %edi
je 0x3b84
testl %edi, %edi
jne 0x3b90
leaq 0x789(%rip), %rdi       # 0x4308
callq 0x3b44
leaq 0x7cc(%rip), %rdi       # 0x4357
callq 0x3b44
leaq 0x85e(%rip), %rdi       # 0x43f5
callq 0x3b44
// File: /workspace/github_cpp_makefile_star2_O2/justinpajak[P]Sum_SGX/aes.cpp
// Function: main
int main(int argc, char *argv[]) {

	/* 256 bit key */
    unsigned char *key = (unsigned char *)"01234567890123456789012345678901";

    /* 128 bit IV */
    unsigned char *iv = (unsigned char *)"0123456789012345";

    /* Plaintext and Ciphertext declaration */
    unsigned char *plaintext;
    unsigned char ciphertext[128];
    int ciphertext_len, decryptedtext_len;

    /* Loop through data.txt file and encrypt each float */
    FILE* data = fopen("data.txt", "r+");
    if (!data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    FILE* enc_data = fopen("enc.txt", "w+");
    if (!enc_data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    char buffer[BUFSIZ];
    while (fgets(buffer, BUFSIZ, data)) {
        buffer[16] = '\0';
        plaintext = (unsigned char*)buffer;
        ciphertext_len = encrypt(plaintext, strlen((char*)plaintext), key, iv, ciphertext);
        fwrite((const char*)ciphertext, 128, 1, enc_data);
    };


    // test protocol: Decrypt all of enc.txt to dec.txt 
    /*FILE* dec_data = fopen("dec.txt", "w");
    if (!dec_data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    fseek(enc_data, 0L, SEEK_SET);
    while(fread((char*)ciphertext, 128, 1, enc_data)) {
        unsigned char decryptedtext[128];
        decryptedtext_len = decrypt(ciphertext, ciphertext_len, key, iv, decryptedtext);
        decryptedtext[decryptedtext_len] = '\0';
        fputs((const char*)decryptedtext, dec_data);
        fputs("\n", dec_data);
    }

    fclose(dec_data);*/

    fclose(data);
    fclose(enc_data);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2088, %rsp           # imm = 0x2088
leaq 0xd7f(%rip), %rdi       # 0x2036
leaq 0xd81(%rip), %rsi       # 0x203f
callq 0x1100
testq %rax, %rax
je 0x1378
movq %rax, %rbx
leaq 0xd85(%rip), %rdi       # 0x205b
leaq 0xd86(%rip), %rsi       # 0x2063
callq 0x1100
testq %rax, %rax
je 0x1378
movq %rax, %r14
leaq -0x20b0(%rbp), %r15
leaq -0xb0(%rbp), %r12
pushq $0x1
popq %r13
movq %r15, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdx
callq 0x1130
testq %rax, %rax
je 0x1354
movb $0x0, -0x20a0(%rbp)
movq %r15, %rdi
callq 0x1080
movq %r15, %rdi
movl %eax, %esi
leaq 0xcd4(%rip), %rdx       # 0x2004
leaq 0xcee(%rip), %rcx       # 0x2025
movq %r12, %r8
callq 0x13a7
movl $0x80, %esi
movq %r12, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1150
jmp 0x1300
movq %rbx, %rdi
callq 0x10e0
movq %r14, %rdi
callq 0x10e0
xorl %eax, %eax
addq $0x2088, %rsp           # imm = 0x2088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c59(%rip), %rax      # 0x3fd8
movq (%rax), %rbx
callq 0x1030
movl (%rax), %edi
callq 0x1060
leaq 0xcad(%rip), %rsi       # 0x2042
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
pushq $0x1
popq %rax
jmp 0x1366
// File: /workspace/github_cpp_makefile_star2_O2/juancalaca[P]dotsboxes/DotsEdge.cc
// Function: DotsEdge::Claim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsEdge::Claim(string name)
{
	int claimedBoxes = 0;
	
	this->claimed = true;
	
	if (this->box1->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box1->Claim(name);
		claimedBoxes++;
	}
	
	if (this->box2 != NULL && this->box2->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box2->Claim(name);
		claimedBoxes++;
	}
	
	return claimedBoxes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x10(%rdi)
movq (%rdi), %rdi
callq 0x25c2
xorl %ebp, %ebp
testb %al, %al
je 0x245d
movq 0x4bbd(%rip), %rdi      # 0x6fd0
movq %rbx, %rsi
callq 0x2110
leaq 0x1be2(%rip), %rsi      # 0x4004
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2080
movq (%r14), %r12
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2160
movq %r12, %rdi
movq %r15, %rsi
callq 0x25a2
leaq 0x20(%rsp), %rdi
callq 0x2070
pushq $0x1
popq %rbp
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x24bc
callq 0x25c2
testb %al, %al
je 0x24bc
movq 0x4b5a(%rip), %rdi      # 0x6fd0
movq %rbx, %rsi
callq 0x2110
leaq 0x1b7f(%rip), %rsi      # 0x4004
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2080
movq 0x8(%r14), %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2160
movq %r14, %rdi
movq %r15, %rsi
callq 0x25a2
movq %rsp, %rdi
callq 0x2070
incl %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24cd
movq %rax, %rbx
movq %r15, %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/juancalaca[P]dotsboxes/DotsBoard.cc
// Function: DotsBoard::ClaimEdge(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsBoard::ClaimEdge(int row, int column, int edge_num, string name)
{
	DotsEdge *edge = this->boxes[row][column]->GetEdge(edge_num);
	
	//if that edge is taken return -1
	if (edge->IsClaimed())
	{
		return -1;
	}
	
	int new_claimed =  edge->Claim(name);
	this->claimedBoxes += new_claimed;
	return new_claimed;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rdi, %rbx
movslq %esi, %rax
movq 0x10(%rdi), %rsi
imulq $0x18, %rax, %rax
movslq %edx, %rdx
movq (%rsi,%rax), %rax
movq (%rax,%rdx,8), %rdi
movl %ecx, %esi
callq 0x2574
movq %rax, %r15
movq %rax, %rdi
callq 0x23e4
testb %al, %al
je 0x28c9
pushq $-0x1
popq %rbp
jmp 0x28ef
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2160
movq %r15, %rdi
movq %r12, %rsi
callq 0x23e8
movl %eax, %ebp
movq %rsp, %rdi
callq 0x2070
addl %ebp, 0x8(%rbx)
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/juancalaca[P]dotsboxes/main.cc
// Function: ZedBoard::ZedBoard()
ZedBoard()
	{
		fd = open( "/dev/mem", O_RDWR);
		pBase = (char *) mmap(
				NULL,
				gpio_size,
				PROT_READ | PROT_WRITE,
				MAP_SHARED,
				fd,	
				gpio_address);

		//Check error
		if (pBase == MAP_FAILED)
		{
			cerr << "Mapping I/O memory failed - Did you run with 'sudo'?\n";
			exit(1); // Returns 1 to the operating system; 
		}

	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x896(%rip), %rdi       # 0x427b
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x20d0
movl %eax, 0x8(%rbx)
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
movl $0xff, %esi
movl $0x400d0000, %r9d       # imm = 0x400D0000
movl %eax, %r8d
xorl %edi, %edi
callq 0x21d0
movq %rax, (%rbx)
cmpq $-0x1, %rax
je 0x3a18
popq %rbx
retq
movq 0x35d1(%rip), %rdi      # 0x6ff0
leaq 0x85e(%rip), %rsi       # 0x4284
callq 0x2120
pushq $0x1
popq %rdi
callq 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O2/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: Dijkstra(int, int, float*, int*, float (*) [11])
void Dijkstra(int node_num, int srcidx, float *dist, int *prev, float distans[maxnode_num][maxnode_num])
{
    bool s[maxnode_num];    
    for(int i=1; i<=node_num; ++i)
    {
        dist[i] = distans[srcidx][i];
        s[i] = 0;     
        if(dist[i] == inf_dis)
            prev[i] = 0;
        else
            prev[i] = srcidx;
    }
    dist[srcidx] = 0;
    s[srcidx] = 1;

    for(int i=2; i<=node_num; ++i)
    {
        int tmp = inf_dis;
        int u = srcidx;
        
        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && dist[j]<tmp)
            {
                u = j;            
                tmp = dist[j];
            }
        s[u] = 1;    

        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && distans[u][j]<inf_dis)
            {
                float newdist = dist[u] + distans[u][j];
                if(newdist < dist[j])
                {
                    dist[j] = newdist;
                    prev[j] = u;
                }
            }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %r10d
cmovgl %edi, %r10d
movslq %esi, %r9
imulq $0x2c, %r9, %r11
addq %r8, %r11
addq $0x4, %r11
movss 0x3b0(%rip), %xmm0      # 0x3004
cmpq %rax, %r10
je 0x2c81
movss (%r11,%rax,4), %xmm1
movss %xmm1, 0x4(%rdx,%rax,4)
ucomiss %xmm0, %xmm1
movb $0x0, -0xa(%rsp,%rax)
movl $0x0, %ebx
cmovnel %esi, %ebx
cmovpl %esi, %ebx
movl %ebx, 0x4(%rcx,%rax,4)
incq %rax
jmp 0x2c54
andl $0x0, (%rdx,%r9,4)
movb $0x1, -0xb(%rsp,%r9)
leal 0x1(%rdi), %eax
movl $0x2, %r9d
movabsq $0x1, %r10
cmpl %edi, %r9d
jg 0x2d2a
movl $0x5f5e100, %ebp        # imm = 0x5F5E100
movq %r10, %rbx
movl %esi, %r11d
cmpq %rbx, %rax
je 0x2cd9
cmpb $0x0, -0xb(%rsp,%rbx)
jne 0x2cd4
cvtsi2ss %ebp, %xmm2
movss (%rdx,%rbx,4), %xmm1
ucomiss %xmm1, %xmm2
jbe 0x2cd4
cvttss2si %xmm1, %ebp
movl %ebx, %r11d
incq %rbx
jmp 0x2cb3
movslq %r11d, %rbx
movb $0x1, -0xb(%rsp,%rbx)
imulq $0x2c, %rbx, %r14
addq %r8, %r14
movq %r10, %r15
cmpq %r15, %rax
je 0x2d22
cmpb $0x0, -0xb(%rsp,%r15)
jne 0x2d1d
movss (%r14,%r15,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2d1d
addss (%rdx,%rbx,4), %xmm1
movss (%rdx,%r15,4), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x2d1d
movss %xmm1, (%rdx,%r15,4)
movl %r11d, (%rcx,%r15,4)
incq %r15
jmp 0x2ceb
incl %r9d
jmp 0x2c9f
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: recoverPath(int*, int, int, int*, int*)
void recoverPath(int *prev, int srcidx, int dstidx, int *indextable, int *path)
{
    int que[maxnode_num];
    int tot = 1;
    que[tot] = dstidx;
    tot++;
    int tmp = prev[dstidx];
    while(tmp != srcidx)
    {
        que[tot] = tmp;
        tot++;
        tmp = prev[tmp];
    }
    que[tot] = srcidx;
    int j = 0;
    for(int i=tot; i>=1; --i)
    {
        path[j] = indextable[que[i]];
        j++;
    }
    path[j]=2333;
}

// Assembly:
movl %edx, -0x34(%rsp)
movabsq $0x2, %rax
movslq %edx, %rdx
movl (%rdi,%rdx,4), %edx
cmpl %esi, %edx
je 0x2d52
movl %edx, -0x38(%rsp,%rax,4)
incq %rax
jmp 0x2d3f
movl %esi, -0x38(%rsp,%rax,4)
movq %r8, %rdx
movq %rax, %rdi
movq %rax, %rsi
subq $0x1, %rsi
jb 0x2d78
movslq -0x38(%rsp,%rdi,4), %rdi
movl (%rcx,%rdi,4), %edi
movl %edi, (%rdx)
addq $0x4, %rdx
movq %rsi, %rdi
jmp 0x2d5f
movl $0x91d, (%r8,%rax,4)    # imm = 0x91D
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/point.cpp
// Function: baduk::Point::Point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Point::Point(std::string const& name) {
    const auto col_s = name.substr(0, 1);
    const auto row_s = name.substr(1);
    col_ = COLS.find(col_s);
    row_ = std::stoi(row_s) - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %r15
xorl %edx, %edx
movq %r15, %rcx
callq 0x3190
movq %rsp, %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x3190
leaq 0x16ae8(%rip), %rdi     # 0x1a1b0
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x3300
movl %eax, 0x4(%rbx)
movq %rsp, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x37e9
decl %eax
movl %eax, (%rbx)
movq %rsp, %rdi
callq 0x3318
leaq 0x20(%rsp), %rdi
callq 0x3318
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3318
jmp 0x3714
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3318
movq %rbx, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::newGame(unsigned int, float)
std::shared_ptr<const GameState> newGame(unsigned int board_size, float komi) {
    return std::shared_ptr<const GameState>(
        std::make_shared<const GameStateImpl>(
            Board(board_size, board_size),
            Stone::black,
            komi
        )
    );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x5b50, %rsp           # imm = 0x5B50
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movss %xmm0, (%r14)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movl %esi, %edx
callq 0xf9ce
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x3b91
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x3c58
movq %rbx, %rax
addq $0x5b50, %rsp           # imm = 0x5B50
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::applyMove(std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&) const
std::shared_ptr<GameState> applyMove(Move const& move) const override {
        return std::make_shared<GameStateImpl>(
            other(next_player_),
            shared_from_this(),
            move
        );
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x5b48(%rsi), %edi
callq 0x366c
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
addq $0x8, %r15
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x474c
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x41f9
leaq 0x28(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x3c58
leaq 0x18(%rsp), %rdi
callq 0x3c58
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3c58
movq %rbx, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::isOver() const
bool isOver() const override {
        if (!last_move_) {
            // First move of game.
            return false;
        }
        const auto last_move = *last_move_;
        if (isResign(last_move)) {
            return true;
        }

        if (isPass(last_move)) {
            if (prev_state_ != nullptr) {
                if (prev_state_->last_move_) {
                    const auto prev_prev_move = *prev_state_->last_move_;
                    if (isPass(prev_prev_move)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x5b58(%rdi)
jne 0x40c5
movq %rdi, %r14
movl 0x5b54(%rdi), %eax
leaq 0x20(%rsp), %rsi
movl %eax, 0x8(%rsi)
movq 0x5b4c(%rdi), %rcx
movq %rcx, (%rsi)
movzbl %al, %eax
leaq 0x15a2b(%rip), %rcx     # 0x19a88
leaq 0x10(%rsp), %rdi
callq *(%rcx,%rax,8)
movb $0x1, %bl
testb %al, %al
jne 0x40c7
leaq 0x20(%rsp), %rsi
movzbl 0x8(%rsi), %eax
leaq 0x159f5(%rip), %r15     # 0x19a70
leaq 0x10(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
je 0x40c5
movq 0x5b60(%r14), %rax
testq %rax, %rax
je 0x40c5
cmpb $0x1, 0x5b58(%rax)
jne 0x40c5
movl 0x5b54(%rax), %ecx
leaq 0x10(%rsp), %rsi
movl %ecx, 0x8(%rsi)
movq 0x5b4c(%rax), %rax
movq %rax, (%rsi)
movzbl %cl, %eax
leaq 0xf(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
jne 0x40c7
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::GameStateImpl(baduk::Stone, std::shared_ptr<baduk::GameStateImpl const>, std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&)
GameStateImpl(
            Stone next_player,
            std::shared_ptr<const GameStateImpl> parent,
            Move const& last_move) :
        board_(parent->board_),
        next_player_(next_player),
        last_move_(last_move),
        prev_state_(parent),
        komi_(parent->komi()),
        num_moves_(parent->numMoves() + 1) {

        if (std::holds_alternative<Play>(last_move)) {
            board_.place(
                std::get<Play>(last_move).point(),
                other(next_player_));
        }

        previous_states_ = parent->previous_states_;
        previous_states_.insert(prev_state_->hash());
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x156da(%rip), %rax     # 0x19b28
movq %rax, (%rdi)
leaq 0x18(%rdi), %r12
movq (%rdx), %rsi
addq $0x18, %rsi
movl $0x5b30, %edx           # imm = 0x5B30
movq %r12, %rdi
callq 0x3140
movl %ebp, 0x5b48(%rbx)
movq (%r13), %rax
movq %rax, 0x5b4c(%rbx)
movl 0x8(%r13), %eax
movl %eax, 0x5b54(%rbx)
movb $0x1, 0x5b58(%rbx)
leaq 0x5b60(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x45fe
leaq 0x8a18(%rbx), %rdi
movl $0xc0, %edx
xorl %esi, %esi
callq 0x30c0
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movss %xmm0, 0x8ad8(%rbx)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
incl %eax
movl %eax, 0x8adc(%rbx)
cmpb $0x0, 0x8(%r13)
jne 0x44fc
movq %r13, %rdi
callq 0x3c3d
movq (%rax), %r13
movl 0x5b48(%rbx), %edi
callq 0x366c
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xfa5c
leaq 0x5b70(%rbx), %r12
movl $0x5b70, %esi           # imm = 0x5B70
addq (%r14), %rsi
movl $0x2f68, %edx           # imm = 0x2F68
movq %r12, %rdi
callq 0x3140
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x455e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x5b68(%rbx), %rdi
callq 0x3c58
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x41c0
movq %r14, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/statichash.h
// Function: baduk::StaticHash<unsigned long long, 1493u>::insert(unsigned long long)
void insert(T value) {
        auto attempts = TABLESIZE;
        T index = value;
        while (attempts != 0) {
            if (!filled_[index % TABLESIZE]) {
                filled_.set(index % TABLESIZE);
                values_[index % TABLESIZE] = value;
                return;
            }
            ++index;
            --attempts;
        }
        throw HashTableFull();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq (%rdi,%rsi,8), %r15
addq $0x2ea8, %rdi           # imm = 0x2EA8
movl $0xfffffa2b, %esi       # imm = 0xFFFFFA2B
movl $0x5d5, %r8d            # imm = 0x5D5
movq %rbx, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r8
testl %esi, %esi
je 0x45d5
movq %rdx, %rax
shrq $0x6, %rax
movq (%rdi,%rax,8), %rax
btq %rdx, %rax
jae 0x45a7
incq %rcx
incl %esi
addq $0x8, %r15
jmp 0x457f
movl $0x5d5, %esi            # imm = 0x5D5
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rax, %r14
pushq $0x1
popq %rax
movq %rdx, %rsi
movl %eax, %edx
callq 0x4632
imulq $-0x2ea8, %r14, %rax    # imm = 0xD158
movq %rbx, (%r15,%rax)
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x30a0
leaq 0x1568c(%rip), %rcx     # 0x19c70
movq %rcx, (%rax)
leaq 0x1565a(%rip), %rsi     # 0x19c48
movq 0x159e3(%rip), %rdx     # 0x19fd8
movq %rax, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::CheckLegal::operator()(baduk::Play const&)
bool operator()(Play const& play) {
            const auto point = play.point();
            const auto player = game_state->next_player_;
            if (!game_state->board_.isEmpty(point)) {
                return false;
            }

            // Ko.
            if (game_state->board_.willCapture(point, player)) {
                if (game_state->willViolateKo(point)) {
                    return false;
                }
            } else if (game_state->board_.willHaveNoLiberties(point, player)) {
                return false;
            }

            return true;
        }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rsi), %rbx
movq (%rdi), %rdi
movl 0x5b48(%rdi), %ebp
addq $0x18, %rdi
movq %rbx, %rsi
callq 0xfa38
testb %al, %al
je 0x4845
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xfff0
movq (%r14), %rdi
testb %al, %al
je 0x4833
movq %rbx, %rsi
callq 0x4850
jmp 0x4841
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x1007c
testb %al, %al
je 0x4849
xorl %eax, %eax
jmp 0x484b
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::willViolateKo(baduk::Point) const
bool willViolateKo(Point point) const {
        // Find the hash of the next state, without actually computing
        // the full board position.
        const auto next_board_hash = board_.hashAfter(point, next_player_);
        const auto next_player_hash =
            next_player_ == Stone::black ?
                zobrist::WHITE_TO_PLAY :
                zobrist::BLACK_TO_PLAY;
        const auto next_state_hash = next_board_hash ^ next_player_hash;

        return previous_states_.contains(next_state_hash);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
movl 0x5b48(%rbx), %edx
callq 0x103fa
cmpl $0x0, 0x5b48(%rbx)
movabsq $0x78072ab4b31b23a7, %rcx # imm = 0x78072AB4B31B23A7
movabsq $0x3089a105e9ebf992, %rsi # imm = 0x3089A105E9EBF992
cmoveq %rcx, %rsi
xorq %rax, %rsi
addq $0x5b70, %rbx           # imm = 0x5B70
movq %rbx, %rdi
popq %rbx
jmp 0x4896
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/statichash.h
// Function: baduk::StaticHash<unsigned long long, 1493u>::contains(unsigned long long) const
bool contains(T value) const {
        auto attempts = TABLESIZE;
        T index = value;
        while (attempts != 0 ) {
            if (filled_[index % TABLESIZE]) {
                if (values_[index % TABLESIZE] == value) {
                    return true;
                }
            } else {
                return false;
            }
            ++index;
            --attempts;
        }
        return false;
    }

// Assembly:
leaq (%rdi,%rsi,8), %r9
movl $0xfffffa2b, %r10d      # imm = 0xFFFFFA2B
movl $0x5d5, %r11d           # imm = 0x5D5
movq %rsi, %rcx
xorl %r8d, %r8d
movq %rcx, %rax
xorl %edx, %edx
divq %r11
testl %r10d, %r10d
je 0x48ef
movq %rdx, %r8
shrq $0x6, %r8
movq 0x2ea8(%rdi,%r8,8), %r8
btq %rdx, %r8
jae 0x48e7
imulq $-0x2ea8, %rax, %rax    # imm = 0xD158
cmpq %rsi, (%r9,%rax)
je 0x48ec
incq %rcx
incl %r10d
addq $0x8, %r9
jmp 0x48a9
xorl %r8d, %r8d
jmp 0x48ef
movb $0x1, %r8b
movl %r8d, %eax
retq
nop