LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r14
pushq %rbx
cmpb $0x7e, (%rsi)
jne 0x5bde
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1(%rsi), %eax
bswapl %eax
movl %eax, (%rdi)
movl 0x5(%rsi), %ebp
movl %ebp, %edi
bswapl %edi
movq %rdi, 0x8(%r14)
addq $0x9, %rbx
callq 0x3030
movq %rax, 0x10(%r14)
testl %ebp, %ebp
je 0x5bd4
xorl %eax, %eax
movb (%rbx,%rax), %cl
movq 0x10(%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq 0x8(%r14), %rax
jb 0x5bbe
addq %rax, %rbx
cmpb $0x7e, (%rbx)
jne 0x5bfd
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7768(%rip), %rdi      # 0xd34d
leaq 0x7770(%rip), %rsi      # 0xd35c
leaq 0x7773(%rip), %rcx      # 0xd366
movl $0x70, %edx
callq 0x3160
leaq 0x777e(%rip), %rdi      # 0xd382
leaq 0x7751(%rip), %rsi      # 0xd35c
leaq 0x7754(%rip), %rcx      # 0xd366
movl $0x82, %edx
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rax
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x47bc
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r13, %rdx
callq 0xc160
cmpq 0x8(%r12), %rax
je 0x5ff6
movq 0x8(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x5fab
movq (%rax), %rsi
incq %rsi
callq 0x3240
movq 0x8(%rbx), %r12
cmpq %r12, (%rbx)
je 0x5ff6
movq %r15, %rdi
movq %r14, %rsi
callq 0xc294
addq $-0x20, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x3130
movq 0x8(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
movb $0x1, %bl
cmpq %rax, %rdi
je 0x5ff8
movq (%rax), %rsi
incq %rsi
callq 0x3240
jmp 0x5ff8
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x600f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x603a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5a96
movl $0x9, (%r14)
movq 0x10(%r14), %rdi
movzbl (%rdi), %ebp
callq 0x32f0
movq %r15, %rdi
callq 0x30f0
movq %rax, 0x8(%r14)
movq %r15, 0x10(%r14)
movl 0x201c(%rbx), %esi
movq %r14, %rdi
callq 0x7e2a
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5a96
movq 0x10(%r15), %rax
movq %rax, 0x10(%r14)
movups (%r15), %xmm0
movaps %xmm0, (%r14)
cmpl $0x8, (%r14)
jne 0x7d87
cmpq $0x4, 0x8(%rsp)
jne 0x7da6
leaq 0x8(%rsp), %r14
movq 0x8(%r14), %rdi
movl (%rdi), %eax
bswapl %eax
movl %eax, 0x2020(%rbx)
callq 0x32f0
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl 0x201c(%rbx), %esi
movq %rsp, %rdi
callq 0x7e2a
movl 0x2020(%rbx), %esi
leaq 0x59ed(%rip), %rdi      # 0xd74e
xorl %eax, %eax
callq 0x3050
movq 0x2028(%rbx), %rdi
movl 0x2020(%rbx), %esi
movl %ebp, %edx
callq 0x3410
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5993(%rip), %rdi      # 0xd721
leaq 0x5962(%rip), %rsi      # 0xd6f7
leaq 0x5966(%rip), %rcx      # 0xd702
movl $0xfa, %edx
callq 0x3160
leaq 0x5996(%rip), %rdi      # 0xd743
leaq 0x5943(%rip), %rsi      # 0xd6f7
leaq 0x5947(%rip), %rcx      # 0xd702
movl $0xfb, %edx
callq 0x3160
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x7e02
movq %rsi, %r14
movl $0x1, %ebp
xorl %esi, %esi
addq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0xbdc8
movl %ebp, %esi
incl %ebp
cmpq %rsi, 0x8(%r14)
ja 0x7dec
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7e21
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3240
movq %r14, %rdi
callq 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
cmpl $0x2, (%rdi)
jl 0x5047
movq %rsi, %rbx
movq %rdi, %r12
movl $0x1, %r14d
xorl %ebp, %ebp
movq (%rbx,%r14,8), %r13
cmpb $0x2d, (%r13)
jne 0x4f69
movb 0x1(%r13), %al
testb %al, %al
je 0x4ff5
movb %al, 0xf(%rsp)
movb $0x1, %bpl
jmp 0x5037
testb $0x1, %bpl
je 0x4fb3
movq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rsi
callq 0x784e
movq %rax, %rbp
movq %r12, %r15
movq %rbx, %r12
movq 0x8(%rax), %rbx
movq %r13, %rdi
callq 0x4120
movq %rbp, %rdi
xorl %ebp, %ebp
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rbx
movq %r15, %r12
movq %r13, %rcx
movq %rax, %r8
callq 0x4430
jmp 0x5037
movl $0x1c, %edx
movq 0x1b031(%rip), %r15     # 0x1fff0
movq %r15, %rdi
leaq 0x1306b(%rip), %rsi     # 0x18034
callq 0x42f0
movq %r13, %rdi
callq 0x4120
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x42f0
movl $0x2d, %edx
movq %r15, %rdi
leaq 0x1305e(%rip), %rsi     # 0x18051
jmp 0x500b
movl $0x2f, %edx
movq 0x1afef(%rip), %r15     # 0x1fff0
movq %r15, %rdi
leaq 0x12ff9(%rip), %rsi     # 0x18004
callq 0x42f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4290
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
incq %r14
movslq (%r12), %rax
cmpq %rax, %r14
jl 0x4f46
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x88(%rdi), %r15
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x7c30
movq %r14, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r14, %rdi
movl $0xe, %edx
callq 0x4270
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x7c8a
movq %r14, %rdi
callq 0x44c0
movq %rax, %r15
movq %r14, %rdi
callq 0x4060
movq 0x238(%rbx), %rcx
imulq 0x240(%rbx), %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x7ce5
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1835f(%rip), %rdi     # 0x1fff0
leaq 0x108b8(%rip), %rsi     # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x18339(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x108a6(%rip), %rsi     # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movl $0x20, %edi
callq 0x4140
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %bpl
leaq 0x10894(%rip), %rsi     # 0x18597
leaq 0x108b9(%rip), %rdx     # 0x185c3
movq %rbx, %rdi
callq 0x7b72
xorl %ebp, %ebp
leaq 0x17ba5(%rip), %rsi     # 0x1f8c0
movq 0x1829e(%rip), %rdx     # 0x1ffc0
movq %rbx, %rdi
callq 0x44b0
movq %rax, %r14
testb %bpl, %bpl
je 0x7e04
movq %rbx, %rdi
callq 0x41f0
jmp 0x7e04
movq %rax, %r14
cmpl $0x1, %edx
jne 0x7e04
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x1828f(%rip), %rdi     # 0x1fff0
leaq 0x1080f(%rip), %rsi     # 0x18577
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x18269(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x10c67(%rip), %rsi     # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
leaq 0x8(%rsp), %rdi
callq 0x4571
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7dff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x7dff
jmp 0x7dfc
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x7e63
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0xc, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x7e8d
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x1815c(%rip), %rdi     # 0x1fff0
leaq 0x106b5(%rip), %rsi     # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x18136(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x106a3(%rip), %rsi     # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x7fa4
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x180ea(%rip), %rdi     # 0x1fff0
leaq 0x1066a(%rip), %rsi     # 0x18577
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x180c4(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x10ac2(%rip), %rsi     # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x458b
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f9f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x7f9f
jmp 0x7f9c
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x8a39
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x14, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x8a63
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x17586(%rip), %rdi     # 0x1fff0
leaq 0xfadf(%rip), %rsi      # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x17560(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0xfc43(%rip), %rsi      # 0x186e2
movl $0xb, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x8b7a
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x17514(%rip), %rdi     # 0x1fff0
leaq 0xfa94(%rip), %rsi      # 0x18577
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x174ee(%rip), %rdi     # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0xfbdd(%rip), %rsi      # 0x186ee
movl $0xd, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x460d
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b75
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x8b75
jmp 0x8b72
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x7684
leaq 0x228(%rbx), %rax
movq %rax, 0x218(%rbx)
xorl %eax, %eax
movq %rax, 0x220(%rbx)
movb $0x0, 0x228(%rbx)
movq %rax, 0x238(%rbx)
movq $0x1, 0x240(%rbx)
leaq 0x16bea(%rip), %rax     # 0x1f8e0
movq %rax, (%rbx)
leaq 0x248(%rbx), %r14
movq %r14, %rdi
callq 0x4310
leaq 0x458(%rbx), %r15
movq %r15, %rdi
callq 0x4310
leaq 0x668(%rbx), %r12
leaq 0x678(%rbx), %rax
movq %rax, (%rsp)
movq %rax, 0x668(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x7720
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x668(%rbx), %rsi
movq 0x670(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x7720
leaq 0xf9bf(%rip), %rsi      # 0x1872d
leaq 0x8(%rsp), %rdi
callq 0x4530
leaq 0x218(%rbx), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x4330
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0x8da2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl $0x1, 0x1c(%r15,%rax)
movl 0x20(%r15,%rax), %esi
callq 0x44a0
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl $0x1, 0x1c(%r14,%rax)
movl 0x20(%r14,%rax), %esi
callq 0x44a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8e1d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x8e1d
jmp 0x8e1a
movq %rax, %r13
jmp 0x8e36
movq %rax, %r13
jmp 0x8e3e
movq %rax, %r13
jmp 0x8e46
movq %rax, %r13
movq (%r12), %rdi
cmpq (%rsp), %rdi
je 0x8e36
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x42d0
movq %r15, %rdi
callq 0x4090
movq %r14, %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x16960
movq %r13, %rdi
callq 0x44e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16a7b(%rip), %rax     # 0x1f8e0
movq %rax, (%rdi)
leaq 0x458(%rdi), %r14
addq $0x4d8, %rdi            # imm = 0x4D8
callq 0x40a0
testb %al, %al
je 0x8e87
movq %r14, %rdi
callq 0x4060
leaq 0x248(%rbx), %r15
leaq 0x2c8(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x8ea6
movq %r15, %rdi
callq 0x4060
movq 0x668(%rbx), %rdi
leaq 0x678(%rbx), %rax
cmpq %rax, %rdi
je 0x8ec4
movq (%rax), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x4090
movq %r15, %rdi
callq 0x4090
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x16960
movq %rax, %rdi
callq 0x7714
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x8f07
leaq 0x8(%rbx), %rdi
callq 0x4060
leaq 0x4d8(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x8f23
leaq 0x458(%rbx), %rdi
callq 0x4060
leaq 0x2c8(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x8f43
addq $0x248, %rbx            # imm = 0x248
movq %rbx, %rdi
popq %rbx
jmp 0x4060
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x10d85
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x10daf
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xf23a(%rip), %rdi      # 0x1fff0
leaq 0x7793(%rip), %rsi      # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xf214(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x7781(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x10ec6
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xf1c8(%rip), %rdi      # 0x1fff0
leaq 0x7d84(%rip), %rsi      # 0x18bb3
movl $0x1d, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xf1a2(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x7ba0(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4897
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10ec1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x10ec1
jmp 0x10ebe
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
addq $0x8, %rdi
movq 0x218(%rbx), %rsi
movl $0x10, %edx
callq 0x4270
leaq 0x88(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x1254f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0xda9a(%rip), %rdi      # 0x1fff0
leaq 0x5ff3(%rip), %rsi      # 0x18550
movl $0x1b, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xda74(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x6157(%rip), %rsi      # 0x186e2
movl $0xb, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x1266b
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xda28(%rip), %rdi      # 0x1fff0
leaq 0x65e4(%rip), %rsi      # 0x18bb3
movl $0x1d, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xda02(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x60f1(%rip), %rsi      # 0x186ee
movl $0xd, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
leaq 0x8(%rsp), %rdi
callq 0x4919
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12666
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x12666
jmp 0x12663
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x12707
leaq 0x8(%rbx), %rdi
callq 0x4060
leaq 0x2c0(%rbx), %rdi
callq 0x40a0
testb %al, %al
je 0x12727
addq $0x240, %rbx            # imm = 0x240
movq %rbx, %rdi
popq %rbx
jmp 0x4060
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x14bf3
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x14c1d
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xb3cc(%rip), %rdi      # 0x1fff0
leaq 0x416d(%rip), %rsi      # 0x18d98
movl $0x20, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xb3a6(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x3913(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x14d34
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xb35a(%rip), %rdi      # 0x1fff0
leaq 0x4176(%rip), %rsi      # 0x18e13
movl $0x1c, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xb334(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x3d32(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4ad3
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14d2f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x14d2f
jmp 0x14d2c
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x15731
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x1575b
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xa88e(%rip), %rdi      # 0x1fff0
leaq 0x362f(%rip), %rsi      # 0x18d98
movl $0x20, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa868(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x2f4b(%rip), %rsi      # 0x186e2
movl $0xb, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x15872
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xa81c(%rip), %rdi      # 0x1fff0
leaq 0x3638(%rip), %rsi      # 0x18e13
movl $0x1c, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa7f6(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x2ee5(%rip), %rsi      # 0x186ee
movl $0xd, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4b21
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1586d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x1586d
jmp 0x1586a
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x7620
leaq 0xa062(%rip), %rax      # 0x1f920
movq %rax, (%rbx)
leaq 0x8(%rbx), %r14
leaq 0x88(%rbx), %r15
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x158e0
movq %r14, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4270
movq %r15, %rdi
callq 0x40a0
testb %al, %al
je 0x1593d
movq %rsp, %rsi
movl $0x3, %edx
movq %r14, %rdi
callq 0x4350
cmpb $0x72, (%rsp)
jne 0x1592b
cmpb $0x73, 0x1(%rsp)
jne 0x1592b
cmpb $0x23, 0x2(%rsp)
jne 0x1592b
movb $0x1, 0x238(%rbx)
movq %r14, %rdi
callq 0x4060
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xa6ac(%rip), %rdi      # 0x1fff0
leaq 0x3523(%rip), %rsi      # 0x18e6e
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa686(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x2bf3(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
jmp 0x15a63
movq %rax, %r14
cmpl $0x1, %edx
jne 0x15a66
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xa635(%rip), %rdi      # 0x1fff0
leaq 0x34cc(%rip), %rsi      # 0x18e8e
movl $0x1c, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa60f(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r15
leaq 0x300d(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4b3b
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a54
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x15a54
jmp 0x15a51
movq %rax, %r14
callq 0x4480
jmp 0x15a66
movq %rax, %rdi
callq 0x7714
movq %rax, %r14
movq %rbx, %rdi
callq 0x74bc
movq %r14, %rdi
callq 0x44e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x15aa1
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x15acb
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xa51e(%rip), %rdi      # 0x1fff0
leaq 0x3395(%rip), %rsi      # 0x18e6e
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa4f8(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x2a65(%rip), %rsi      # 0x1856c
movl $0xa, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x15be2
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0xa4ac(%rip), %rdi      # 0x1fff0
leaq 0x3343(%rip), %rsi      # 0x18e8e
movl $0x1c, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0xa486(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x2e84(%rip), %rsi      # 0x189fd
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4b55
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15bdd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x15bdd
jmp 0x15bda
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a0
testb %al, %al
je 0x1680f
movq %r15, %rdi
callq 0x4060
movq 0x218(%rbx), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x4270
movq %r14, %rdi
callq 0x40a0
testb %al, %al
je 0x16839
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x97b0(%rip), %rdi      # 0x1fff0
leaq 0x2627(%rip), %rsi      # 0x18e6e
movl $0x1f, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x978a(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %r14
leaq 0x1e6d(%rip), %rsi      # 0x186e2
movl $0xb, %edx
movq %rax, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4130
movl $0x2, %edi
callq 0x4320
movq %rax, %r14
cmpl $0x1, %edx
jne 0x16950
movq %r14, %rdi
callq 0x4110
movq %rax, %r14
movq 0x973e(%rip), %rdi      # 0x1fff0
leaq 0x25d5(%rip), %rsi      # 0x18e8e
movl $0x1c, %edx
callq 0x42f0
movq 0x218(%rbx), %rsi
movq 0x220(%rbx), %rdx
movq 0x9718(%rip), %rdi      # 0x1fff0
callq 0x42f0
movq %rax, %rbx
leaq 0x1e07(%rip), %rsi      # 0x186ee
movl $0xd, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x20(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rdi
callq 0x41b0
movq %rsp, %rdi
callq 0x4bbd
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1694b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x1694b
jmp 0x16948
movq %rax, %r14
callq 0x4480
movq %r14, %rdi
callq 0x44e0
movq %rax, %rdi
callq 0x7714
// File: /workspace/github_cpp_makefile_star2_O1/tonymugen[P]sampleSNPs/random.cpp
// Function: sampFiles::GenerateHR::ranInt()
volatile uint64_t GenerateHR::ranInt(){
	uint64_t rInt = 0;
	
	unsigned char ok  = '\0';
	string error;
	
	unsigned short keepTrying = 10; // number of tries before giving up
	while (keepTrying) {
		keepTrying--;
		
		asm volatile ("rdrand %0; setc %1"
					  : "=r" (rInt), "=qm" (ok)
					  :
					  : "cc"
					  );
		if (ok) {
			break;
		}
	}
	
	if (!ok) {
		error = "RDRAND_failed";
		throw error;
	}
	
	return rInt;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
movb %al, 0x7(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb %al, (%r14)
movw $0xfff7, %ax            # imm = 0xFFF7
rdrandq %rbx
setb 0x7(%rsp)
movb 0x7(%rsp), %cl
testb %cl, %cl
jne 0x17210
leal 0x1(%rax), %edx
testw %ax, %ax
movl %edx, %eax
jne 0x171f5
testb %cl, %cl
je 0x17236
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1722b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f0b(%rip), %rsi      # 0x19148
leaq 0x8(%rsp), %rdi
callq 0x43b0
movl $0x20, %edi
callq 0x4140
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rdx
cmpq %r14, %rdx
jne 0x1726b
movups (%r14), %xmm0
movups %xmm0, (%rcx)
jmp 0x17277
movq %rdx, (%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x8626(%rip), %rsi      # 0x1f8c0
movq 0x8d1f(%rip), %rdx      # 0x1ffc0
movq %rax, %rdi
callq 0x44b0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x172c3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8a4d(%rip), %rax      # 0x1fd20
movq %rax, (%rdi)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x8(%rdi)
movq $0x1, 0x9c8(%rdi)
movl $0x1, %ecx
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
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
movq %rcx, 0x9c8(%rdi)
cmpq $0x138, %rcx            # imm = 0x138
jb 0x172ff
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpq $0x138, 0x9c8(%rdi) # imm = 0x138
jne 0x1743a
movq $-0x9c, %rcx
movq $-0x80000000, %rdx      # imm = 0x80000000
leaq 0x1e56(%rip), %rax      # 0x191b0
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 0x9c8(%rdi,%rcx,8), %r9
andl $0x1, %esi
xorq (%rax,%rsi,8), %r9
movq %r9, 0x4e8(%rdi,%rcx,8)
incq %rcx
jne 0x1735a
xorl %ecx, %ecx
movq $-0x80000000, %rdx      # imm = 0x80000000
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
cmpq $0x9b, %rcx
jne 0x173a9
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)
movq $0x0, 0x9c8(%rdi)
movq 0x9c8(%rdi), %rax
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_O1/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)
movq $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 0x17505
cmpl $0x68747541, %ebx       # imm = 0x68747541
je 0x17565
cmpl $0x69746e65, %edx       # imm = 0x69746E65
je 0x17565
cmpl $0x444d4163, %ecx       # imm = 0x444D4163
je 0x17565
movl $0x1, %eax
xorl %ecx, %ecx
cpuid
btl $0x1e, %ecx
jb 0x1752b
movl $0x9d8, %edi            # imm = 0x9D8
callq 0x42c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x172cc
jmp 0x17542
movl $0x8, %edi
callq 0x42c0
movq %rax, %rbx
leaq 0x8809(%rip), %rax      # 0x1fd48
movq %rax, (%rbx)
movq %rbx, (%r14)
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1755b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1bea(%rip), %rsi      # 0x19156
movq %rsp, %rdi
callq 0x43b0
movl $0x20, %edi
callq 0x4140
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq (%rsp), %rdx
cmpq %r15, %rdx
jne 0x17597
movups (%r15), %xmm0
movups %xmm0, (%rcx)
jmp 0x175a3
movq %rdx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x82fb(%rip), %rsi      # 0x1f8c0
movq 0x89f4(%rip), %rdx      # 0x1ffc0
movq %rax, %rdi
callq 0x44b0
movq %rax, %r14
movl $0x9d8, %esi            # imm = 0x9D8
movq %rbx, %rdi
callq 0x42d0
jmp 0x175e9
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x175ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymugen[P]sampleSNPs/random.cpp
// Function: sampFiles::RanDraw::runifnz()
volatile double RanDraw::runifnz(){
	double rnz = 0.0;
	do {
		rnz = this->runif();
	} while (rnz == 0.0); // simply reject 0.0
	
	return rnz;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %xmm1
punpckldq 0xe7e(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xe86(%rip), %xmm1      # 0x184b0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1aea(%rip), %xmm0     # 0x19128
ucomisd 0xf02(%rip), %xmm0      # 0x18548
jne 0x1764a
jnp 0x1760c
popq %rbx
retq