LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::WebsockClient(cordpp::Service&)
WebsockClient::WebsockClient(Service &service) 
  : connection(service)
{
  frame.payload = nullptr;
  state = WebsockState::closed;
  on_connect([](const Error &err) {});
  on_close([](const WebsockCloseData &data) {});
  on_message([](const char* data, const size_t len) {});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x40(%rdi), %r14
movq %r14, %rdi
callq 0x25b40
leaq 0x2e8(%rbx), %r15
leaq 0x308(%rbx), %r12
leaq 0x328(%rbx), %r13
leaq 0x348(%rbx), %rbp
movl $0xb0, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xa350
movq %rbp, %rdi
xorl %esi, %esi
callq 0x39e3c
movq $0x0, 0x20(%rbx)
movl $0x1, 0x398(%rbx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xad6(%rip), %rax       # 0x39582
movq %rax, 0x18(%rsi)
leaq 0xacd(%rip), %rax       # 0x39584
movq %rax, 0x10(%rsi)
movq %r12, %rdi
callq 0x153e2
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38adc
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xaae(%rip), %rax       # 0x3959c
movq %rax, 0x18(%rsi)
leaq 0xaa5(%rip), %rax       # 0x3959e
movq %rax, 0x10(%rsi)
movq %r13, %rdi
callq 0x154a6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38b1e
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xa86(%rip), %rax       # 0x395b6
movq %rax, 0x18(%rsi)
leaq 0xa7d(%rip), %rax       # 0x395b8
movq %rax, 0x10(%rsi)
movq %r15, %rdi
callq 0x1556a
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38b60
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38c50
jmp 0x38c50
jmp 0x38c50
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38be6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x38be6
jmp 0x38c50
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38be6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x38be6
jmp 0x38c50
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38be6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbp, %rdi
callq 0xf42e
jmp 0x38bf7
jmp 0x38c50
movq %rax, 0x8(%rsp)
movq 0x338(%rbx), %rax
testq %rax, %rax
je 0x38c10
movq %r13, %rdi
movq %r13, %rsi
movl $0x3, %edx
callq *%rax
movq 0x318(%rbx), %rax
testq %rax, %rax
je 0x38c29
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq 0x2f8(%rbx), %rax
testq %rax, %rax
je 0x38c42
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xd81a
jmp 0x38c5d
jmp 0x38c50
jmp 0x38c50
movq %rax, %rdi
callq 0xd3a3
movq %rax, 0x8(%rsp)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x38c71
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5d0
movq 0x8(%rsp), %rdi
callq 0xaa30
nop
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::start_handshake(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void WebsockClient::start_handshake(const std::string &host) {
  // connect to gateway
  state = WebsockState::connecting;
  frame.payload = new char[host.size() + 1];
  frame.payload[sizeof(frame.payload)] = 0;
  std::memcpy(frame.payload, host.c_str(), host.size());
  connection.connect(host, 443, [this](const Error &err) {

    // handle connection error
    if (err) {
      state = WebsockState::closed;
      connect_cb(err);
      return;
    }

    // generate websocket key
    uint8_t key_data[16] = { 0 };
    for (uint8_t i = 0; i < 16; i++)
      key_data[i] = rand_byte();
    char *key = b64_encode(reinterpret_cast<const char*>(key_data), 16);

    // generate http handshake data
    std::ostringstream output;
    output << "GET /?v=" << ws_version << "&encoding=json HTTP/1.1\r\n"
           << "Upgrade: WebSocket\r\n"
           << "Connection: Upgrade\r\n"
           << "Sec-WebSocket-Version: 13\r\n"
           << "Host: " << frame.payload << ":443\r\n"
           << "Sec-WebSocket-Key: " << key << "\r\n\r\n";
    connection.write(output.str());
    delete frame.payload;
    frame.payload = nullptr;
    delete key;

    // check handshake response and start connection
    connection.read_until("\r\n\r\n", [this](const Buffer &buf) {
      const std::string data(buf.begin(), buf.end());
      if (data.find("HTTP/1.1 101") == 0) {
        state = WebsockState::open;
        parse_headers();
        connect_cb(Success);
      }
    });
  });
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x2, 0x398(%rdi)
movq 0x8(%rsi), %r15
leaq 0x1(%r15), %rdi
callq 0xa040
movq %rax, 0x20(%r14)
movb $0x0, 0x8(%rax)
movq (%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0xa4d0
movq %rsp, %rcx
movq $0x0, 0x8(%rcx)
movq %r14, (%rcx)
addq $0x40, %r14
leaq 0x8f9(%rip), %rax       # 0x395d0
movq %rax, 0x18(%rcx)
leaq 0xc52(%rip), %rax       # 0x39934
movq %rax, 0x10(%rcx)
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1bb, %edx            # imm = 0x1BB
callq 0x26270
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x38d0d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x38d3b
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x38d33
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3a3
nop
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::parse_headers()
void WebsockClient::parse_headers() {
  // clean leftover data
  if (frame.payload != nullptr) {
    delete frame.payload;
    frame.payload = nullptr;
  }

  // read and parse the first two bytes
  if (connection.is_connected()) {
    connection.read(2, [this](const Buffer &buf) {

      // parse the first byte
      frame.fin  = (buf[0] >> 7) & 1;
      frame.rsv1 = (buf[0] >> 6) & 1;
      frame.rsv2 = (buf[0] >> 5) & 1;
      frame.rsv3 = (buf[0] >> 4) & 1;
      frame.opcode = static_cast<WebsockOp>(buf[0] & 0x0f);

      // parse the second byte
      frame.payload_len = buf[1] & (~0x80);
      frame.masked = (buf[1] >> 7) & 1;

      // no mask, fetch the payload size
      if (frame.masked == 0) {
        frame.mask = nullptr;
        parse_length();

      // retrive mask then fetch payload size
      } else {
        frame.mask = new uint8_t[4];
        connection.read(4, [this](const Buffer &buf) {
          frame.mask[0] = static_cast<uint8_t>(buf[0]);
          frame.mask[1] = static_cast<uint8_t>(buf[1]);
          frame.mask[2] = static_cast<uint8_t>(buf[2]);
          frame.mask[3] = static_cast<uint8_t>(buf[3]);
          parse_length();
        });
      }
    });
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x38d69
movl $0x1, %esi
callq 0xa5d0
movq $0x0, 0x20(%rbx)
leaq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x25cee
testb %al, %al
je 0x38dc5
leaq 0x8(%rsp), %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0xcac(%rip), %rax       # 0x39a3c
movq %rax, 0x18(%rdx)
leaq 0xdc3(%rip), %rax       # 0x39b5e
movq %rax, 0x10(%rdx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x2615e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x38dc5
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x38df3
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x38deb
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3a3
nop
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::parse_length()
void WebsockClient::parse_length() {
  // start parsing body if no remaining data
  if (frame.payload_len != 0x7f && frame.payload_len != 0x7e) {
    parse_payload();

  // read remaining data of size if not
  } else {
    const uint8_t padding = frame.payload_len < 0x10000 ? 2 : 8;
    connection.read(padding, [this](const Buffer &buf) {
      size_t payload_size = 0;

      // 16-bit payload
      if (frame.payload_len == 0x7e) {
        payload_size |= static_cast<uint64_t>(buf[0] & 0xff) << 8;
        payload_size |= static_cast<uint64_t>(buf[1] & 0xff);

      // 64-bit payload
      } else if (frame.payload_len == 0x7f) {
        payload_size |= static_cast<uint64_t>(buf[0] & 0xff) << 56;
        payload_size |= static_cast<uint64_t>(buf[1] & 0xff) << 48;
        payload_size |= static_cast<uint64_t>(buf[2] & 0xff) << 40;
        payload_size |= static_cast<uint64_t>(buf[3] & 0xff) << 32;
        payload_size |= static_cast<uint64_t>(buf[4] & 0xff) << 24;
        payload_size |= static_cast<uint64_t>(buf[5] & 0xff) << 16;
        payload_size |= static_cast<uint64_t>(buf[6] & 0xff) << 8;
        payload_size |= static_cast<uint64_t>(buf[7] & 0xff);
      }

      // set size and parse payload
      frame.payload_len = payload_size;
      parse_payload();
    });
  }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq 0x38(%rdi), %rax
andq $-0x2, %rax
cmpq $0x7e, %rax
jne 0x38e5e
movq %rsp, %rdx
movq $0x0, 0x8(%rdx)
movq %rdi, (%rdx)
addq $0x40, %rdi
leaq 0xdbc(%rip), %rax       # 0x39be4
movq %rax, 0x18(%rdx)
leaq 0xe33(%rip), %rax       # 0x39c66
movq %rax, 0x10(%rdx)
movl $0x2, %esi
callq 0x2615e
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x38e58
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
addq $0x20, %rsp
popq %rbx
jmp 0x38e94
jmp 0x38e8c
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x38e84
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3a3
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::parse_payload()
void WebsockClient::parse_payload() {
  // prepare and read data
  frame.payload = new char[frame.payload_len];
  connection.read(frame.payload_len, [this](const Buffer &buf) {

    // get and unmask data from response
    for (size_t i = 0; i < buf.size(); i++)
      frame.payload[i] = (frame.masked == 0 ?
        buf[i] : buf[i] ^ frame.mask[i % 4]);

    // delete mask if frame was masked
    if (frame.masked == 1)
      delete frame.mask;

    // handle the colelcted frame
    handle_frame();
  });
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0xa040
movq %rax, 0x20(%rbx)
leaq 0x8(%rsp), %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
addq $0x40, %rbx
leaq 0xdc3(%rip), %rax       # 0x39c8c
movq %rax, 0x18(%rdx)
leaq 0xe12(%rip), %rax       # 0x39ce6
movq %rax, 0x10(%rdx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2615e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x38efc
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x38f2a
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x38f22
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3a3
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::perform_close()
void WebsockClient::perform_close() {
  WebsockCloseData close_data;
  close_data.code = (frame.payload[0] & 0xff) << 8;
  close_data.code |= frame.payload[1] & 0xff;
  if (frame.payload_len > 2)
    close_data.reason = std::string(
      frame.payload + 2, frame.payload_len);
  connection.close(Success);
  close_cb(close_data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq 0x20(%rdi), %rsi
movzbl (%rsi), %eax
shll $0x8, %eax
movw %ax, -0x18(%r15)
movzbl 0x1(%rsi), %ecx
orl %eax, %ecx
movw %cx, -0x18(%r15)
movq 0x38(%rdi), %rax
cmpq $0x3, %rax
jb 0x393d6
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq (%rsi,%rax), %rdx
addq $0x2, %rdx
addq $0x2, %rsi
leaq 0x28(%rsp), %rdi
callq 0xefcc
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0xa720
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x393d6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0x40(%rbx), %rdi
leaq 0x1c8af(%rip), %rsi     # 0x55c90
callq 0x26030
cmpq $0x0, 0x338(%rbx)
je 0x39423
leaq 0x328(%rbx), %rdi
movq %rsp, %rsi
callq *0x340(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x39417
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xa240
jmp 0x3942a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x39444
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq %rbx, %rdi
callq 0xaa30
// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ws.cc
// Function: cordpp::WebsockClient::close(unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void WebsockClient::close(const uint16_t code, const std::string &reason) {
  if (!connection.is_connected()) return;
  char payload[2 + reason.size()];
  payload[0] = static_cast<char>((code >> 8) & 0xff);
  payload[1] = static_cast<char>(code & 0xff);
  std::memcpy(payload + 2, reason.c_str(), reason.size());
  send(payload, sizeof(payload), WebsockOp::close);
  state = WebsockState::closed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
addq $0x40, %rdi
callq 0x25cee
testb %al, %al
je 0x39572
movq %rsp, -0x30(%rbp)
movq 0x8(%r14), %rax
leaq 0x2(%rax), %r12
movq %rsp, %rcx
addq $0x11, %rax
andq $-0x10, %rax
movq %rcx, %r13
subq %rax, %r13
movq %r13, %rsp
negq %rax
rolw $0x8, %r15w
movw %r15w, (%rcx,%rax)
leaq 0x2(%r13), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0xa4d0
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x8, %ecx
callq 0x39178
movl $0x1, 0x398(%rbx)
movq -0x30(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/Hungarian.cpp
// Function: augmentRight(int, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
vector<int> augmentRight(int j, vector< vector<double> > &M, vector<int> &edgesRight, vector<int> &blockedLeft, vector<int> &blockedRight) {
    
    blockedRight[j] = 1;
    vector<int> output(1);
    
    // if node j is unmatched then return j as start of augmented path
    if (edgesRight[j]<0) {
        output[0] = j;
        return(output);
    }
    
    // otherwise continue chain of augmenting
    output = augmentLeft(edgesRight[j], M, edgesRight, blockedLeft, blockedRight);
    if (output[0]>=0) {
        output.push_back(j);
    }
    return(output);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, 0x30(%rsp)
movq %rcx, %r13
movq %rdx, 0x28(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movslq %esi, %r12
movq (%r9), %rax
movl $0x1, (%rax,%r12,4)
movl $0x4, %edi
callq 0x3320
movq %rax, %r14
movq %rax, (%rbx)
addq $0x4, %rax
movq %rax, 0x10(%rbx)
movl $0x0, (%r14)
movq %rax, 0x8(%rbx)
movq (%r13), %rax
movl (%rax,%r12,4), %esi
testl %esi, %esi
js 0x606e
leaq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %r13, %rcx
movq 0x30(%rsp), %r8
movq %r15, %r9
callq 0x5dc8
movq 0x10(%rsp), %r12
movq %r12, (%rbx)
movq 0x18(%rsp), %r15
movq %r15, 0x8(%rbx)
movq 0x20(%rsp), %r13
movq %r13, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %r14, %rdi
callq 0x3310
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6055
callq 0x3310
cmpl $0x0, (%r12)
js 0x6083
cmpq %r13, %r15
je 0x6073
movl %ebp, (%r15)
addq $0x4, %r15
movq %r15, 0x8(%rbx)
jmp 0x6083
movl %ebp, (%r14)
jmp 0x6083
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6e4e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%rbx), %r14
testq %r14, %r14
jne 0x60a5
jmp 0x60ad
movq %rax, %r15
movq %r14, %rdi
callq 0x3310
movq %r15, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_admixture.cpp
// Function: MCMCobject_admixture::updateQmatrix(int)
void MCMCobject_admixture::updateQmatrix(int rep) {
    
    // add logQmatrix_gene_new to logQmatrix_gene_running
    for (int i=0; i<geneCopies; i++) {
        for (int k=0; k<K; k++) {
            logQmatrix_gene_running[i][k] = logSum(logQmatrix_gene_running[i][k], logQmatrix_gene_new[i][k]);
        }
    }
    
}

// Assembly:
movl 0x70(%rdi), %ecx
testl %ecx, %ecx
jle 0xa94e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %eax
xorl %r14d, %r14d
testl %eax, %eax
jle 0xa938
movq 0x2c8(%rbx), %rax
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rcx
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movsd (%rcx,%r12,8), %xmm0
movq 0x298(%rbx), %rax
movq (%rax,%r15), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1a75d
movq 0x2c8(%rbx), %rax
movq (%rax,%r15), %rcx
movsd %xmm0, (%rcx,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jl 0xa8fc
movl 0x70(%rbx), %ecx
incq %r14
movslq %ecx, %rdx
cmpq %rdx, %r14
jl 0xa8da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_admixture.cpp
// Function: MCMCobject_admixture::storeQmatrix()
void MCMCobject_admixture::storeQmatrix() {
    
    // store individual-level Qmatrix
    groupIndex=-1;
    for (int ind=0; ind<n; ind++) {
        for (int l=0; l<loci; l++) {
            for (int p=0; p<ploidy_vec[ind]; p++) {
                groupIndex++;
                for (int k=0; k<K; k++) {
                    logQmatrix_gene[groupIndex][k] = logSum(logQmatrix_gene[groupIndex][k], logQmatrix_gene_new[groupIndex][k]);
                }
            }
        }
    }
    
}

// Assembly:
movl $0xffffffff, 0x108(%rdi) # imm = 0xFFFFFFFF
movl 0x20(%rdi), %edx
testl %edx, %edx
jle 0xaa39
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x24(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
testl %ecx, %ecx
jle 0xaa22
movq 0x40(%rbx), %rdx
xorl %ebp, %ebp
cmpl $0x0, (%rdx,%r14,4)
jle 0xaa15
movl 0x1c(%rbx), %ecx
xorl %r15d, %r15d
incl %eax
movl %eax, 0x108(%rbx)
testl %ecx, %ecx
jle 0xaa09
movq 0x2e0(%rbx), %rcx
movslq %eax, %rdx
leaq (%rdx,%rdx,2), %rdx
movq (%rcx,%rdx,8), %rdx
xorl %r12d, %r12d
cltq
movsd (%rdx,%r12,8), %xmm0
movq 0x298(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1a75d
movslq 0x108(%rbx), %rax
movq 0x2e0(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rdx
movsd %xmm0, (%rdx,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rcx
cmpq %rcx, %r12
jl 0xa9bb
movq 0x40(%rbx), %rdx
incl %r15d
cmpl (%rdx,%r14,4), %r15d
jl 0xa99a
movl 0x24(%rbx), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0xa989
movl 0x20(%rbx), %edx
incq %r14
movslq %edx, %rsi
cmpq %rsi, %r14
jl 0xa97b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_admixture.cpp
// Function: MCMCobject_admixture::d_logLikeGroup()
void MCMCobject_admixture::d_logLikeGroup() {
    
    // Multinomial-Dirichlet likelihood
    logLikeGroup = 0;
    for (int k=0; k<K; k++) {
        for (int l=0; l<loci; l++) {
            for (int j=0; j<J[l]; j++) {
                logLikeGroup += my_lgamma(lambda + alleleCounts[k][l][j]) - my_lgamma(lambda);
            }
            logLikeGroup += my_lgamma(J[l]*lambda) - my_lgamma(J[l]*lambda + alleleCountsTotals[k][l]);
        }
    }
    
}

// Assembly:
movq $0x0, 0x1e8(%rdi)
movl 0x1c(%rdi), %ecx
testl %ecx, %ecx
jle 0xab70
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x24(%rdi), %eax
xorl %r14d, %r14d
testl %eax, %eax
jle 0xab53
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movl (%rax,%r12,4), %eax
testl %eax, %eax
jle 0xaade
leaq (%r12,%r12,2), %r13
xorl %ebp, %ebp
movq 0x110(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rbp,4), %xmm0
addsd 0x78(%rbx), %xmm0
callq 0x3260
movsd %xmm0, (%rsp)
movsd 0x78(%rbx), %xmm0
callq 0x3260
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
addsd 0x1e8(%rbx), %xmm1
movsd %xmm1, 0x1e8(%rbx)
incq %rbp
movq 0x28(%rbx), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %rbp
jl 0xaa85
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x78(%rbx), %xmm0
callq 0x3260
movq 0x28(%rbx), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r12,4), %xmm1
movq 0x128(%rbx), %rax
movq (%rax,%r15,8), %rax
xorps %xmm2, %xmm2
cvtsi2sdl (%rax,%r12,4), %xmm2
movsd %xmm0, (%rsp)
mulsd 0x78(%rbx), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3260
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
addsd 0x1e8(%rbx), %xmm1
movsd %xmm1, 0x1e8(%rbx)
incq %r12
movslq 0x24(%rbx), %rax
cmpq %rax, %r12
jl 0xaa73
movl 0x1c(%rbx), %ecx
incq %r14
movslq %ecx, %rdx
cmpq %rdx, %r14
jl 0xaa64
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_admixture.cpp
// Function: MCMCobject_admixture::d_logLikeJoint()
void MCMCobject_admixture::d_logLikeJoint() {
    
    // calculate likelihood
    logLikeJoint = 0;
    double temp1;
    for (int i=0; i<n; i++) {
        for (int l=0; l<loci; l++) {
            for (int p=0; p<ploidy_vec[i]; p++) {
                if (data[i][l][p]!=0) {
                    temp1 = 0;
                    for (int k=0; k<K; k++) {
                        temp1 += admixFreqs[i][k]*alleleFreqs[k][l][data[i][l][p]-1];
                    }
                    logLikeJoint += log(temp1);
                }
            }
        }
    }
    
}

// Assembly:
movq $0x0, 0x218(%rdi)
movl 0x20(%rdi), %ecx
testl %ecx, %ecx
jle 0xae5f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x24(%rdi), %eax
xorl %r14d, %r14d
testl %eax, %eax
jle 0xae42
movq 0x40(%rbx), %rcx
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
cmpl $0x0, (%rcx,%r14,4)
jle 0xae30
leaq (%r12,%r12,2), %r13
xorl %ebp, %ebp
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rax
movslq (%rax,%rbp,4), %rax
testq %rax, %rax
je 0xae1d
movslq 0x1c(%rbx), %rcx
testq %rcx, %rcx
jle 0xae00
movq 0x140(%rbx), %rdx
movq 0x1b8(%rbx), %rsi
movq (%rsi,%r15,8), %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
movsd (%rsi,%rdi,8), %xmm1
movq (%rdx), %r8
movq (%r8,%r13,8), %r8
mulsd -0x8(%r8,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rcx
jne 0xaddb
jmp 0xae04
xorpd %xmm0, %xmm0
callq 0x3290
addsd 0x218(%rbx), %xmm0
movsd %xmm0, 0x218(%rbx)
movq 0x40(%rbx), %rcx
incq %rbp
movslq (%rcx,%r14,4), %rax
cmpq %rax, %rbp
jl 0xada6
movl 0x24(%rbx), %eax
incq %r12
movslq %eax, %rdx
cmpq %rdx, %r12
jl 0xad95
movl 0x20(%rbx), %ecx
incq %r14
movslq %ecx, %rdx
cmpq %rdx, %r14
jl 0xad82
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_noAdmixture.cpp
// Function: MCMCobject_noAdmixture::produceQmatrix()
void MCMCobject_noAdmixture::produceQmatrix() {
    
    // populate Qmatrix_ind_new
    for (int i=0; i<n; i++) {
        logProbVecSum = log(double(0));
        for (int k=0; k<K; k++) {
            d_logLikeConditional(i, k);   // update logProbVec[k]
            logProbVecSum = logSum(logProbVecSum, logProbVec[k]);
        }
        for (int k=0; k<K; k++) {
            logQmatrix_ind_new[i][k] = logProbVec[k]-logProbVecSum;
        }
    }
    
}

// Assembly:
cmpl $0x0, 0x20(%rdi)
jle 0xdf44
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
callq 0x3290
movsd %xmm0, 0x188(%rbx)
cmpl $0x0, 0x1c(%rbx)
jle 0xdf2f
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe6da
movsd 0x188(%rbx), %xmm0
movq 0x170(%rbx), %rax
movsd (%rax,%r15,8), %xmm1
callq 0x1a75d
movsd %xmm0, 0x188(%rbx)
incq %r15
movslq 0x1c(%rbx), %rax
cmpq %rax, %r15
jl 0xdebd
testl %eax, %eax
jle 0xdf2f
movq 0x170(%rbx), %rcx
movq 0x1d0(%rbx), %rdx
leaq (%r14,%r14,2), %rsi
movq (%rdx,%rsi,8), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
subsd 0x188(%rbx), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xdf15
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xdea3
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_noAdmixture.cpp
// Function: MCMCobject_noAdmixture::storeQmatrix()
void MCMCobject_noAdmixture::storeQmatrix() {
    
    // store individual-level Qmatrix
    for (int i=0; i<n; i++) {
        for (int k=0; k<K; k++) {
            logQmatrix_ind[i][k] = logSum(logQmatrix_ind[i][k], logQmatrix_ind_new[i][k]);
        }
    }
    
}

// Assembly:
movl 0x20(%rdi), %ecx
testl %ecx, %ecx
jle 0xe352
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %eax
xorl %r14d, %r14d
testl %eax, %eax
jle 0xe33c
movq 0x200(%rbx), %rax
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rcx
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movsd (%rcx,%r12,8), %xmm0
movq 0x1d0(%rbx), %rax
movq (%rax,%r15), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1a75d
movq 0x200(%rbx), %rax
movq (%rax,%r15), %rcx
movsd %xmm0, (%rcx,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jl 0xe300
movl 0x20(%rbx), %ecx
incq %r14
movslq %ecx, %rdx
cmpq %rdx, %r14
jl 0xe2de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_noAdmixture.cpp
// Function: MCMCobject_noAdmixture::drawFreqs()
void MCMCobject_noAdmixture::drawFreqs() {

    double randSum;
    for (int k=0; k<K; k++) {
        for (int l=0; l<loci; l++) {
            randSum = 0;
            for (int j=0; j<J[l]; j++) {
                alleleFreqs[k][l][j] = rgamma1(alleleCounts[k][l][j]+lambda, 1.0);
                randSum += alleleFreqs[k][l][j];
            }
            for (int j=0; j<J[l]; j++) {
                alleleFreqs[k][l][j] /= randSum;
            }
            
        }
    }
    
}

// Assembly:
movl 0x1c(%rdi), %eax
testl %eax, %eax
jle 0xe5b8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x24(%rdi), %ecx
xorl %esi, %esi
testl %ecx, %ecx
jle 0xe59b
movq 0x28(%rbx), %rax
leaq (,%rsi,8), %rcx
leaq (%rcx,%rcx,2), %r15
movq %rsi, 0x8(%rsp)
leaq (%rsi,%rsi,2), %r12
xorl %r13d, %r13d
cmpl $0x0, (%rax,%r13,4)
jle 0xe583
xorps %xmm1, %xmm1
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rbp
xorl %r14d, %r14d
movsd %xmm1, 0x10(%rsp)
movq 0xa8(%rbx), %rax
movq (%rax,%r15), %rax
movq (%rax,%rbp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r14,4), %xmm0
addsd 0x70(%rbx), %xmm0
movsd 0x27d47(%rip), %xmm1    # 0x36260
callq 0x1d1b1
movsd 0x10(%rsp), %xmm1
movq 0xd8(%rbx), %rax
movq (%rax,%r15), %rax
movq (%rax,%rbp), %rax
movsd %xmm0, (%rax,%r14,8)
addsd %xmm0, %xmm1
incq %r14
movq 0x28(%rbx), %rax
movslq (%rax,%r13,4), %rcx
cmpq %rcx, %r14
jl 0xe4ee
testl %ecx, %ecx
jle 0xe583
movq 0xd8(%rbx), %rdx
movq (%rdx,%r12,8), %rdx
leaq (,%r13,2), %rsi
addq %r13, %rsi
movq (%rdx,%rsi,8), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0xe56d
incq %r13
movslq 0x24(%rbx), %rcx
cmpq %rcx, %r13
jl 0xe4d1
movl 0x1c(%rbx), %eax
movq 0x8(%rsp), %rsi
incq %rsi
movslq %eax, %rdx
cmpq %rdx, %rsi
jl 0xe4ad
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/MCMCobject_noAdmixture.cpp
// Function: MCMCobject_noAdmixture::d_logLikeJoint()
void MCMCobject_noAdmixture::d_logLikeJoint() {
    
    // calculate likelihood
    logLikeJoint = 0;
    double running = 1.0;
    for (int i=0; i<n; i++) {
        for (int l=0; l<loci; l++) {
            for (int p=0; p<ploidy_vec[i]; p++) {
                if (data[i][l][p]!=0) {
                    running *= alleleFreqs[group[i]-1][l][data[i][l][p]-1];
                }
                if (running<UNDERFLO) {
                    logLikeJoint += log(running);
                    running = 1.0;
                }
            }
        }
    }
    logLikeJoint += log(running);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x150(%rdi)
movl 0x20(%rdi), %eax
testl %eax, %eax
jle 0xe6ae
movl 0x24(%rbx), %ecx
movsd 0x27c77(%rip), %xmm0    # 0x36260
xorl %r14d, %r14d
movsd 0x27c94(%rip), %xmm1    # 0x36288
testl %ecx, %ecx
jle 0xe69d
movq 0x40(%rbx), %rax
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
cmpl $0x0, (%rax,%r14,4)
jle 0xe68b
leaq (%r12,%r12,2), %r13
xorl %ebp, %ebp
movq (%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq (%rcx,%r13,8), %rcx
movslq (%rcx,%rbp,4), %rcx
testq %rcx, %rcx
je 0xe64d
movq 0x90(%rbx), %rdx
movq 0xd8(%rbx), %rsi
movslq (%rdx,%r14,4), %rdx
leaq (%rdx,%rdx,2), %rdx
movq -0x18(%rsi,%rdx,8), %rdx
movq (%rdx,%r13,8), %rdx
mulsd -0x8(%rdx,%rcx,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0xe67c
callq 0x3290
movsd 0x27c28(%rip), %xmm1    # 0x36288
addsd 0x150(%rbx), %xmm0
movsd %xmm0, 0x150(%rbx)
movq 0x40(%rbx), %rax
movsd 0x27be4(%rip), %xmm0    # 0x36260
incq %rbp
movslq (%rax,%r14,4), %rcx
cmpq %rcx, %rbp
jl 0xe614
movl 0x24(%rbx), %ecx
incq %r12
movslq %ecx, %rdx
cmpq %rdx, %r12
jl 0xe607
movl 0x20(%rbx), %eax
incq %r14
movslq %eax, %rdx
cmpq %rdx, %r14
jl 0xe5f4
jmp 0xe6b6
movsd 0x27baa(%rip), %xmm0    # 0x36260
callq 0x3290
addsd 0x150(%rbx), %xmm0
movsd %xmm0, 0x150(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/exhaustive.cpp
// Function: exhaustive_admix(globals&, int)
void exhaustive_admix(globals &globals, int Kindex) {
    
    // alpha fixed
    if (globals.fixAlpha_on) {
        
        globals.logEvidence_exhaustive[Kindex] = exhaustive_admix_fixedAlpha(globals, Kindex, globals.alpha[Kindex]);
        
    // alpha variable (integrate over alpha by brute force)
    } else {
        
        double logEvidence_total = log(double(0));
        for (int i=0; i<100; i++) {
            double alpha = (i+1)/10.0;
            logEvidence_total = logSum(logEvidence_total, exhaustive_admix_fixedAlpha(globals, Kindex, alpha));
        }
        logEvidence_total -= log(100.0);
        globals.logEvidence_exhaustive[Kindex] = logEvidence_total;
        
    }
    
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x1, 0x2bd1(%rdi)
jne 0x10339
movslq %ebp, %r14
movq 0x2bd8(%rbx), %rax
movsd (%rax,%r14,8), %xmm0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x103a1
jmp 0x1038b
xorpd %xmm0, %xmm0
callq 0x3290
movl $0x1, %r14d
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
divsd 0x25f0a(%rip), %xmm0    # 0x36268
movq %rbx, %rdi
movl %ebp, %esi
callq 0x103a1
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x1a75d
incl %r14d
cmpl $0x65, %r14d
jne 0x10348
addsd 0x25f58(%rip), %xmm0    # 0x362e0
movslq %ebp, %r14
movq 0x2e00(%rbx), %rax
movsd %xmm0, (%rax,%r14,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: logSum(double, double)
double logSum(double logA, double logB) {
    if (logA-logB > 100) {
        return(logA);
    } else if (logB-logA > 100) {
        return(logB);
    }
    double output = (logA<logB) ? logB + log(1+exp(logA-logB)) : logA + log(1+exp(logB-logA));
    return(output);
}

// Assembly:
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
ucomisd 0x1c44b(%rip), %xmm2    # 0x36bb8
ja 0x1a7c4
movapd %xmm1, %xmm3
subsd %xmm0, %xmm3
ucomisd 0x1c439(%rip), %xmm3    # 0x36bb8
jbe 0x1a786
movapd %xmm1, %xmm0
retq
pushq %rax
movapd %xmm0, %xmm4
cmpltsd %xmm1, %xmm4
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm4
orpd %xmm2, %xmm4
maxsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movapd %xmm4, %xmm0
callq 0x35a0
addsd 0x1baaa(%rip), %xmm0    # 0x36260
callq 0x3290
addsd (%rsp), %xmm0
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: harmonicMean(std::vector<double, std::allocator<double>>&)
double harmonicMean(vector<double> &x) {
    double output = 0;
    double minVal =  *min_element(begin(x),end(x));
    for (int i=0; i<int(x.size()); i++)
        output += 1.0/exp(x[i]-minVal);
    output = minVal- log(output/x.size());
    return(output);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
sete %sil
leaq 0x8(%rax), %rdx
cmpq %rcx, %rdx
sete %dil
orb %sil, %dil
movq %rax, %rsi
jne 0x1a814
movsd (%rax), %xmm0
movq %rax, %rsi
movsd (%rdx), %xmm1
ucomisd %xmm1, %xmm0
cmovaq %rdx, %rsi
minsd %xmm0, %xmm1
addq $0x8, %rdx
movapd %xmm1, %xmm0
cmpq %rcx, %rdx
jne 0x1a7f7
movsd (%rsi), %xmm1
subq %rax, %rcx
sarq $0x3, %rcx
testl %ecx, %ecx
movsd %xmm1, 0x8(%rsp)
xorpd %xmm2, %xmm2
jle 0x1a881
xorl %r14d, %r14d
movsd %xmm2, 0x10(%rsp)
movsd (%rax,%r14,8), %xmm0
subsd %xmm1, %xmm0
callq 0x35a0
movsd 0x10(%rsp), %xmm2
movsd 0x1ba0d(%rip), %xmm1    # 0x36260
divsd %xmm0, %xmm1
addsd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm1
incq %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
movslq %edx, %rdx
cmpq %rdx, %r14
jl 0x1a830
sarq $0x3, %rcx
movq %rcx, %xmm0
punpckldq 0x1c2f2(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1c2fa(%rip), %xmm0    # 0x36b90
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm0
callq 0x3290
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: normalise_log(std::vector<double, std::allocator<double>>)
vector<double> normalise_log(vector<double> x) {
    
    vector<double> output(x.size());
    double maxVal = *max_element(begin(x),end(x));
    double sumVal = 0;
    for (int i=0; i<int(x.size()); i++) {
        output[i] = exp(x[i]-maxVal);
        sumVal += output[i];
    }
    for (int i=0; i<int(x.size()); i++) {
        output[i] /= sumVal;
    }
    return(output);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
leaq 0xf(%rsp), %rdx
callq 0x588e
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
sete %dl
leaq 0x8(%rax), %rsi
cmpq %rcx, %rsi
sete %dil
orb %dl, %dil
movq %rax, %rdx
jne 0x1a92d
movsd (%rax), %xmm0
movq %rax, %rdx
movsd (%rsi), %xmm1
ucomisd %xmm0, %xmm1
cmovaq %rsi, %rdx
maxsd %xmm0, %xmm1
addq $0x8, %rsi
movapd %xmm1, %xmm0
cmpq %rcx, %rsi
jne 0x1a910
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
jle 0x1a9b1
movsd (%rdx), %xmm0
movsd %xmm0, 0x10(%rsp)
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
movsd %xmm1, 0x18(%rsp)
movsd (%rax,%r15,8), %xmm0
subsd 0x10(%rsp), %xmm0
callq 0x35a0
movsd 0x18(%rsp), %xmm1
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
addsd %xmm0, %xmm1
incq %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rdx
cmpq %rdx, %r15
jl 0x1a949
testl %ecx, %ecx
jle 0x1a9b1
movq (%rbx), %rax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x1a99b
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: StirlingFirst(int)
vector<int> StirlingFirst(int n) {
    
    vector<int> oldVec(2,1);
    vector<int> newVec(2);
    
    // simple answer if n<=0, n==1 or n==2
    if (n<=0)
        return(vector<int>(1));
    else if (n==1)
        return(vector<int>(1,1));
    else if (n==2)
        return(oldVec);
    
    // otherwise calculate by looping
    for (int i=2; i<n; i++) {
        newVec[0] = oldVec[0]*i;
        for (int j=1; j<int(oldVec.size()); j++) {
            newVec[j] = oldVec[j]*i + oldVec[j-1];
        }
        newVec.push_back(1);
        oldVec = vector<int>(newVec);
    }
    
    return(newVec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %r13
movl $0x8, %edi
callq 0x3320
movq %rax, %r15
movq %rax, %rbx
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r15)
movl $0x8, %edi
callq 0x3320
movq %rax, %r12
movq %rax, (%rsp)
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq $0x0, (%r12)
movq %rax, 0x8(%rsp)
testl %ebp, %ebp
jle 0x1aef0
cmpl $0x1, %ebp
je 0x1af21
addq $0x8, %r15
cmpl $0x2, %ebp
jne 0x1af6a
movq %rbx, (%r13)
movq %r15, 0x8(%r13)
movl $0x10, %eax
xorl %ebx, %ebx
jmp 0x1af55
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movl $0x4, %edi
callq 0x3320
movq %rax, (%r13)
movq %rax, %r15
addq $0x4, %r15
movq %r15, 0x10(%r13)
movl $0x0, (%rax)
jmp 0x1af50
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movl $0x4, %edi
callq 0x3320
movq %rax, (%r13)
movq %rax, %r15
addq $0x4, %r15
movq %r15, 0x10(%r13)
movl $0x1, (%rax)
movl $0x8, %eax
movq %r15, (%r13,%rax)
movq %r12, %rdi
callq 0x3310
movq %rbx, %r14
jmp 0x1b04b
movq %r13, 0x40(%rsp)
movl $0x2, %r12d
leaq 0x20(%rsp), %r13
movl (%rbx), %ecx
imull %r12d, %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
subq %rbx, %r15
shrq $0x2, %r15
cmpl $0x2, %r15d
jl 0x1afb5
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl $0x1, %ecx
movl (%rbx,%rcx,4), %edx
imull %r12d, %edx
addl -0x4(%rbx,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r15
jne 0x1af9f
movl $0x1, 0x20(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
movq %rsp, %r14
je 0x1afdd
movl $0x1, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x1afe8
movq %r14, %rdi
movq %r13, %rdx
callq 0x1cf86
movq %r13, %rdi
movq %r14, %rsi
callq 0x6ad4
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq %rbx, %rdi
callq 0x3310
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b025
callq 0x3310
incl %r12d
movq %r14, %rbx
cmpl %ebp, %r12d
jne 0x1af7a
movq 0x10(%rsp), %rax
movaps (%rsp), %xmm0
movq 0x40(%rsp), %r13
movups %xmm0, (%r13)
movq %rax, 0x10(%r13)
testq %r14, %r14
je 0x1b058
movq %r14, %rdi
callq 0x3310
movq %r13, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b075
jmp 0x1b075
movq %rax, %r14
jmp 0x1b086
jmp 0x1b075
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1b086
callq 0x3310
movq %rbx, %rdi
callq 0x3310
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: checkInteger(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::basic_ofstream<char, std::char_traits<char>>&)
void checkInteger(string param_string, int &param_final, string param_name, bool writeErrorToFile, ofstream &logFileStream) {
    double param_double;
    istringstream(param_string) >> param_double;
    if (my_round(double(param_double))==param_double) {
        param_final = int(param_double);
    } else {
        cerrAndLog("\nError: '"+param_name+"' parameter must be an integer\n", writeErrorToFile, logFileStream);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movl $0x8, %edx
callq 0x34f0
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x31e0
movq 0x252ba(%rip), %rsi     # 0x40fa8
leaq 0x30(%rsp), %rdi
callq 0x3420
leaq 0xa8(%rsp), %rdi
callq 0x30f0
movsd 0x8(%rsp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm1, (%rsp)
jbe 0x1bd2d
movsd 0x1ae36(%rip), %xmm0    # 0x36b58
addsd %xmm1, %xmm0
callq 0x3070
jmp 0x1bd3e
movsd 0x1a58b(%rip), %xmm0    # 0x362c0
addsd %xmm1, %xmm0
callq 0x3500
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1bd6a
jp 0x1bd6a
cvttsd2si %xmm1, %eax
movl %eax, (%r15)
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1af23(%rip), %rsi     # 0x36c94
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xf5f6
leaq 0x1af79(%rip), %rsi     # 0x36d01
movq %r15, %rdi
callq 0x35e0
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1bdb3
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
jmp 0x1bdc0
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movzbl %bpl, %esi
movq %rbx, %rdx
callq 0x1d808
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3150
movl $0x1, %edi
callq 0x33d0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x1be1d
callq 0x3310
jmp 0x1be1d
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1be53
callq 0x3310
jmp 0x1be53
movq %rax, %rbx
movq 0x2516c(%rip), %rsi     # 0x40fa8
leaq 0x30(%rsp), %rdi
callq 0x3420
leaq 0xa8(%rsp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: increment_restrictedGrowth(std::vector<int, std::allocator<int>>&, int)
void increment_restrictedGrowth(vector<int> &group, int maxVal) {
    
    // special escape condition if maxVal==1
    if (maxVal==1) {
        group[0] = 0;
        return;
    }
    
    // starting at the far right end, keep incrementing individual elements until restricted growth function condition is met.
    int target = int(group.size());
    group[target-1] ++;
    int targetMax = *max_element(begin(group),begin(group)+target-1);
    while ((group[target-1]>(targetMax+1)) || group[target-1]>maxVal) {
        group[target-1] = 1;
        target --;
        group[target-1] ++;
        targetMax = *max_element(begin(group),begin(group)+target-1);
    }
    if (target==1) {
        group[0] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %esi
jne 0x1c1fc
movq (%rdi), %rax
jmp 0x1c306
movabsq $-0x100000000, %r8      # imm = 0xFFFFFFFF00000000
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
movq %rcx, %rdi
shlq $0x1e, %rdi
addq %rdi, %r8
movq %r8, %rdx
sarq $0x1e, %rdx
incl (%rax,%rdx)
sarq $0x1e, %rdi
leaq -0x4(%rdi), %r10
leaq 0x4(%rax), %rdx
movq %rax, %r9
testq $-0x5, %r10
je 0x1c261
movl (%rax), %r10d
addq $-0x8, %rdi
movq %rdx, %r11
movq %rax, %r9
movl (%r11), %ebx
cmpl %ebx, %r10d
cmovlel %ebx, %r10d
cmovlq %r11, %r9
addq $0x4, %r11
addq $-0x4, %rdi
jne 0x1c249
shrq $0x2, %rcx
movl (%r9), %edi
sarq $0x20, %r8
movl (%rax,%r8,4), %r9d
incl %edi
cmpl %edi, %r9d
setle %dil
cmpl %esi, %r9d
setle %r9b
testb %r9b, %dil
jne 0x1c301
leaq (,%r8,4), %rdi
leaq (%rax,%r8,4), %r10
movl $0x1, (%r10)
movslq %ecx, %rcx
incl -0x8(%rax,%rcx,4)
movq %r8, %rcx
leaq -0x4(%rdi), %r9
movq %rax, %r8
cmpq $0x8, %r9
jb 0x1c2d7
movl (%rax), %r10d
leaq -0x8(%rdi), %r11
xorl %ebx, %ebx
movq %rax, %r8
leaq (%rdx,%rbx), %r14
movl 0x4(%rax,%rbx), %ebp
cmpl %ebp, %r10d
cmovlel %ebp, %r10d
cmovlq %r14, %r8
addq $0x4, %rbx
cmpq %rbx, %r11
jne 0x1c2bb
movl (%r8), %r11d
leaq -0x1(%rcx), %r8
leaq (%rax,%rdi), %r10
addq $-0x4, %r10
movl (%r10), %edi
incl %r11d
cmpl %r11d, %edi
setg %r11b
cmpl %esi, %edi
setg %dil
orb %r11b, %dil
movq %r9, %rdi
jne 0x1c291
cmpl $0x1, %ecx
jne 0x1c30c
movl $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: process_nan[abi:cxx11](double)
string process_nan(double x) {
    string s = to_string((long double)x);
    if (my_isnan(x))
        s = "NA";
    return(s);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
movsd %xmm0, 0x20(%rsp)
fldl 0x20(%rsp)
fstpt (%rsp)
movq 0x24c5b(%rip), %rsi     # 0x40f90
leaq 0x1aa74(%rip), %rcx     # 0x36db0
movl $0x1358, %edx           # imm = 0x1358
xorl %eax, %eax
callq 0x1cb1c
movsd 0x18(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1c35f
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rdx
leaq 0x1c6c9(%rip), %rcx     # 0x38a33
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3460
jmp 0x1c354
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x1c390
callq 0x3310
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/misc.cpp
// Function: approx_lgamma(double)
double approx_lgamma(double x) {

	if (x <= 0.0)
	{
		std::stringstream os;
        os << "Invalid input argument " << x <<  ". Argument must be positive.";
        throw std::invalid_argument( os.str() );
	}
    
    if (x < 12.0)
    {
        return log(fabs(approx_gamma(x)));
    }
    
	// Abramowitz and Stegun 6.1.41
    // Asymptotic series should be good to at least 11 or 12 figures
    // For error analysis, see Whittiker and Watson
    // A Course in Modern Analysis (1927), page 252
    
    static const double c[8] =
    {
        1.0/12.0,
		-1.0/360.0,
		1.0/1260.0,
		-1.0/1680.0,
		1.0/1188.0,
		-691.0/360360.0,
		1.0/156.0,
		-3617.0/122400.0
    };
    double z = 1.0/(x*x);
    double sum = c[7];
    for (int i=6; i >= 0; i--)
    {
        sum *= z;
        sum += c[i];
    }
    double series = sum/x;
    
    static const double halfLogTwoPi = 0.91893853320467274178032973640562;
    double loggamma = (x - 0.5)*log(x) - x + halfLogTwoPi + series;
	return loggamma;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x1ca3c
movsd 0x1a231(%rip), %xmm1    # 0x36bc8
ucomisd %xmm0, %xmm1
jbe 0x1c9ba
callq 0x1c73e
andpd 0x1a1c6(%rip), %xmm0    # 0x36b70
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
jmp 0x3290
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x19896(%rip), %xmm2    # 0x36260
divsd %xmm1, %xmm2
movsd 0x1a21a(%rip), %xmm1    # 0x36bf0
movl $0x6, %eax
leaq 0x1a45e(%rip), %rcx     # 0x36e40
mulsd %xmm2, %xmm1
addsd (%rcx,%rax,8), %xmm1
addq $-0x1, %rax
jb 0x1c9e2
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x1a155(%rip), %xmm1    # 0x36b58
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x3290
mulsd 0x8(%rsp), %xmm0
subsd (%rsp), %xmm0
addsd 0x1a1ce(%rip), %xmm0    # 0x36bf8
addsd 0x10(%rsp), %xmm0
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
retq
movsd %xmm0, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0x3210
leaq 0x48(%rsp), %rbx
leaq 0x1a324(%rip), %rsi     # 0x36d7b
movl $0x17, %edx
movq %rbx, %rdi
callq 0x3390
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x34a0
leaq 0x1a31b(%rip), %rsi     # 0x36d93
movl $0x1c, %edx
movq %rax, %rdi
callq 0x3390
movl $0x10, %edi
callq 0x3160
movq %rax, %rbx
leaq 0x50(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x3490
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x3560
xorl %ebp, %ebp
movq 0x24516(%rip), %rsi     # 0x40fd0
movq 0x244ff(%rip), %rdx     # 0x40fc0
movq %rbx, %rdi
callq 0x3540
movq %rax, %r14
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cadf
callq 0x3310
testb %bpl, %bpl
jne 0x1cae9
jmp 0x1caf6
movq %rax, %r14
movq %rbx, %rdi
callq 0x3230
jmp 0x1caf6
movq %rax, %r14
movq 0x24483(%rip), %rsi     # 0x40f80
leaq 0x38(%rsp), %rdi
callq 0x3250
leaq 0xb8(%rsp), %rdi
callq 0x30f0
movq %r14, %rdi
callq 0x3580