LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x260ca
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 0x3af20
movq $0x0, 0x20(%rbx)
movl $0x1, 0x398(%rbx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xae8(%rip), %rax       # 0x3a654
movq %rax, 0x18(%rsi)
leaq 0xadf(%rip), %rax       # 0x3a656
movq %rax, 0x10(%rsi)
movq %r12, %rdi
callq 0x156f8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39b9c
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xac0(%rip), %rax       # 0x3a66e
movq %rax, 0x18(%rsi)
leaq 0xab7(%rip), %rax       # 0x3a670
movq %rax, 0x10(%rsi)
movq %r13, %rdi
callq 0x157cc
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39bde
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xa98(%rip), %rax       # 0x3a688
movq %rax, 0x18(%rsi)
leaq 0xa8f(%rip), %rax       # 0x3a68a
movq %rax, 0x10(%rsi)
movq %r15, %rdi
callq 0x158a0
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39c20
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 0x39d10
jmp 0x39d10
jmp 0x39d10
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39ca6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x39ca6
jmp 0x39d10
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39ca6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x39ca6
jmp 0x39d10
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x39ca6
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbp, %rdi
callq 0xf508
jmp 0x39cb7
jmp 0x39d10
movq %rax, 0x8(%rsp)
movq 0x338(%rbx), %rax
testq %rax, %rax
je 0x39cd0
movq %r13, %rdi
movq %r13, %rsi
movl $0x3, %edx
callq *%rax
movq 0x318(%rbx), %rax
testq %rax, %rax
je 0x39ce9
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq 0x2f8(%rbx), %rax
testq %rax, %rax
je 0x39d02
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xd82e
jmp 0x39d1d
jmp 0x39d10
jmp 0x39d10
movq %rax, %rdi
callq 0xd3bb
movq %rax, 0x8(%rsp)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x39d31
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5d0
movq 0x8(%rsp), %rdi
callq 0xaa30
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %r14, (%rcx)
addq $0x40, %r14
leaq 0x909(%rip), %rax       # 0x3a6a2
movq %rax, 0x18(%rcx)
leaq 0xc6c(%rip), %rax       # 0x3aa10
movq %rax, 0x10(%rcx)
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1bb, %edx            # imm = 0x1BB
callq 0x26812
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39dcf
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x39dfd
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39df5
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3bb
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x39e2b
movl $0x1, %esi
callq 0xa5d0
movq $0x0, 0x20(%rbx)
leaq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x26278
testb %al, %al
je 0x39e85
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
leaq 0xcc6(%rip), %rax       # 0x3ab18
movq %rax, 0x18(%rdx)
leaq 0xddf(%rip), %rax       # 0x3ac3c
movq %rax, 0x10(%rdx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x26700
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39e85
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x39eb1
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39ea9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3bb
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %rcx
movq %rcx, %rax
andq $-0x2, %rax
cmpq $0x7e, %rax
jne 0x39f33
leaq 0x40(%rdi), %rax
cmpq $0x10000, %rcx          # imm = 0x10000
movl $0x2, %ecx
movl $0x8, %esi
cmovbl %ecx, %esi
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rdi, (%rdx)
leaq 0xdc3(%rip), %rcx       # 0x3acc2
movq %rcx, 0x18(%rdx)
leaq 0xe3a(%rip), %rcx       # 0x3ad44
movq %rcx, 0x10(%rdx)
movq %rax, %rdi
callq 0x26700
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39f2d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
addq $0x20, %rsp
popq %rbx
jmp 0x39f6a
jmp 0x39f61
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39f59
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3bb
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
addq $0x40, %rbx
leaq 0xdcb(%rip), %rax       # 0x3ad6a
movq %rax, 0x18(%rdx)
leaq 0xe20(%rip), %rax       # 0x3adca
movq %rax, 0x10(%rdx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x26700
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39fd0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x39ffc
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39ff4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3bb
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a4a8
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq (%rsi,%rax), %rdx
addq $0x2, %rdx
addq $0x2, %rsi
leaq 0x28(%rsp), %rdi
callq 0xf09e
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0xa720
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x3a4a8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0x40(%rbx), %rdi
leaq 0x1c7dd(%rip), %rsi     # 0x56c90
callq 0x265b4
cmpq $0x0, 0x338(%rbx)
je 0x3a4f5
leaq 0x328(%rbx), %rdi
movq %rsp, %rsi
callq *0x340(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a4e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xa240
jmp 0x3a4fc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a516
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq %rbx, %rdi
callq 0xaa30
// File: /workspace/github_cpp_makefile_star2_O1/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 0x26278
testb %al, %al
je 0x3a644
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 0x3a24a
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_O1/bobverity[P]MavericK/Hungarian.cpp
// Function: augmentLeft(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> augmentLeft(int i, vector< vector<double> > &M, vector<int> &edgesRight, vector<int> &blockedLeft, vector<int> &blockedRight) {
    
    blockedLeft[i] = 1;
    vector<int> output(1,-1);
    
    // search all unmatched edges
    for (int j=0; j<int(M.size()); j++) {
        if (M[i][j]==0 && edgesRight[j]!=i && blockedRight[j]==0) {
            
            // if edge leads to augmented path then add current node to path and return
            output = augmentRight(j, M, edgesRight, blockedLeft, blockedRight);
            if (output[0]>=0) {
                output.push_back(i);
                return(output);
            }
        }
    }
    
    // if no more moves then return -1
    return(output);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movslq %esi, %rax
movq (%r8), %rcx
movl $0x1, (%rcx,%rax,4)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x4, %edi
callq 0x3320
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
leaq 0x4(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rcx, 0x8(%rbx)
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
testl %ecx, %ecx
jle 0x5f94
xorl %ebp, %ebp
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rax
movsd (%rax,%rbp,8), %xmm0
ucomisd 0x311c6(%rip), %xmm0    # 0x370a8
jne 0x5f70
jp 0x5f70
movq (%r12), %rax
cmpl %ecx, (%rax,%rbp,4)
je 0x5f70
movq (%r14), %rax
cmpl $0x0, (%rax,%rbp,4)
jne 0x5f70
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x5fe9
movq (%rbx), %rdi
movapd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rdi, 0x10(%rsp)
movups 0x8(%rbx), %xmm1
movupd %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
movups %xmm1, 0x18(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x5f59
callq 0x3310
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5f68
callq 0x3310
movq (%rbx), %rax
cmpl $0x0, (%rax)
jns 0x5fa6
incq %rbp
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
movslq %ecx, %rcx
cmpq %rcx, %rbp
jl 0x5ec8
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5fc0
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x5f94
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x6f02
jmp 0x5f94
jmp 0x5fd1
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5fe1
callq 0x3310
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movslq %esi, %rax
movq (%r9), %rcx
movl $0x1, (%rcx,%rax,4)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x4, %edi
callq 0x3320
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
leaq 0x4(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl $0x0, (%rax)
movq %rcx, 0x8(%rbx)
movl 0xc(%rsp), %ecx
movslq %ecx, %rdx
movq (%r12), %rsi
cmpl $0x0, (%rsi,%rdx,4)
js 0x60e3
movl (%rsi,%rdx,4), %esi
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x5e48
movq (%rbx), %rdi
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rdi, 0x10(%rsp)
movups 0x8(%rbx), %xmm1
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
movups %xmm1, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x60b2
callq 0x3310
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x60c1
callq 0x3310
movq (%rbx), %rax
cmpl $0x0, (%rax)
js 0x60f4
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x60e7
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x60f4
movl %ecx, (%rax)
jmp 0x60f4
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x6f02
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6107
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6117
callq 0x3310
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0x70(%rdi)
jle 0xac7a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x1c(%rbx)
jle 0xac63
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movq 0x298(%rbx), %rax
movq 0x2c8(%rbx), %rcx
movq (%rcx,%r15), %rcx
movsd (%rcx,%r12,8), %xmm0
movq (%rax,%r15), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1aa59
movq 0x2c8(%rbx), %rax
movq (%rax,%r15), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jl 0xac1f
incq %r14
movslq 0x70(%rbx), %rax
cmpq %rax, %r14
jl 0xac0a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x0, 0x20(%rdi)
jle 0xad55
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x24(%rbx)
jle 0xad3d
xorl %ebp, %ebp
movq 0x40(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0xad32
xorl %r15d, %r15d
incl 0x108(%rbx)
cmpl $0x0, 0x1c(%rbx)
jle 0xad25
xorl %r12d, %r12d
movslq 0x108(%rbx), %rax
movq 0x298(%rbx), %rcx
movq 0x2e0(%rbx), %rdx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax), %rdx
movsd (%rdx,%r12,8), %xmm0
movq (%rcx,%rax), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1aa59
movslq 0x108(%rbx), %rax
movq 0x2e0(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jl 0xacc7
incl %r15d
movq 0x40(%rbx), %rax
cmpl (%rax,%r14,4), %r15d
jl 0xacb8
incl %ebp
cmpl 0x24(%rbx), %ebp
jl 0xacaa
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xac9e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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)
cmpl $0x0, 0x1c(%rdi)
jle 0xae88
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x24(%rbx)
jle 0xae6a
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movl (%rax,%r12,4), %eax
testl %eax, %eax
jle 0xadf8
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 0xad9f
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 0xad8d
incq %r14
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jl 0xad7c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
cmpl $0x0, 0x20(%rdi)
jle 0xb17b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x24(%rbx)
jle 0xb15d
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
movq 0x40(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0xb14d
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 0xb139
movslq 0x1c(%rbx), %rcx
testq %rcx, %rcx
jle 0xb120
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 0xb0fb
jmp 0xb124
xorpd %xmm0, %xmm0
callq 0x3290
addsd 0x218(%rbx), %xmm0
movsd %xmm0, 0x218(%rbx)
incq %rbp
movq 0x40(%rbx), %rax
movslq (%rax,%r14,4), %rax
cmpq %rax, %rbp
jl 0xb0c6
incq %r12
movslq 0x24(%rbx), %rax
cmpq %rax, %r12
jl 0xb0b1
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xb0a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe39b
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
callq 0x3290
movsd %xmm0, 0x188(%rbx)
movl 0x1c(%rbx), %eax
testl %eax, %eax
jle 0xe34e
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0xeb32
movsd 0x188(%rbx), %xmm0
movq 0x170(%rbx), %rax
movsd (%rax,%r15,8), %xmm1
callq 0x1aa59
movsd %xmm0, 0x188(%rbx)
incq %r15
movslq 0x1c(%rbx), %rax
cmpq %rax, %r15
jl 0xe312
testl %eax, %eax
jle 0xe386
movq 0x170(%rbx), %rcx
movq 0x1d0(%rbx), %rdx
leaq (%r14,%r14,2), %rsi
movq (%rdx,%rsi,8), %rdx
movl %eax, %eax
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
subsd 0x188(%rbx), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xe36c
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xe2f7
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0x20(%rdi)
jle 0xe7ac
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x1c(%rbx)
jle 0xe795
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movq 0x1d0(%rbx), %rax
movq 0x200(%rbx), %rcx
movq (%rcx,%r15), %rcx
movsd (%rcx,%r12,8), %xmm0
movq (%rax,%r15), %rax
movsd (%rax,%r12,8), %xmm1
callq 0x1aa59
movq 0x200(%rbx), %rax
movq (%rax,%r15), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jl 0xe751
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xe73c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0x1c(%rdi)
jle 0xea16
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x24(%rbx)
jle 0xe9ee
movq 0x8(%rsp), %rcx
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %r15
leaq (%rcx,%rcx,2), %r12
xorl %r13d, %r13d
movq 0x28(%rbx), %rax
movl (%rax,%r13,4), %eax
xorpd %xmm1, %xmm1
testl %eax, %eax
jle 0xe9a6
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 0x288ee(%rip), %xmm1    # 0x37260
callq 0x1d505
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), %rax
cmpq %rax, %r14
jl 0xe947
testl %eax, %eax
jle 0xe9de
movq 0xd8(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
leaq (,%r13,2), %rdx
addq %r13, %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, %eax
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0xe9c8
incq %r13
movslq 0x24(%rbx), %rax
cmpq %rax, %r13
jl 0xe928
movq 0x8(%rsp), %rdx
incq %rdx
movslq 0x1c(%rbx), %rax
movq %rdx, 0x8(%rsp)
cmpq %rax, %rdx
jl 0xe906
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
cmpl $0x0, 0x20(%rdi)
jle 0xeb06
movsd 0x2881d(%rip), %xmm0    # 0x37260
xorl %r14d, %r14d
movsd 0x2883a(%rip), %xmm1    # 0x37288
cmpl $0x0, 0x24(%rbx)
jle 0xeaf4
leaq (%r14,%r14,2), %r15
xorl %r12d, %r12d
movq 0x40(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0xeae4
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 0xeaa9
movq 0x90(%rbx), %rcx
movq 0xd8(%rbx), %rdx
movslq (%rcx,%r14,4), %rcx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq (%rcx,%r13,8), %rcx
mulsd -0x8(%rcx,%rax,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0xead4
callq 0x3290
movsd 0x287cc(%rip), %xmm1    # 0x37288
addsd 0x150(%rbx), %xmm0
movsd %xmm0, 0x150(%rbx)
movsd 0x2878c(%rip), %xmm0    # 0x37260
incq %rbp
movq 0x40(%rbx), %rax
movslq (%rax,%r14,4), %rax
cmpq %rax, %rbp
jl 0xea70
incq %r12
movslq 0x24(%rbx), %rax
cmpq %rax, %r12
jl 0xea5f
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0xea4e
jmp 0xeb0e
movsd 0x28752(%rip), %xmm0    # 0x37260
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_O1/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 0x106a4
movslq %ebp, %r14
movq 0x2bd8(%rbx), %rax
movsd (%rax,%r14,8), %xmm0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1070c
jmp 0x106f6
xorpd %xmm0, %xmm0
callq 0x3290
movl $0x1, %r14d
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
divsd 0x26b9f(%rip), %xmm0    # 0x37268
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1070c
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x1aa59
incl %r14d
cmpl $0x65, %r14d
jne 0x106b3
addsd 0x26bed(%rip), %xmm0    # 0x372e0
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_O1/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 0x1d14f(%rip), %xmm2    # 0x37bb8
ja 0x1aac0
movapd %xmm1, %xmm3
subsd %xmm0, %xmm3
ucomisd 0x1d13d(%rip), %xmm3    # 0x37bb8
jbe 0x1aa82
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 0x1c7ae(%rip), %xmm0    # 0x37260
callq 0x3290
addsd (%rsp), %xmm0
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rdx
movq 0x8(%rdi), %rax
cmpq %rax, %rdx
sete %sil
movq %rdx, %rcx
addq $0x8, %rcx
cmpq %rax, %rcx
sete %dil
orb %sil, %dil
je 0x1aaf1
movq %rdx, %rsi
jmp 0x1ab0d
movsd (%rdx), %xmm0
ucomisd (%rcx), %xmm0
movq %rcx, %rsi
ja 0x1ab01
movq %rdx, %rsi
addq $0x8, %rcx
movq %rsi, %rdx
cmpq %rax, %rcx
jne 0x1aaf1
movsd (%rsi), %xmm1
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
testl %ecx, %ecx
movsd %xmm1, 0x8(%rsp)
xorpd %xmm2, %xmm2
jle 0x1ab81
xorl %r14d, %r14d
movsd %xmm2, 0x10(%rsp)
movsd (%rax,%r14,8), %xmm0
subsd %xmm1, %xmm0
callq 0x35a0
movsd 0x10(%rsp), %xmm2
movsd 0x1c70d(%rip), %xmm1    # 0x37260
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 0x1ab30
sarq $0x3, %rcx
movq %rcx, %xmm0
punpckldq 0x1cff2(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1cffa(%rip), %xmm0    # 0x37b90
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_O1/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 0x5916
movq (%r14), %rdx
movq 0x8(%r14), %rax
cmpq %rax, %rdx
sete %sil
movq %rdx, %rcx
addq $0x8, %rcx
cmpq %rax, %rcx
sete %dil
orb %sil, %dil
je 0x1ac0f
movq %rdx, %rsi
jmp 0x1ac2b
movsd (%rcx), %xmm0
ucomisd (%rdx), %xmm0
movq %rcx, %rsi
ja 0x1ac1f
movq %rdx, %rsi
addq $0x8, %rcx
movq %rsi, %rdx
cmpq %rax, %rcx
jne 0x1ac0f
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x1ac93
movsd (%rsi), %xmm0
movsd %xmm0, 0x10(%rsp)
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
movsd %xmm1, 0x18(%rsp)
movsd (%rcx,%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), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
shrq $0x3, %rax
movslq %eax, %rdx
cmpq %rdx, %r15
jl 0x1ac4e
jmp 0x1ac97
xorpd %xmm1, %xmm1
testl %eax, %eax
jle 0x1acb8
movq (%rbx), %rcx
movl %eax, %eax
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1aca2
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x25f8e(%rip), %rsi     # 0x41fa8
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 0x1c059
movsd 0x1bb0a(%rip), %xmm0    # 0x37b58
addsd %xmm1, %xmm0
callq 0x3070
jmp 0x1c06a
movsd 0x1b25f(%rip), %xmm0    # 0x372c0
addsd %xmm1, %xmm0
callq 0x3500
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1c096
jp 0x1c096
cvttsd2si %xmm1, %eax
movl %eax, (%r15)
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bbf7(%rip), %rsi     # 0x37c94
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xf984
leaq 0x1bc4d(%rip), %rsi     # 0x37d01
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 0x1c0df
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
jmp 0x1c0ec
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 0x1db5c
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 0x1c149
callq 0x3310
jmp 0x1c149
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c17f
callq 0x3310
jmp 0x1c17f
movq %rax, %rbx
movq 0x25e40(%rip), %rsi     # 0x41fa8
leaq 0x30(%rsp), %rdi
callq 0x3420
leaq 0xa8(%rsp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
cmpl $0x1, %esi
jne 0x1c525
movq (%rdi), %rax
jmp 0x1c628
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), %r9
leaq 0x4(%rax), %rdx
movq %rax, %r10
testq $-0x5, %r9
je 0x1c58a
addq $-0x8, %rdi
movq %rdx, %r9
movq %rax, %r11
movl (%r11), %ebx
movq %r9, %r10
cmpl (%r9), %ebx
jl 0x1c57d
movq %r11, %r10
addq $0x4, %r9
movq %r10, %r11
addq $-0x4, %rdi
jne 0x1c56f
shrq $0x2, %rcx
movl (%r10), %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 0x1c623
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 0x1c5f9
leaq -0x8(%rdi), %r10
xorl %r11d, %r11d
movq %rax, %r8
movl (%r8), %ebx
cmpl 0x4(%rax,%r11), %ebx
jge 0x1c5f0
leaq (%rdx,%r11), %r8
addq $0x4, %r11
cmpq %r11, %r10
jne 0x1c5e2
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 0x1c5ba
cmpl $0x1, %ecx
jne 0x1c62e
movl $0x0, (%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2593c(%rip), %rsi     # 0x41f90
leaq 0x1b755(%rip), %rcx     # 0x37db0
movl $0x1358, %edx           # imm = 0x1358
xorl %eax, %eax
callq 0x1ce4e
movsd 0x18(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1c67e
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rdx
leaq 0x1d3aa(%rip), %rcx     # 0x39a33
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3460
jmp 0x1c673
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x1c6af
callq 0x3310
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1cd6b
movsd 0x1af02(%rip), %xmm1    # 0x37bc8
ucomisd %xmm0, %xmm1
jbe 0x1cce9
callq 0x1ca6a
andpd 0x1ae97(%rip), %xmm0    # 0x37b70
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
jmp 0x3290
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x1a567(%rip), %xmm2    # 0x37260
divsd %xmm1, %xmm2
movsd 0x1aeeb(%rip), %xmm1    # 0x37bf0
movl $0x6, %eax
leaq 0x1b12f(%rip), %rcx     # 0x37e40
mulsd %xmm2, %xmm1
addsd (%rcx,%rax,8), %xmm1
addq $-0x1, %rax
jb 0x1cd11
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x1ae26(%rip), %xmm1    # 0x37b58
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x3290
mulsd 0x8(%rsp), %xmm0
subsd (%rsp), %xmm0
addsd 0x1ae9f(%rip), %xmm0    # 0x37bf8
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 0x1aff5(%rip), %rsi     # 0x37d7b
movl $0x17, %edx
movq %rbx, %rdi
callq 0x3390
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x34a0
leaq 0x1afec(%rip), %rsi     # 0x37d93
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 0x251e7(%rip), %rsi     # 0x41fd0
movq 0x251d0(%rip), %rdx     # 0x41fc0
movq %rbx, %rdi
callq 0x3540
movq %rax, %r14
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ce16
callq 0x3310
jmp 0x1ce16
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1ce28
movq %rbx, %rdi
callq 0x3230
jmp 0x1ce28
movq %rax, %r14
movq 0x25151(%rip), %rsi     # 0x41f80
leaq 0x38(%rsp), %rdi
callq 0x3250
leaq 0xb8(%rsp), %rdi
callq 0x30f0
movq %r14, %rdi
callq 0x3580