LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/bots/bot.cpp
// Function: Bot::ChooseMinigame()
Minigame Bot::ChooseMinigame() {
	// Choose a minigame
	Minigame game = onChooseMinigame();
	auto it = find(games.begin(), games.end(), game);

	assert(it != games.end());

	games.erase(it); //TODO: Check if game in games

	return game;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq 0x68(%rbx), %rdi
movq 0x70(%rbx), %rsi
callq 0x4c0e
cmpq 0x70(%rbx), %rax
je 0x3ecd
addq $0x68, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4184
movl 0xc(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x821b(%rip), %rdi      # 0xc0ef
leaq 0x8226(%rip), %rsi      # 0xc101
leaq 0x8227(%rip), %rcx      # 0xc109
pushq $0x39
popq %rdx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/bots/bot.cpp
// Function: Bot::RoundStart(int)
void Bot::RoundStart(int gameIndex) {
	// Update current game and call virtual method
	currentGame = static_cast<Minigame>(gameIndex);
	
	//TODO: Remove this line
	dumpInfo();

	onRoundStart();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x30(%rdi)
callq 0x3bea
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *0x20(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/bots/bot.cpp
// Function: Bot::RoundEnd(std::vector<int, std::allocator<int>>)
void Bot::RoundEnd(std::vector<int> scores) {
	// Round ended; empty your hand, update scores

	hand.clear();
	cardsOnTable.clear();
	this->scores = scores;

	onRoundEnd();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rax
cmpq %rax, 0x58(%rdi)
je 0x3f1e
movq %rax, 0x58(%rbx)
movq 0x80(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x3f35
movq %rax, 0x88(%rbx)
leaq 0x38(%rbx), %rdi
callq 0x41be
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *0x38(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/bots/bot.cpp
// Function: Bot::PlayCard()
Card Bot::PlayCard() {
	// Play a card and erase it from your hand

	//TODO: Remove this line
	dumpInfo();

  Card use = onPlayCard();
  hand.erase(find(hand.begin(), hand.end(), use)); //TODO: Check if card in hand
  return use;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3bea
movq (%rbx), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
leaq 0x50(%rbx), %r15
movq 0x50(%rbx), %rdi
movq 0x58(%rbx), %rsi
movq %r14, %rdx
callq 0x4cc7
movq %r15, %rdi
movq %rax, %rsi
callq 0x4288
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/util/card.cpp
// Function: Card::to_string[abi:cxx11]() const
std::string Card::to_string() const {
    std::string s;

    switch(value) {
        case 10: s += "10"; break;
        case 11: s += "J"; break;
        case 12: s += "Q"; break;
        case 13: s += "K"; break;
        case 14: s += "A"; break;
        default: s += (char)(value + '0'); break;
    }

    s += suite;

    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl (%rsi), %eax
leal -0xa(%rax), %ecx
cmpl $0x5, %ecx
jae 0x4ffa
movl %ecx, %eax
leaq 0x721f(%rip), %rcx      # 0xc208
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x33e0
jmp 0x5007
addb $0x30, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x31f0
movsbl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x31f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/util/card.cpp
// Function: Card::suiteIndex() const
int Card::suiteIndex() const {
  for(int i = 0; i < 4; ++i) {
    if(suites[i] == suite)
      return i;
  }
  assert(false);
}

// Assembly:
movb 0x4(%rdi), %cl
xorl %eax, %eax
leaq 0x70ee(%rip), %rdx      # 0xc200
cmpq $0x4, %rax
je 0x5123
cmpb %cl, (%rax,%rdx)
je 0x5122
incq %rax
jmp 0x5112
retq
pushq %rax
leaq 0x70a8(%rip), %rdi      # 0xc1d3
leaq 0x70a7(%rip), %rsi      # 0xc1d9
leaq 0x70a9(%rip), %rcx      # 0xc1e2
pushq $0x3f
popq %rdx
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/util/card.cpp
// Function: Card::encode() const
uint8_t Card::encode() const {
  uint8_t ret = value;
  //the last 4 bits represent the value
  ret |= suiteIndex() << 4;
  //the next 2 bits represent the suite
  return ret;
}

// Assembly:
pushq %rbx
movl (%rdi), %ebx
callq 0x5106
shll $0x4, %eax
orl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/util/card.cpp
// Function: Card::getAllCards()
std::vector<Card> Card::getAllCards() {
      std::vector<Card> allCards;

      for(int i=lowestCard;i<=14;++i)
          for(char j=0;j<4;++j)
            allCards.push_back(Card(i, Card::suites[(int)j]));

      return allCards;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl 0xe0ae(%rip), %ebp      # 0x13220
leaq 0x7087(%rip), %r15      # 0xc200
leaq 0x8(%rsp), %r14
cmpl $0xe, %ebp
jg 0x51af
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x51ab
movsbl (%r12,%r15), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x4e8c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x531e
incq %r12
jmp 0x5186
incl %ebp
jmp 0x517e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x43ce
movq %r14, %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/./event.h
// Function: event::init(unsigned char*)
void init(uint8_t *ptr) {
    assert(ptr[0] == FLAG);
    //first FLAG should mark the frame's beginning
    
    ++ptr;

    type = getInt(ptr);
    ptr += 4;
    len = getInt(ptr);
    ptr += 4;

    data = new uint8_t[len];
    uint8_t * at = (uint8_t *)ptr;

    for(size_t i = 0; i < len; ++i) {
      data[i] = *at;
      ++at;
    }

    assert(*at == FLAG);
    //last FLAG should mark the frame's end
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x7e, (%rsi)
jne 0x58c2
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1(%rsi), %eax
bswapl %eax
movl %eax, (%rdi)
movl 0x5(%rsi), %r15d
bswapl %r15d
movq %r15, 0x8(%rdi)
movq %r15, %rdi
callq 0x3030
movq %rax, 0x10(%r14)
xorl %eax, %eax
movb 0x9(%rbx,%rax), %cl
cmpq %r15, %rax
jae 0x58b7
movq 0x10(%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq 0x8(%r14), %r15
jmp 0x589e
cmpb $0x7e, %cl
jne 0x58df
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6a94(%rip), %rdi      # 0xc35d
leaq 0x6a9c(%rip), %rsi      # 0xc36c
leaq 0x6a9f(%rip), %rcx      # 0xc376
pushq $0x70
popq %rdx
callq 0x3180
leaq 0x6aac(%rip), %rdi      # 0xc392
leaq 0x6a7f(%rip), %rsi      # 0xc36c
leaq 0x6a82(%rip), %rcx      # 0xc376
movl $0x82, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/client.cpp
// Function: addOptions(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
bool
addOptions(std::vector<std::string> &args,
    std::unordered_map<std::string, std::string> &opts,
    const std::string &opt_name,
    const std::vector<std::string> &aliases) {

  std::string s = args.back();

  if(!in(s, aliases))
    return false;

  args.pop_back();

  if(args.empty())
    return false;

  opts[opt_name] = args.back();

  args.pop_back();
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
addq $-0x20, %rsi
movq %rsp, %r13
movq %r13, %rdi
callq 0x3320
movq %r13, %rdi
movq %r12, %rsi
callq 0x6160
testb %al, %al
je 0x5cce
movq %rbx, %rdi
callq 0x617c
movq 0x8(%rbx), %r12
cmpq %r12, (%rbx)
je 0x5cce
movq %r15, %rdi
movq %r14, %rsi
callq 0xb07a
addq $-0x20, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x3150
movq %rbx, %rdi
callq 0x617c
movb $0x1, %bl
jmp 0x5cd0
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x3120
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/client.cpp
// Function: Client::handshake(char*)
void handshake(char *name) {

    event e = readEvent();
    assert(e.type = event::EType::HANDSHAKE);
    uint8_t playerCount = e.data[0];
    e.free();

    e.len = strlen(name);
    e.data = reinterpret_cast<uint8_t *>(name);

    e.send(sfd);


    e = readEvent();
    assert(e.type == event::EType::SEND_INIT);
    assert(e.len == 4);

    index = ntohl(*(reinterpret_cast<uint32_t *>(e.data)));

    e.free();
    e.len = 0;
    e.data = NULL;
    e.send(sfd);

    printf("Our index is %d\n", index);

    //Initialize bot
    bot->Init(index, playerCount);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5780
movl $0x9, (%r14)
movq 0x10(%r14), %rax
movzbl (%rax), %ebp
movq %r14, %rdi
callq 0x7520
movq %r15, %rdi
callq 0x3100
movq %rax, 0x8(%r14)
movq %r15, 0x10(%r14)
movl 0x201c(%rbx), %esi
movq %r14, %rdi
callq 0x72da
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5780
movq 0x10(%r15), %rax
movq %rax, 0x10(%r14)
movups (%r15), %xmm0
movaps %xmm0, (%r14)
cmpl $0x8, (%r14)
jne 0x724a
cmpq $0x4, 0x8(%rsp)
jne 0x7269
leaq 0x8(%rsp), %r15
movq 0x8(%r15), %rax
movl (%rax), %eax
bswapl %eax
movl %eax, 0x2020(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x7520
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movl 0x201c(%rbx), %esi
movq %r14, %rdi
callq 0x72da
movl 0x2020(%rbx), %esi
leaq 0x553a(%rip), %rdi      # 0xc75e
xorl %eax, %eax
callq 0x3050
movq 0x2028(%rbx), %rdi
movl 0x2020(%rbx), %esi
movl %ebp, %edx
callq 0x3b5c
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54e0(%rip), %rdi      # 0xc731
leaq 0x54af(%rip), %rsi      # 0xc707
leaq 0x54b3(%rip), %rcx      # 0xc712
movl $0xfa, %edx
callq 0x3180
leaq 0x54e3(%rip), %rdi      # 0xc753
leaq 0x5490(%rip), %rsi      # 0xc707
leaq 0x5494(%rip), %rcx      # 0xc712
movl $0xfb, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/./event.h
// Function: event::getCards()
std::vector<Card> getCards() {
		std::vector<Card> cards;

		for(uint32_t i = 0; i < len; ++i)
      cards.emplace_back(data[i]);

		return cards;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x72be
movq 0x10(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xac14
incl %r15d
jmp 0x72a1
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x43ce
movq %r14, %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/./event.h
// Function: event::send(int)
void send(int fd) {
    std::vector<uint8_t> header(8, 0);
    ((uint32_t *)header.data())[0] = htonl(type);
    ((uint32_t *)header.data())[1] = htonl(len);

    std::vector<uint8_t> message;
    message.reserve(8 + len + 2);
    message.push_back(FLAG);

    for(auto &b: header) {
      append(b);
    }

    for(size_t i = 0; i < len; ++i) {
      uint8_t b = data[i];
      append(b);
    }

    message.push_back(FLAG);

    int rem = message.size();
    uint8_t *at = message.data();

    while(rem > 0) {
      const int n = ::send(fd, at, rem, 0);
      rem -= n;
      at += n;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movb $0x0, (%r15)
leaq 0x30(%rsp), %r12
pushq $0x8
popq %rsi
leaq 0xe(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rdx
callq 0xad42
movl (%r14), %eax
bswapl %eax
movq (%r12), %rcx
movl %eax, (%rcx)
movq 0x8(%r14), %rsi
movl %esi, %eax
bswapl %eax
movl %eax, 0x4(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
addq $0xa, %rsi
leaq 0x10(%rsp), %rdi
callq 0x57e4
leaq 0x5483(%rip), %rsi      # 0xc7c8
leaq 0x10(%rsp), %rdi
callq 0xada0
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0xe(%rsp), %rbp
cmpq %r12, %r15
je 0x73a6
movb (%r15), %al
addb $-0x7d, %al
cmpb $0x1, %al
ja 0x7396
movq %r13, %rdi
leaq 0x544e(%rip), %rsi      # 0xc7c9
callq 0xada0
movb (%r15), %al
xorb $0x20, %al
movb %al, 0xe(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5952
jmp 0x73a1
movq %r13, %rdi
movq %r15, %rsi
callq 0xada0
incq %r15
jmp 0x7363
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %r13
leaq 0xe(%rsp), %rbp
cmpq 0x8(%r14), %r15
jae 0x7406
movq 0x10(%r14), %rax
movb (%rax,%r15), %al
movb %al, 0xe(%rsp)
addb $-0x7d, %al
cmpb $0x1, %al
ja 0x73f6
movq %r12, %rdi
leaq 0x53ef(%rip), %rsi      # 0xc7c9
callq 0xada0
movb 0xe(%rsp), %al
xorb $0x20, %al
movb %al, 0xf(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5952
jmp 0x7401
movq %r12, %rdi
movq %rbp, %rsi
callq 0xada0
incq %r15
jmp 0x73b8
leaq 0x53bb(%rip), %rsi      # 0xc7c8
leaq 0x10(%rsp), %rdi
callq 0xada0
movl 0x18(%rsp), %ebp
movq 0x10(%rsp), %r14
subl %r14d, %ebp
testl %ebp, %ebp
jle 0x743e
movl %ebp, %edx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3130
subl %eax, %ebp
cltq
addq %rax, %r14
jmp 0x7423
leaq 0x10(%rsp), %rdi
callq 0x58fe
leaq 0x30(%rsp), %rdi
callq 0x58fe
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x746b
jmp 0x746b
jmp 0x746b
jmp 0x746b
jmp 0x746b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x58fe
leaq 0x30(%rsp), %rdi
callq 0x58fe
movq %rbx, %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/sampleSNPs.cpp
// Function: parseCL(int&, char**, std::unordered_map<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void parseCL(int &argc, char **argv, unordered_map<char, string> &cli){
	// set to true after encountering a flag token (the character after the dash)
	bool val = false;
	// store the token value here
	char curFlag;

	for (int iArg = 1; iArg < argc; iArg++) {
		const char *pchar = argv[iArg];

		if (pchar[0] == '-') { // encountered the dash, look for the token after it
			if (!pchar[1]) {
				cerr << "WARNING: forgot character after dash. Ignoring." << endl;
				continue;
			}
			// what follows the dash?
			val     = true;
			curFlag = pchar[1];

		} else {
			if (val) {
				val = false;
				cli[curFlag] = pchar;
			} else {
				cerr << "WARNING: command line value " << pchar << " ignored because it is not preceded by a flag" << endl;
			}

		}

	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbp
xorl %r12d, %r12d
movslq (%r15), %rax
cmpq %rax, %rbp
jge 0x490b
movq (%r14,%rbp,8), %r13
cmpb $0x2d, (%r13)
jne 0x488e
movb 0x1(%r13), %al
testb %al, %al
je 0x48e8
movb %al, 0x7(%rsp)
movb $0x1, %r12b
jmp 0x4903
testb $0x1, %r12b
je 0x48ae
movq %rbx, %rdi
leaq 0x7(%rsp), %rsi
callq 0x6292
movq %rax, %rdi
movq %r13, %rsi
callq 0x4520
jmp 0x48e3
movq 0x1773b(%rip), %rdi     # 0x1bff0
leaq 0xf778(%rip), %rsi      # 0x14034
callq 0x42a0
movq %rax, %rdi
movq %r13, %rsi
callq 0x42a0
movq %rax, %rdi
leaq 0xf77b(%rip), %rsi      # 0x14051
callq 0x42a0
movq %rax, %rdi
callq 0x4140
xorl %r12d, %r12d
jmp 0x4903
movq 0x17701(%rip), %rdi     # 0x1bff0
leaq 0xf70e(%rip), %rsi      # 0x14004
callq 0x42a0
movq %rax, %rdi
callq 0x4140
incq %rbp
jmp 0x4866
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::GbinFileI::_numLines()
uint64_t GbinFileI::_numLines(){

    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in | ios::binary | ios::ate);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for input" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open binary file " << _fileName << " for input: " << error.code().message() << flush;
        perror(" ");
        exit(1);

    }
    size_t Ntot = _varFile.tellg();
    _varFile.close();
    if (Ntot % (_elemSize*_nCols)) {
        throw string("Number of elements not divisible by row size");
    }
    return Ntot/(_elemSize*_nCols);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r12
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x6705
movq %r15, %rdi
callq 0x4050
leaq 0x218(%r14), %rbx
movq 0x218(%r14), %rsi
pushq $0xe
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x6765
movq %r15, %rdi
callq 0x44b0
movq %rax, %rbx
movq %r15, %rdi
callq 0x4050
movq 0x238(%r14), %rcx
imulq 0x240(%r14), %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x67a2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x15884(%rip), %rdi     # 0x1bff0
leaq 0xdddd(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xdde2(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
pushq $0x20
popq %rdi
callq 0x4150
movq %rax, %rbx
leaq 0xdde3(%rip), %rsi      # 0x14597
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0x5d1e
leaq 0x15100(%rip), %rsi     # 0x1b8c8
movq 0x157f1(%rip), %rdx     # 0x1bfc0
movq %rbx, %rdi
callq 0x44a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4200
jmp 0x688c
movq %rax, %r14
cmpl $0x1, %edx
jne 0x688c
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x157eb(%rip), %rdi     # 0x1bff0
leaq 0xdd6b(%rip), %rsi      # 0x14577
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xe1da(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
leaq 0x8(%rsp), %rdi
callq 0x4558
leaq 0xdfab(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x679c
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0x6887
jmp 0x6884
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::GbinFileI::open()
void GbinFileI::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in | ios::binary);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for input" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open binary file " << _fileName << " for input: " << error.code().message() << flush;
        perror(" ");
        exit(1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x68eb
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0xc
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x691a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x156cf(%rip), %rdi     # 0x1bff0
leaq 0xdc28(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xdc2d(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x69f4
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x1567b(%rip), %rdi     # 0x1bff0
leaq 0xdbfb(%rip), %rsi      # 0x14577
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xe06a(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0xde41(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x6951
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x69ef
jmp 0x69ec
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::GbinFileO::open()
void GbinFileO::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::out | ios::binary);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for output" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open binary file " << _fileName << " for output: " << error.code().message() << flush;
        perror(" ");
        exit(1);

    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x7253
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x14
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x7282
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x14d67(%rip), %rdi     # 0x1bff0
leaq 0xd2c0(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xd43b(%rip), %rsi      # 0x146e2
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x735c
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x14d13(%rip), %rdi     # 0x1bff0
leaq 0xd293(%rip), %rsi      # 0x14577
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0xd3f3(%rip), %rsi      # 0x146ee
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0xd4d9(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x72b9
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x7357
jmp 0x7354
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::BedFile::BedFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
BedFile::BedFile(const string &stubName) : GbinFile(), _fileStub{stubName} {
	_fileName = _fileStub + ".bed";
    _bimFile.exceptions(fstream::badbit);
	_famFile.exceptions(fstream::badbit);
    // _elemSize is set to sizeof(char) in the GbinFile default constructor
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x1205e
leaq 0x14499(%rip), %rax     # 0x1b8e8
movq %rax, (%rbx)
leaq 0x248(%rbx), %r14
movq %r14, %rdi
callq 0x4300
leaq 0x458(%rbx), %r15
movq %r15, %rdi
callq 0x4300
leaq 0x668(%rbx), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x43b0
leaq 0xd2a4(%rip), %rdx      # 0x1472d
movq %rsp, %rdi
movq %r12, %rsi
callq 0x5e08
leaq 0x218(%rbx), %rdi
movq %rsp, %r13
movq %r13, %rsi
callq 0x4320
movq %r13, %rdi
callq 0x4558
movq 0x458(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x40f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x40f0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x74f5
movq %rax, %r13
jmp 0x7500
movq %rax, %r13
jmp 0x7508
movq %rax, %r13
jmp 0x7510
movq %rax, %r13
movq %r12, %rdi
callq 0x4558
movq %r15, %rdi
callq 0x4090
movq %r14, %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x120a4
movq %r13, %rdi
callq 0x44d0
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::BedFile::~BedFile()
BedFile::~BedFile(){
    if (_bimFile.is_open()) {
        _bimFile.close();
    }
    if (_famFile.is_open()) {
        _famFile.close();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x143b9(%rip), %rax     # 0x1b8e8
movq %rax, (%rdi)
leaq 0x458(%rdi), %r14
addq $0x4d8, %rdi            # imm = 0x4D8
callq 0x40b0
testb %al, %al
je 0x7551
movq %r14, %rdi
callq 0x4050
leaq 0x248(%rbx), %r15
leaq 0x2c8(%rbx), %rdi
callq 0x40b0
testb %al, %al
je 0x7570
movq %r15, %rdi
callq 0x4050
leaq 0x668(%rbx), %rdi
callq 0x4558
movq %r14, %rdi
callq 0x4090
movq %r15, %rdi
callq 0x4090
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x120a4
movq %rax, %rdi
callq 0x6194
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::BedFile::close()
void BedFile::close(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    if (_bimFile.is_open()) {
        _bimFile.close();
    }
    if (_famFile.is_open()) {
        _famFile.close();
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x88, %rdi
callq 0x40b0
testb %al, %al
je 0x75bf
leaq 0x8(%rbx), %rdi
callq 0x4050
leaq 0x4d8(%rbx), %rdi
callq 0x40b0
testb %al, %al
je 0x75db
leaq 0x458(%rbx), %rdi
callq 0x4050
leaq 0x2c8(%rbx), %rdi
callq 0x40b0
testb %al, %al
je 0x75fb
addq $0x248, %rbx            # imm = 0x248
movq %rbx, %rdi
popq %rbx
jmp 0x4050
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::GtxtFileI::open()
void GtxtFileI::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for input" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open text file " << _fileName << " for input: " << error.code().message() << flush;
        perror(" ");
        exit(1);

    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0xd971
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0xd9a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xe649(%rip), %rdi      # 0x1bff0
leaq 0x6ba2(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x6ba7(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0xda7a
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xe5f5(%rip), %rdi      # 0x1bff0
leaq 0x71b1(%rip), %rsi      # 0x14bb3
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x6fe4(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0x6dbb(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0xd9d7
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0xda75
jmp 0xda72
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::GtxtFileO::open()
void GtxtFileO::open(){
    try {
        _varFile.open(_fileName.c_str(), ios::out);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open file " << _fileName << " for output" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open text file " << _fileName << " for output: " << error.code().message() << flush;
        perror(" ");
        exit(1);

    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
addq $0x8, %rdi
leaq 0x218(%r14), %rbx
movq 0x218(%r14), %rsi
pushq $0x10
popq %rdx
callq 0x4280
addq $0x88, %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0xeb0b
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0xd4de(%rip), %rdi      # 0x1bff0
leaq 0x5a37(%rip), %rsi      # 0x14550
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x5bb2(%rip), %rsi      # 0x146e2
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0xebed
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xd48a(%rip), %rdi      # 0x1bff0
leaq 0x6046(%rip), %rsi      # 0x14bb3
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x5b6a(%rip), %rsi      # 0x146ee
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
leaq 0x8(%rsp), %rdi
callq 0x4558
leaq 0x5c4a(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0xeb42
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0xebe8
jmp 0xebe5
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::TpedFile::close()
void TpedFile::close(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    if (_tfamFile.is_open()) {
        _tfamFile.close();
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x88, %rdi
callq 0x40b0
testb %al, %al
je 0xec77
leaq 0x8(%rbx), %rdi
callq 0x4050
leaq 0x2c0(%rbx), %rdi
callq 0x40b0
testb %al, %al
je 0xec97
addq $0x240, %rbx            # imm = 0x240
movq %rbx, %rdi
popq %rbx
jmp 0x4050
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::VcfFileI::open()
void VcfFileI::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
		_varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open .vcf file " << _fileName << " for input" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open VCF file " << _fileName << " for input: " << error.code().message() << flush;
		perror(" ");
		exit(1);

	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x10947
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x10976
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xb673(%rip), %rdi      # 0x1bff0
leaq 0x4414(%rip), %rsi      # 0x14d98
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x3bd1(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x10a50
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xb61f(%rip), %rdi      # 0x1bff0
leaq 0x443b(%rip), %rsi      # 0x14e13
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x400e(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0x3de5(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x109ad
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x10a4b
jmp 0x10a48
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::VcfFileO::open()
void VcfFileO::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
		_varFile.open(_fileName.c_str(), ios::out);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open .vcf file " << _fileName << " for output" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open VCF file " << _fileName << " for output: " << error.code().message() << flush;
		perror(" ");
		exit(1);

	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x111cb
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x111fa
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xadef(%rip), %rdi      # 0x1bff0
leaq 0x3b90(%rip), %rsi      # 0x14d98
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x34c3(%rip), %rsi      # 0x146e2
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x112d4
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xad9b(%rip), %rdi      # 0x1bff0
leaq 0x3bb7(%rip), %rsi      # 0x14e13
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x347b(%rip), %rsi      # 0x146ee
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0x3561(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x11231
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x112cf
jmp 0x112cc
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::HmpFileI::HmpFileI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
HmpFileI::HmpFileI(const string &fileName) : HmpFile(fileName) {
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
        _varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open HMP file " << _fileName << " for input" << endl;
			exit(2);
		}

    } catch (system_error &error) {
        cerr << "ERROR: cannot open HMP file " << _fileName << " for input: " << error.code().message() << flush;
        perror(" ");
        exit(1);

    }
    char buf[3];
    _varFile.read(buf, 3);
    if ( (buf[0] == 'r') && (buf[1] == 's') && (buf[2] == '#') ) {
        _head = true;
    }
    _varFile.close();

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x61ba
leaq 0xa606(%rip), %rax      # 0x1b928
movq %rax, (%rbx)
leaq 0x8(%rbx), %r15
leaq 0x88(%rbx), %r12
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x11344
movq %r15, %rdi
callq 0x4050
leaq 0x218(%rbx), %r14
movq 0x218(%rbx), %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r12, %rdi
callq 0x40b0
testb %al, %al
je 0x113a9
leaq 0x8(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x4340
cmpb $0x72, 0x8(%rsp)
jne 0x11395
cmpb $0x73, 0x9(%rsp)
jne 0x11395
cmpb $0x23, 0xa(%rsp)
jne 0x11395
movb $0x1, 0x238(%rbx)
movq %r15, %rdi
callq 0x4050
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xac40(%rip), %rdi      # 0x1bff0
leaq 0x3ab7(%rip), %rsi      # 0x14e6e
callq 0x42a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x4270
leaq 0x319e(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
jmp 0x1149a
movq %rax, %r15
cmpl $0x1, %edx
jne 0x1149d
movq %r15, %rdi
callq 0x4110
movq %rax, %r15
movq 0xabe7(%rip), %rdi      # 0x1bff0
leaq 0x3a7e(%rip), %rsi      # 0x14e8e
callq 0x42a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x4270
leaq 0x35d6(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %r14
movq 0x18(%r15), %rsi
movl 0x10(%r15), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
leaq 0x8(%rsp), %rdi
callq 0x4558
leaq 0x33a7(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x113e0
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4558
jmp 0x1148b
jmp 0x11488
movq %rax, %r15
callq 0x4470
jmp 0x1149d
movq %rax, %rdi
callq 0x6194
movq %rax, %r15
movq %rbx, %rdi
callq 0x5f14
movq %r15, %rdi
callq 0x44d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::HmpFileI::open()
void HmpFileI::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
		_varFile.open(_fileName.c_str(), ios::in);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open HMP file " << _fileName << " for input" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open HMP file " << _fileName << " for input: " << error.code().message() << flush;
		perror(" ");
		exit(1);
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x114d9
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x11508
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xaae1(%rip), %rdi      # 0x1bff0
leaq 0x3958(%rip), %rsi      # 0x14e6e
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x303f(%rip), %rsi      # 0x1456c
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x115e2
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xaa8d(%rip), %rdi      # 0x1bff0
leaq 0x3924(%rip), %rsi      # 0x14e8e
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x347c(%rip), %rsi      # 0x149fd
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0x3253(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x1153f
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x115dd
jmp 0x115da
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/varfiles.cpp
// Function: sampFiles::HmpFileO::open()
void HmpFileO::open(){
    if (_varFile.is_open()) {
        _varFile.close();
    }
    try {
		_varFile.open(_fileName.c_str(), ios::out);
		if (!_varFile.is_open()) {
			cerr << "ERROR: failed to open HMP file " << _fileName << " for output" << endl;
			exit(2);
		}

	} catch (system_error &error) {
		cerr << "ERROR: cannot open HMP file " << _fileName << " for output: " << error.code().message() << flush;
		perror(" ");
		exit(1);

	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x11f45
movq %r15, %rdi
callq 0x4050
movq 0x218(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x40b0
testb %al, %al
je 0x11f74
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xa075(%rip), %rdi      # 0x1bff0
leaq 0x2eec(%rip), %rsi      # 0x14e6e
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x2749(%rip), %rsi      # 0x146e2
movq %rax, %rdi
callq 0x42a0
movq %rax, %rdi
callq 0x4140
pushq $0x2
popq %rdi
callq 0x4310
movq %rax, %r14
cmpl $0x1, %edx
jne 0x1204e
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xa021(%rip), %rdi      # 0x1bff0
leaq 0x2eb8(%rip), %rsi      # 0x14e8e
callq 0x42a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x2701(%rip), %rsi      # 0x146ee
movq %rax, %rdi
callq 0x42a0
movq %rax, %rbx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41c0
movq %rsp, %rdi
callq 0x4558
leaq 0x27e7(%rip), %rdi      # 0x14812
callq 0x4250
pushq $0x1
jmp 0x11fab
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
jmp 0x12049
jmp 0x12046
movq %rax, %r14
callq 0x4470
movq %r14, %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x6194
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/random.cpp
// Function: sampFiles::GenerateMT::GenerateMT()
GenerateMT::GenerateMT(){
	// start by using RDTSC to set the seed
	unsigned int lo = 0;
	unsigned int hi = 0;
	uint64_t seed   = 0;
	asm volatile ("rdtsc;"
				   : "=a" (lo), "=d" (hi)
	);
	seed = (static_cast<uint64_t>(hi)<<32)|lo;
	uint64_t f = 6364136223846793005ULL;
	_mt[0]     = seed;
	_mti       = 1;
	
	for (; _mti < _n; _mti++) {
		_mt[_mti] = (f * (_mt[_mti - 1]^(_mt[_mti - 1] >> 62)) + _mti);
	}
	
}

// Assembly:
leaq 0x92f3(%rip), %rax      # 0x1bd28
movq %rax, (%rdi)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x8(%rdi)
pushq $0x1
popq %rcx
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
movq %rcx, 0x9c8(%rdi)
cmpq $0x137, %rcx            # imm = 0x137
ja 0x12a8a
movq (%rdi,%rcx,8), %rdx
movq %rdx, %rsi
shrq $0x3e, %rsi
xorq %rdx, %rsi
imulq %rax, %rsi
addq %rcx, %rsi
movq %rsi, 0x8(%rdi,%rcx,8)
movq 0x9c8(%rdi), %rcx
incq %rcx
jmp 0x12a54
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/random.cpp
// Function: sampFiles::GenerateMT::ranInt()
volatile uint64_t GenerateMT::ranInt(){
	
	if (_mti == _n) { // do we need to re-run the twister?
		size_t i = 0;
		for (; i < _n - _m; i++) { // first _m words
			_x     = (_mt[i]&_um)|(_mt[i + 1]&_lm);
			_mt[i] = _mt[i + _m]^(_x>>1)^_alt[static_cast<size_t>(_x&1ULL)];
		}
		for (; i < _n - 1; i++) { // rest, except for the last element
			_x     = (_mt[i]&_um)|(_mt[i+1]&_lm);
			_mt[i] = _mt[i + (_m - _n)] ^ (_x>>1)^_alt[static_cast<size_t>(_x&1ULL)];
		}
		// now set the last element
		_x          = (_mt[_n - 1]&_um)|(_mt[0]&_lm);
		_mt[_n - 1] = _mt[_m - 1]^(_x>>1)^_alt[static_cast<size_t>(_x&1ULL)];
		
		_mti = 0;

	}
	// extract pseudo-random number
	_x = _mt[_mti++];
	
	_x ^= ((_x>>_u)&_d);
	_x ^= ((_x<<_s)&_b);
	_x ^= ((_x<<_t)&_c);
	_x ^= (_x>>_l);
	
	return _x;
}

// Assembly:
movq 0x9c8(%rdi), %rax
cmpq $0x138, %rax            # imm = 0x138
jne 0x12b93
movq $-0x4e0, %rcx           # imm = 0xFB20
movq $-0x80000000, %rdx      # imm = 0x80000000
leaq 0x26fc(%rip), %rax      # 0x151b0
testq %rcx, %rcx
je 0x12b00
movq 0x4e8(%rdi,%rcx), %rsi
movl %esi, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq 0x4f0(%rdi,%rcx), %r9
andq %rdx, %r9
orq %r8, %r9
movq %r9, 0x9d0(%rdi)
shrq %r9
xorq 0x9c8(%rdi,%rcx), %r9
andl $0x1, %esi
xorq (%rax,%rsi,8), %r9
movq %r9, 0x4e8(%rdi,%rcx)
addq $0x8, %rcx
jmp 0x12ab4
xorl %ecx, %ecx
movq $-0x80000000, %rdx      # imm = 0x80000000
cmpq $0x9b, %rcx
je 0x12b55
movq 0x4e8(%rdi,%rcx,8), %rsi
movl %esi, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq 0x4f0(%rdi,%rcx,8), %r9
andq %rdx, %r9
orq %r8, %r9
movq %r9, 0x9d0(%rdi)
shrq %r9
xorq 0x8(%rdi,%rcx,8), %r9
andl $0x1, %esi
xorq (%rax,%rsi,8), %r9
movq %r9, 0x4e8(%rdi,%rcx,8)
incq %rcx
jmp 0x12b09
movq 0x9c0(%rdi), %rcx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq $-0x80000000, %rsi      # imm = 0x80000000
andq 0x8(%rdi), %rsi
orq %rdx, %rsi
movq %rsi, 0x9d0(%rdi)
shrq %rsi
xorq 0x4e0(%rdi), %rsi
andl $0x1, %ecx
xorq (%rax,%rcx,8), %rsi
movq %rsi, 0x9c0(%rdi)
xorl %eax, %eax
leaq 0x1(%rax), %rcx
movq %rcx, 0x9c8(%rdi)
movq 0x8(%rdi,%rax,8), %rax
movq %rax, %rcx
shrq $0x1d, %rcx
movabsq $0x555555555, %rdx      # imm = 0x555555555
andq %rcx, %rdx
xorq %rax, %rdx
movq %rdx, %rax
shlq $0x11, %rax
movabsq $0x71d67fffeda60000, %rcx # imm = 0x71D67FFFEDA60000
andq %rax, %rcx
xorq %rdx, %rcx
movl %ecx, %edx
andl $0x7ffbf77, %edx        # imm = 0x7FFBF77
shlq $0x25, %rdx
xorq %rcx, %rdx
movq %rdx, %rax
shrq $0x2b, %rax
xorq %rdx, %rax
movq %rax, 0x9d0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/tonymugen[P]sampleSNPs/random.cpp
// Function: sampFiles::RanDraw::RanDraw()
RanDraw::RanDraw(){
	string error;
	
	unsigned int eax;
	unsigned int ebx;
	unsigned int ecx;
	unsigned int edx;
	
	unsigned int leaf    = 0;
	unsigned int subleaf = 0;
	
	// first look at vendor info
	asm volatile ("cpuid;"
				  : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
				  : "a" (leaf), "c" (subleaf)
				  );
	
	if ( !(
		(memcmp(reinterpret_cast<char*>(&ebx), "Genu", 4) && memcmp(reinterpret_cast<char*>(&edx), "ineI", 4) && memcmp(reinterpret_cast<char*>(&ecx), "ntel", 4)) ||
		(memcmp(reinterpret_cast<char*>(&ebx), "Auth", 4) && memcmp(reinterpret_cast<char*>(&edx), "enti", 4) && memcmp(reinterpret_cast<char*>(&ecx), "cAMD", 4))
		)) {
		error = "CPU_unsupported";
		throw error;
	}
	
	
	// now test for RDRAND. bit 30 of ECX when CPUINFO invoked with EAX set to 01H
	leaf = 0x1;
	asm volatile ("cpuid;"
				  : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
				  : "a" (leaf), "c" (subleaf)
				  );
	
	if ( (ecx & 0x40000000) == 0x40000000) { // bit mask 0x40000000 for the 30th bit
		_rng = new GenerateHR(); // have hardware random numbers
	} else {
		_rng = new GenerateMT(); // use MT
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
andq $0x0, -0x8(%r15)
movb $0x0, (%r15)
xorl %eax, %eax
xorl %ecx, %ecx
cpuid
cmpl $0x756e6547, %ebx       # imm = 0x756E6547
sete %al
cmpl $0x49656e69, %edx       # imm = 0x49656E69
sete %sil
orb %al, %sil
cmpl $0x6c65746e, %ecx       # imm = 0x6C65746E
sete %al
orb %sil, %al
cmpb $0x1, %al
jne 0x12c54
cmpl $0x68747541, %ebx       # imm = 0x68747541
je 0x12ca2
cmpl $0x69746e65, %edx       # imm = 0x69746E65
je 0x12ca2
cmpl $0x444d4163, %ecx       # imm = 0x444D4163
je 0x12ca2
pushq $0x1
popq %rax
xorl %ecx, %ecx
cpuid
btl $0x1e, %ecx
jb 0x12c78
movl $0x9d8, %edi            # imm = 0x9D8
callq 0x42c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x12a2e
jmp 0x12c8d
pushq $0x8
popq %rdi
callq 0x42c0
movq %rax, %rbx
leaq 0x90c6(%rip), %rax      # 0x1bd50
movq %rax, (%rbx)
movq %rbx, (%r14)
movq %rsp, %rdi
callq 0x4558
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x24ad(%rip), %rsi      # 0x15156
movq %rsp, %rdi
callq 0x4520
pushq $0x20
popq %rdi
callq 0x4150
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq (%rsp), %rdx
cmpq %r15, %rdx
jne 0x12cd2
movups (%r15), %xmm0
movups %xmm0, (%rcx)
jmp 0x12cde
movq %rdx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x8bcb(%rip), %rsi      # 0x1b8c8
movq 0x92bc(%rip), %rdx      # 0x1bfc0
movq %rax, %rdi
callq 0x44a0
movq %rax, %r14
movl $0x9d8, %esi            # imm = 0x9D8
movq %rbx, %rdi
callq 0x42d0
jmp 0x12d21
movq %rax, %r14
movq %rsp, %rdi
callq 0x4558
movq %r14, %rdi
callq 0x44d0
nop