LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/brianwu02[P]ImageProcessing/IPutil.cpp
// Function: IP_readImage(char*)
imageP
IP_readImage(char *file) 
{

	imageP	 I;
	int	 w, h, maxGray;
   	char  	 buf[1024];
	uchar	*out;

	// open binary file for reading
	ifstream inFile (file, ios::binary);
	
	// error checking
	if(!inFile) {
		cerr << "readImage: Can't open " << file << endl;
		exit(1);
	}

   	// verify that the image is in PGM format. 
   	inFile.getline(buf, 3);
   	if(strncmp(buf,"P5",2) && strncmp(buf,"P6",2)){
      		cerr << "The file " << file << " is not in PGM format" << endl;
      		inFile.close();
      		exit(1);
   	}

	// read width, height, and maximum gray value
	inFile >> w >> h >> maxGray;

	// skip over linefeed and carriage return
	inFile.getline(buf, 2);

	// allocate image and read file
	I = IP_allocImage(w, h, sizeof(uchar));
	out = I->image;
	inFile.read((char *) out, w*h);

	return (imageP) I;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x628, %rsp            # imm = 0x628
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x21b0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x38(%rsp,%rax)
jne 0x2a0b
leaq (%rsp,%rax), %rdi
addq $0x18, %rdi
movl $0xa, %esi
callq 0x20c0
movsbl %al, %ecx
leaq 0x18(%rsp), %rdi
leaq 0x220(%rsp), %rsi
movl $0x3, %edx
callq 0x21c0
movzwl 0x220(%rsp), %eax
cmpl $0x3550, %eax           # imm = 0x3550
je 0x2966
cmpl $0x3650, %eax           # imm = 0x3650
jne 0x2a44
leaq 0x18(%rsp), %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2080
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x2080
leaq 0x14(%rsp), %rsi
movq %rax, %rdi
callq 0x2080
movq 0x18(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20c0
movsbl %al, %ecx
leaq 0x18(%rsp), %rdi
leaq 0x220(%rsp), %rsi
movl $0x2, %edx
callq 0x21c0
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
movl $0x1, %edx
callq 0x2aab
movq %rax, %rbx
movq 0x8(%rax), %rsi
movslq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rdx
imulq %rax, %rdx
leaq 0x18(%rsp), %rdi
callq 0x2120
leaq 0x18(%rsp), %rdi
callq 0x2050
movq %rbx, %rax
addq $0x628, %rsp            # imm = 0x628
popq %rbx
popq %r14
retq
movq 0x25de(%rip), %rdi      # 0x4ff0
leaq 0x647(%rip), %rsi       # 0x3060
movl $0x16, %edx
callq 0x20f0
movq 0x25c6(%rip), %rdi      # 0x4ff0
movq %rbx, %rsi
callq 0x20d0
movq %rax, %rdi
callq 0x2070
movl $0x1, %edi
callq 0x2110
movq 0x25a5(%rip), %rdi      # 0x4ff0
leaq 0x628(%rip), %rsi       # 0x307a
movl $0x9, %edx
callq 0x20f0
movq 0x258d(%rip), %rdi      # 0x4ff0
movq %rbx, %rsi
callq 0x20d0
movq %rax, %rbx
leaq 0x60f(%rip), %rsi       # 0x3084
movl $0x15, %edx
movq %rax, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2070
leaq 0x18(%rsp), %rdi
callq 0x2040
jmp 0x2a3a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O3/brianwu02[P]ImageProcessing/IPutil.cpp
// Function: IP_allocImage(int, int, int)
imageP
IP_allocImage(int w, int h, int s)
{
	uchar	*p;
	imageP	 I;

	// allocate memory
	I = (imageP ) malloc(sizeof(imageS));
	p = (uchar *) malloc(w * h * s);
	if(p == NULL) {
		cerr << "IP_allocImage: Insufficient memory\n";
		return ((imageP) NULL);
	}

	// init structure
	I->width  = w;
	I->height = h;
	I->image  = p;

	return(I);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movl %edi, %r14d
movl $0x10, %edi
callq 0x2140
movq %rax, %rbx
movl %ebp, %eax
imull %r14d, %eax
imull %r15d, %eax
movslq %eax, %rdi
callq 0x2140
testq %rax, %rax
je 0x2aea
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movq %rax, 0x8(%rbx)
jmp 0x2b04
movq 0x24ff(%rip), %rdi      # 0x4ff0
leaq 0x5be(%rip), %rsi       # 0x30b6
movl $0x23, %edx
callq 0x20f0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/brianwu02[P]ImageProcessing/IPutil.cpp
// Function: IP_saveImage(imageS*, char*)
void 
IP_saveImage(imageP I, char *file)
{

	uchar	*out;

	// open binary file for writing
	ofstream outFile(file, ios::binary);

	// error checking
	if (!outFile) {
		cerr << "IP_savePGM: Can't open " << file << endl;
		exit(1);
	}

	// save PGM header
	outFile <<"P5" << endl;
	outFile <<I->width<< " " << I->height << endl;
	outFile << "255" << endl;

	// save image data
	out = I->image;
	outFile.write((char *) out, I->width*I->height);
	outFile.close();

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x20e0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rsp,%rax)
jne 0x2c77
leaq 0x52a(%rip), %rsi       # 0x3077
movq %rsp, %r14
movl $0x2, %edx
movq %r14, %rdi
callq 0x20f0
movq (%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x20c0
movsbl %al, %esi
movq %rsp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
movl (%rbx), %esi
movq %rsp, %rdi
callq 0x2190
movq %rax, %r14
leaq 0x4c5(%rip), %rsi       # 0x305e
movl $0x1, %edx
movq %rax, %rdi
callq 0x20f0
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x2190
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x20c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
leaq 0x4d0(%rip), %rsi       # 0x30b2
movq %rsp, %r14
movl $0x3, %edx
movq %r14, %rdi
callq 0x20f0
movq (%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x20c0
movsbl %al, %esi
movq %rsp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
movq 0x8(%rbx), %rsi
movslq (%rbx), %rax
movslq 0x4(%rbx), %rdx
imulq %rax, %rdx
movq %rsp, %rdi
callq 0x2130
movq %rsp, %rdi
callq 0x2150
movq 0x2388(%rip), %rax      # 0x4fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x20a0
leaq 0xf8(%rsp), %rdi
callq 0x2060
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movq 0x2372(%rip), %rdi      # 0x4ff0
leaq 0x415(%rip), %rsi       # 0x309a
movl $0x17, %edx
callq 0x20f0
movq 0x235a(%rip), %rdi      # 0x4ff0
movq %r14, %rsi
callq 0x20d0
movq %rax, %rdi
callq 0x2070
movl $0x1, %edi
callq 0x2110
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O3/sweeterthancandy[P]linux_event_debugger/./event_monitor.h
// Function: event_monitor::event_monitor(boost::asio::io_context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
explicit event_monitor(boost::asio::io_service& io, const std::string& dev)
                :io_(io)
                ,work_(io) // keep alive
                ,desc_(io)
                ,dev_(dev)
        {
                int fd = open(dev_.c_str(), O_RDONLY);
                if( fd < 0 ) 
                        BOOST_THROW_EXCEPTION(std::domain_error("unable to open file"));
                desc_.assign( fd );
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsi, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
lock
incq 0xd0(%rax)
movq (%rsi), %rdi
leaq 0x26d02(%rip), %rax     # 0x41ef0
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq 0x367(%rip), %rdx       # 0x1b56c
movq %r15, %rcx
callq 0x148f2
leaq 0x20(%rbx), %r14
movq %rax, 0x20(%rbx)
leaq 0x38(%rbx), %rax
leaq 0x25e38(%rip), %rcx     # 0x41058
movq %rcx, 0x58(%rbx)
leaq 0x25ec5(%rip), %rcx     # 0x410f0
movq %rcx, 0x48(%rbx)
movq %r15, 0x38(%rbx)
movl $0x0, 0x44(%rbx)
movq %rax, 0x50(%rbx)
leaq 0x25ecb(%rip), %rax     # 0x41110
movq %rax, 0x60(%rbx)
movl $0xffffffff, 0x28(%rbx) # imm = 0xFFFFFFFF
movb $0x0, 0x2c(%rbx)
leaq 0x68(%rbx), %r15
leaq 0x78(%rbx), %r13
movq %r13, 0x68(%rbx)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x12bca
leaq 0xa0(%rbx), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x1b368
movq (%r15), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0xb3a0
movl %eax, 0x4(%rsp)
testl %eax, %eax
js 0x1b2b9
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1b420
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x117ae(%rip), %rsi     # 0x2ca6e
leaq 0x8(%rsp), %rdi
callq 0xb2f0
leaq 0x117b1(%rip), %rax     # 0x2ca82
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x117b4(%rip), %rax     # 0x2ca94
movq %rax, 0x8(%rsi)
movq $0x19, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x1b3d0
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0xb440
jmp 0x1b319
jmp 0x1b316
movq %rax, %r12
jmp 0x1b333
movq %rax, %r12
jmp 0x1b347
movq %rax, %r12
jmp 0x1b34f
movq %rax, %r12
leaq 0x26c50(%rip), %rax     # 0x41f70
movq %rax, 0xa0(%rbx)
leaq 0xb0(%rbx), %rdi
callq 0x1a240
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1b347
movq (%r13), %rsi
incq %rsi
callq 0xb4d0
movq %r14, %rdi
callq 0x1c386
leaq 0x18(%rbx), %rdi
callq 0x18400
movq %rbx, %rdi
callq 0x1b536
movq %r12, %rdi
callq 0xb860
// File: /workspace/github_cpp_makefile_star2_O3/sweeterthancandy[P]linux_event_debugger/./event_monitor.h
// Function: event_monitor::start_read()
void start_read(){
                auto self = shared_from_this();
                boost::asio::async_read( desc_, boost::asio::buffer(ev_buffer_),
                        [this,self](const boost::system::error_code& ec, size_t n){
                                if( ec ){
                                        // must of been cancelled
                                 
                                } else {
                                        assert( n == sizeof(struct input_event) && "unexpected read size");
                                        sig_(dev_, *reinterpret_cast<struct input_event*>(ev_buffer_.data()));
                                        start_read();
                                }
                });
        }

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c8b4
leaq 0x20(%rbx), %rax
leaq 0x88(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movq $0x18, 0x28(%rsp)
movq %rbx, 0x8(%rsp)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
testq %rcx, %rcx
je 0x1c849
movq 0x2676d(%rip), %rdx     # 0x42fa8
cmpb $0x0, (%rdx)
je 0x1c845
incl 0x8(%rcx)
jmp 0x1c849
lock
incl 0x8(%rcx)
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x1c90a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1c874
callq 0x1a652
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1c883
callq 0x1a652
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1c89d
callq 0x1a652
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1c8ac
callq 0x1a652
movq %rbx, %rdi
callq 0xb860
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/main.cpp
// Function: readFour[abi:cxx11](zstr::istream&)
std::vector<std::string> readFour(zstr::istream &f)
{
  std::vector<std::string> lines;
  std::string line;
  for(int i = 0; i < 4; i++) {
    if(f.peek() != EOF ) {
      getline(f, line);
      lines.push_back(line);
    } else {
      lines.push_back("");
    }
  }
  return lines;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movl $0x4, %ebp
leaq 0x19cbc(%rip), %r15     # 0x32439
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r13
movq %r14, %rdi
callq 0x6180
cmpl $-0x1, %eax
je 0x187c3
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6390
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x66a0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a17e
jmp 0x18802
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x1bde6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1c720
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x18802
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
decl %ebp
jne 0x18787
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x18822
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63c0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1885a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
jmp 0x1885a
jmp 0x18857
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x18876
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63c0
movq %rbx, %rdi
callq 0x1a1bc
movq %r14, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/main.cpp
// Function: update_stats(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, int, int, int, int, int, int)
void update_stats(std::chrono::steady_clock::time_point start, int a, int b, int c, int d, int e, int f) {
  auto now = std::chrono::steady_clock::now();
  int secs = std::chrono::duration_cast<std::chrono::seconds>(now - start).count();
  printf("|%11d|%11d|%11d|%11d|%11d|%11d| (in %d secs)\r", a, b, c, d, e, f, secs);
  fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
movl 0x40(%rsp), %eax
movq %rax, (%rsp)
callq 0x6520
subq %r13, %rax
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
imulq %rcx
movq %rdx, %r10
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x1a, %r10
addl %eax, %r10d
leaq 0x19925(%rip), %rdi     # 0x3238e
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
pushq %r10
pushq 0x8(%rsp)
callq 0x6070
addq $0x10, %rsp
movq 0x274c0(%rip), %rax     # 0x3ff50
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6490
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/strict_fstream.hpp
// Function: strict_fstream::strerror[abi:cxx11]()
static std::string strerror()
{
    std::string buff(80, '\0');
#ifdef _WIN32
    if (strerror_s(&buff[0], buff.size(), errno) != 0)
    {
        buff = "Unknown error";
    }
#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
// XSI-compliant strerror_r()
    if (strerror_r(errno, &buff[0], buff.size()) != 0)
    {
        buff = "Unknown error";
    }
#elif __APPLE__ && __clang__ && ! _GNU_SOURCE
// XSI-compliant strerror_r()
    if (strerror_r(errno, &buff[0], buff.size()) != 0)
    {
        buff = "Unknown error";
    }
#else 
// GNU-specific strerror_r()
    auto p = strerror_r(errno, &buff[0], buff.size());
    std::string tmp(p, std::strlen(p));
    std::swap(buff, tmp);
#endif
    buff.resize(buff.find('\0'));
    return buff;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movl $0x50, %esi
xorl %edx, %edx
callq 0x6480
callq 0x6060
movl (%rax), %edi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x60d0
movq %rax, %r14
movq %rax, %rdi
callq 0x61b0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq (%rax,%r14), %rdx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1bde6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x62d0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6500
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x6110
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a071
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a09c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
jmp 0x1a09c
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1a0af
movq (%r15), %rsi
incq %rsi
callq 0x63c0
movq %r14, %rdi
callq 0x6660
nop
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::istreambuf::istreambuf(std::basic_streambuf<char, std::char_traits<char>>*, unsigned long, bool)
istreambuf(std::streambuf * _sbuf_p,
               std::size_t _buff_size = default_buff_size, bool _auto_detect = true)
        : sbuf_p(_sbuf_p),
          zstrm_p(nullptr),
          buff_size(_buff_size),
          auto_detect(_auto_detect),
          auto_detect_run(false),
          is_text(false)
    {
        assert(sbuf_p);
        in_buff = new char [buff_size];
        in_buff_start = in_buff;
        in_buff_end = in_buff;
        out_buff = new char [buff_size];
        setg(out_buff, out_buff, out_buff);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x255f7(%rip), %r13     # 0x3ff80
addq $0x10, %r13
movq %r13, (%rdi)
leaq 0x38(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %r14, %rdi
callq 0x66f0
leaq 0x24d36(%rip), %rax     # 0x3f6e8
movq %rax, (%rbx)
movq %r12, 0x40(%rbx)
movq $0x0, 0x68(%rbx)
movq %r15, 0x70(%rbx)
movb %bpl, 0x78(%rbx)
movw $0x0, 0x79(%rbx)
testq %r12, %r12
je 0x1aa0f
movq %r15, %rdi
callq 0x6030
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rax, 0x58(%rbx)
movq %r15, %rdi
callq 0x6030
movq %rax, 0x60(%rbx)
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17b55(%rip), %rdi     # 0x3256b
leaq 0x17b55(%rip), %rsi     # 0x32572
leaq 0x17b5f(%rip), %rcx     # 0x32583
movl $0x74, %edx
callq 0x6290
movq %rax, %r15
movq %r13, (%rbx)
movq %r14, %rdi
callq 0x6580
movq %r15, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::detail::z_stream_wrapper::~z_stream_wrapper()
~z_stream_wrapper()
    {
        if (is_input)
        {
            inflateEnd(this);
        }
        else
        {
            deflateEnd(this);
        }
    }

// Assembly:
pushq %rax
cmpb $0x1, 0x70(%rdi)
jne 0x1ada6
callq 0x6410
jmp 0x1adab
callq 0x6250
popq %rax
retq
movq %rax, %rdi
callq 0x1a937
nop
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::detail::z_stream_wrapper::z_stream_wrapper(bool, int)
z_stream_wrapper(bool _is_input = true, int _level = Z_DEFAULT_COMPRESSION)
        : is_input(_is_input)
    {
        this->zalloc = Z_NULL;
        this->zfree = Z_NULL;
        this->opaque = Z_NULL;
        int ret;
        if (is_input)
        {
            this->avail_in = 0;
            this->next_in = Z_NULL;
            ret = inflateInit2(this, 15+32);
        }
        else
        {
            ret = deflateInit2(this, _level, Z_DEFLATED, 15+16, 8, Z_DEFAULT_STRATEGY);
        }
        if (ret != Z_OK) throw Exception(this, ret);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb %sil, 0x70(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movq $0x0, 0x50(%rdi)
testl %esi, %esi
je 0x1adfd
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
leaq 0x17875(%rip), %rdx     # 0x3265e
movq %rbx, %rdi
movl $0x2f, %esi
movl $0x70, %ecx
callq 0x6350
jmp 0x1ae28
leaq 0x1785a(%rip), %rax     # 0x3265e
movq %rbx, %rdi
movl %edx, %esi
movl $0x8, %edx
movl $0x1f, %ecx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq $0x70
pushq %rax
callq 0x6090
addq $0x10, %rsp
movl %eax, %ebp
testl %eax, %eax
jne 0x1ae33
popq %rbx
popq %r14
popq %rbp
retq
movl $0x28, %edi
callq 0x61f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x1ae76
leaq 0x2491c(%rip), %rsi     # 0x3f770
leaq 0x29d(%rip), %rdx       # 0x1b0f8
movq %r14, %rdi
callq 0x6640
movq %rax, %rbx
movq %r14, %rdi
callq 0x62e0
movq %rbx, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::ostreambuf::ostreambuf(std::basic_streambuf<char, std::char_traits<char>>*, unsigned long, int)
ostreambuf(std::streambuf * _sbuf_p,
               std::size_t _buff_size = default_buff_size, int _level = Z_DEFAULT_COMPRESSION)
        : sbuf_p(_sbuf_p),
          zstrm_p(new detail::z_stream_wrapper(false, _level)),
          buff_size(_buff_size)
    {
        assert(sbuf_p);
        in_buff = new char [buff_size];
        out_buff = new char [buff_size];
        setp(in_buff, in_buff + buff_size);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x24df9(%rip), %r13     # 0x3ff80
addq $0x10, %r13
movq %r13, (%rdi)
leaq 0x38(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %r14, %rdi
callq 0x66f0
leaq 0x24890(%rip), %rax     # 0x3fa40
movq %rax, (%rbx)
movq %r12, 0x40(%rbx)
movl $0x78, %edi
callq 0x63b0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x1adb6
movq %r12, 0x58(%rbx)
movq %r15, 0x60(%rbx)
cmpq $0x0, 0x40(%rbx)
je 0x1b21b
movq %r15, %rdi
callq 0x6030
movq %rax, %r12
movq %rax, 0x48(%rbx)
movq %r15, %rdi
callq 0x6030
movq %rax, 0x50(%rbx)
movq %r12, %rax
addq %r15, %rax
movq %r12, 0x28(%rbx)
movq %r12, 0x20(%rbx)
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17349(%rip), %rdi     # 0x3256b
leaq 0x17349(%rip), %rsi     # 0x32572
leaq 0x1755e(%rip), %rcx     # 0x3278e
movl $0xeb, %edx
callq 0x6290
movq %rax, %r15
movl $0x78, %esi
movq %r12, %rdi
callq 0x63c0
jmp 0x1b24f
movq %rax, %r15
movq %r13, (%rbx)
movq %r14, %rdi
callq 0x6580
movq %r15, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/strict_fstream.hpp
// Function: strict_fstream::detail::static_method_holder::mode_to_string[abi:cxx11](std::_Ios_Openmode)
static std::string mode_to_string(std::ios_base::openmode mode)
    {
        static const int n_modes = 6;
        static const std::ios_base::openmode mode_val_v[n_modes] =
            {
                std::ios_base::in,
                std::ios_base::out,
                std::ios_base::app,
                std::ios_base::ate,
                std::ios_base::trunc,
                std::ios_base::binary
            };

        static const char * mode_name_v[n_modes] =
            {
                "in",
                "out",
                "app",
                "ate",
                "trunc",
                "binary"
            };
        std::string res;
        for (int i = 0; i < n_modes; ++i)
        {
            if (mode & mode_val_v[i])
            {
                res += (! res.empty()? "|" : "");
                res += mode_name_v[i];
            }
        }
        if (res.empty()) res = "none";
        return res;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x2464c(%rip), %r14     # 0x40390
xorl %r12d, %r12d
leaq 0x173f2(%rip), %r13     # 0x33140
leaq 0x16abd(%rip), %r15     # 0x32812
testl %ebp, (%r12,%r13)
je 0x1bd81
cmpq $0x0, 0x8(%rbx)
movq %r15, %rsi
leaq 0x166cf(%rip), %rax     # 0x32439
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x66e0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x66e0
addq $0x8, %r14
addq $0x4, %r12
cmpq $0x18, %r12
jne 0x1bd55
cmpq $0x0, 0x8(%rbx)
jne 0x1bdaf
leaq 0x169c2(%rip), %rcx     # 0x3275f
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x65d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1bdc3
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x1bdde
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x63c0
movq %r14, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::ostreambuf::~ostreambuf()
virtual ~ostreambuf()
    {
        // flush the zlib stream
        //
        // NOTE: Errors here (sync() return value not 0) are ignored, because we
        // cannot throw in a destructor. This mirrors the behaviour of
        // std::basic_filebuf::~basic_filebuf(). To see an exception on error,
        // close the ofstream with an explicit call to close(), and do not rely
        // on the implicit call in the destructor.
        //
        sync();
        delete [] in_buff;
        delete [] out_buff;
        delete zstrm_p;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x23bb6(%rip), %rax     # 0x3fa40
movq %rax, (%rdi)
callq 0x1bf0e
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x1bea0
callq 0x64f0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x1beae
callq 0x64f0
movq 0x58(%rbx), %r14
testq %r14, %r14
je 0x1bebf
movq %r14, %rdi
callq 0x1ad98
movl $0x78, %esi
movq %r14, %rdi
callq 0x63c0
movq 0x240ad(%rip), %rax     # 0x3ff80
addq $0x10, %rax
movq %rax, (%rbx)
addq $0x38, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6580
movq %rax, %rdi
callq 0x1a937
nop
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::ostreambuf::sync()
virtual int sync()
    {
        // first, call overflow to clear in_buff
        overflow();
        if (! pptr()) return -1;
        // then, call deflate asking to finish the zlib stream
        zstrm_p->next_in = nullptr;
        zstrm_p->avail_in = 0;
        if (deflate_loop(Z_FINISH) != 0) return -1;
        deflateReset(zstrm_p);
        return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x68(%rax)
cmpq $0x0, 0x28(%r14)
je 0x1bf5a
movq 0x58(%r14), %rax
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq %r14, %rdi
movl $0x4, %esi
callq 0x1bffa
testl %eax, %eax
jne 0x1bf5a
movq 0x58(%r14), %rdi
callq 0x6590
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::ostreambuf::overflow(int)
virtual std::streambuf::int_type overflow(std::streambuf::int_type c = traits_type::eof())
    {
        zstrm_p->next_in = reinterpret_cast< decltype(zstrm_p->next_in) >(pbase());
        zstrm_p->avail_in = pptr() - pbase();
        while (zstrm_p->avail_in > 0)
        {
            int r = deflate_loop(Z_NO_FLUSH);
            if (r != 0)
            {
                setp(nullptr, nullptr);
                return traits_type::eof();
            }
        }
        setp(in_buff, in_buff + buff_size);
        return traits_type::eq_int_type(c, traits_type::eof()) ? traits_type::eof() : sputc(c);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq 0x20(%rdi), %rax
movq 0x58(%rdi), %rcx
movq %rax, (%rcx)
movl 0x28(%rdi), %edx
subl %eax, %edx
movl %edx, 0x8(%rcx)
movq 0x58(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x1bfad
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1bffa
testl %eax, %eax
je 0x1bf84
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
jmp 0x1bfdc
movq 0x48(%rbx), %rax
movq 0x60(%rbx), %rcx
leaq (%rax,%rcx), %rdx
movq %rax, 0x28(%rbx)
movq %rax, 0x20(%rbx)
movq %rdx, 0x30(%rbx)
cmpl $-0x1, %ebp
je 0x1bfdc
testq %rcx, %rcx
jle 0x1bfe6
movb %bpl, (%rax)
incq 0x28(%rbx)
movzbl %bpl, %eax
jmp 0x1bfe1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
movzbl %bpl, %esi
movq (%rbx), %rax
movq 0x68(%rax), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/include/zstr.hpp
// Function: zstr::ostreambuf::deflate_loop(int)
int deflate_loop(int flush)
    {
        while (true)
        {
            zstrm_p->next_out = reinterpret_cast< decltype(zstrm_p->next_out) >(out_buff);
            zstrm_p->avail_out = buff_size;
            int ret = deflate(zstrm_p, flush);
            if (ret != Z_OK && ret != Z_STREAM_END && ret != Z_BUF_ERROR) throw Exception(zstrm_p, ret);
            std::streamsize sz = sbuf_p->sputn(out_buff, reinterpret_cast< decltype(out_buff) >(zstrm_p->next_out) - out_buff);
            if (sz != reinterpret_cast< decltype(out_buff) >(zstrm_p->next_out) - out_buff)
            {
                // there was an error in the sink stream
                return -1;
            }
            if (ret == Z_STREAM_END || ret == Z_BUF_ERROR || sz == 0)
            {
                break;
            }
        }
        return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x50(%rdi), %rdx
movq 0x58(%rdi), %rdi
movq %rdx, 0x18(%rdi)
movl 0x60(%rbx), %eax
movl %eax, 0x20(%rdi)
movl %ebp, %esi
callq 0x61d0
movl %eax, %r14d
cmpl $0x2, %eax
jb 0x1c02d
cmpl $-0x5, %r14d
jne 0x1c082
movq 0x40(%rbx), %rdi
movq 0x50(%rbx), %rsi
movq 0x58(%rbx), %rax
movq 0x18(%rax), %rdx
subq %rsi, %rdx
movq (%rdi), %rax
callq *0x60(%rax)
movq %rax, %rcx
movq 0x50(%rbx), %rdx
movq 0x58(%rbx), %rdi
movq 0x18(%rdi), %rax
subq %rdx, %rax
cmpq %rax, %rcx
jne 0x1c072
xorl %eax, %eax
testq %rcx, %rcx
je 0x1c077
cmpl $0x1, %r14d
je 0x1c077
cmpl $-0x5, %r14d
jne 0x1c00e
jmp 0x1c077
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x61f0
movq %rax, %r15
movq 0x58(%rbx), %rsi
movq %rax, %rdi
movl %r14d, %edx
callq 0x1ae76
leaq 0x236cb(%rip), %rsi     # 0x3f770
leaq -0xfb4(%rip), %rdx      # 0x1b0f8
movq %r15, %rdi
callq 0x6640
movq %rax, %rbx
movq %r15, %rdi
callq 0x62e0
movq %rbx, %rdi
callq 0x6660
nop
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/src/edlib.cpp
// Function: AlignmentData::~AlignmentData()
~AlignmentData() {
        delete[] Ps;
        delete[] Ms;
        delete[] scores;
        delete[] firstBlocks;
        delete[] lastBlocks;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2db31
callq 0x64f0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2db3f
callq 0x64f0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2db4d
callq 0x64f0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2db5b
callq 0x64f0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2db6a
popq %rbx
jmp 0x64f0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/src/edlib.cpp
// Function: AlignmentData::AlignmentData(int, int)
AlignmentData(int maxNumBlocks, int targetLength) {
        // We build a complete table and mark first and last block for each column
        // (because algorithm is banded so only part of each columns is used).
        // TODO: do not build a whole table, but just enough blocks for each column.
         Ps     = new Word[maxNumBlocks * targetLength];
         Ms     = new Word[maxNumBlocks * targetLength];
         scores = new  int[maxNumBlocks * targetLength];
         firstBlocks = new int[targetLength];
         lastBlocks  = new int[targetLength];
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
imull %edx, %esi
movslq %esi, %rax
leaq (,%rax,8), %r14
testl %eax, %eax
movq $-0x1, %r12
cmovsq %r12, %r14
leaq (,%rax,4), %r15
cmovsq %r12, %r15
movq %r14, %rdi
callq 0x6030
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x6030
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x6030
movq %rax, 0x10(%rbx)
movl %ebp, %r14d
shlq $0x2, %r14
testl %ebp, %ebp
cmovsq %r12, %r14
movq %r14, %rdi
callq 0x6030
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x6030
movq %rax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/src/seq_tools.cpp
// Function: fix_qual_length(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::string fix_qual_length(std::string seq, std::string qual) {
    if(qual.length() < seq.length()) {
        qual.insert(qual.begin(), seq.length() - qual.length(), 'A');
    } else if (qual.length() > seq.length()) {
        qual = qual.substr(0, seq.length());
    }
    return(qual);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rcx
movq %rcx, %rax
subq 0x8(%rdx), %rax
jbe 0x2e0a6
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
movl $0x41, %r8d
callq 0x66b0
jmp 0x2e0dd
jae 0x2e0dd
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x63f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64d0
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2e0dd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x63c0
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x2e0fc
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x2e102
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/src/seq_tools.cpp
// Function: v2_corrected_bc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<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>>>>, int)
std::string v2_corrected_bc(std::string bc, std::set<std::string> whitelist, int maxdist) {
  int mindist = 999;
  std::string best_candidate = "";
  bool ambig = false;
  for(auto cand : whitelist) {
    int dist = 999;
    if(((bc.length() - cand.length())^2) < 4)
      dist = levenshteinDistance(bc, cand, maxdist);
    if(dist < mindist) {
      mindist = dist;
      best_candidate = cand;
      ambig = false;
    } else if (dist == mindist) {
      ambig = true;
    }
  }
  if(mindist <= maxdist) {
    return(best_candidate);
  } else {
    return("");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x48(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3a8c(%rip), %rdx      # 0x32439
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x1bde6
movq 0x18(%r14), %r12
addq $0x8, %r14
cmpq %r14, %r12
movl %ebx, 0x4(%rsp)
je 0x2ea6e
movslq %ebx, %rax
movq %rax, 0x50(%rsp)
movl $0x3e7, %r13d           # imm = 0x3E7
leaq 0x28(%rsp), %rbp
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x1c190
movq 0x8(%r15), %rax
subq 0x30(%rsp), %rax
movl $0x3e7, %ebx            # imm = 0x3E7
cmpq $0x3, %rax
ja 0x2ea27
movq %r15, %rdi
movq %rbp, %rsi
movq 0x50(%rsp), %rdx
callq 0x2eb3f
movl %eax, %ebx
cmpl %r13d, %ebx
jge 0x2ea3c
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x6230
movl %ebx, %r13d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2ea58
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63c0
movq %r12, %rdi
callq 0x6470
movq %rax, %r12
cmpq %r14, %rax
jne 0x2e9e2
jmp 0x2ea74
movl $0x3e7, %r13d           # imm = 0x3E7
movq 0x48(%rsp), %r14
leaq 0x10(%r14), %rax
movq %rax, (%r14)
cmpl 0x4(%rsp), %r13d
jle 0x2eab7
leaq 0x39ab(%rip), %rdx      # 0x32439
movq %r14, %rdi
movq %rdx, %rsi
leaq 0x18(%rsp), %rbx
callq 0x1bde6
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2eae3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
jmp 0x2eae3
movq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %rdx
cmpq %rdx, %rcx
je 0x2ead4
movq %rcx, (%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
jmp 0x2eada
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eaf7
movq %rax, %rbx
jmp 0x2eb1b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2eb1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2eb37
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x63c0
movq %rbx, %rdi
callq 0x6660
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: initServer(int&, int)
void initServer(int& serverSock, int port) {
	struct sockaddr_in serverAddr;
	
	if((serverSock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
		printf("socket() failed\n");
		exit(1);
	}
	
	int yes = 1;
	if(setsockopt(serverSock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) {
		printf("setsockopt() failed\n");
		exit(1);
	}
	
	memset(&serverAddr, 0, sizeof(serverAddr));
	serverAddr.sin_family = AF_INET;
	serverAddr.sin_port = htons(port);
	serverAddr.sin_addr.s_addr = htonl(INADDR_ANY);
	
	if(bind(serverSock, (sockaddr *)&serverAddr, sizeof(serverAddr)) < 0) {
		printf("bind() failed\n");
		exit(1);
	}
	
	if(listen(serverSock, MAXPLAYERS) < 0) {
		printf("listen() failed\n");
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl $0x2, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x2090
movl %eax, (%rbx)
testl %eax, %eax
js 0x5289
leaq -0x14(%rbp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2330
testl %eax, %eax
js 0x5292
leaq -0x24(%rbp), %rsi
movq $0x0, 0x8(%rsi)
rolw $0x8, %r14w
movw $0x2, (%rsi)
movw %r14w, 0x2(%rsi)
movl $0x0, 0x4(%rsi)
movl (%rbx), %edi
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
js 0x529b
movl (%rbx), %edi
movl $0xa, %esi
callq 0x2240
testl %eax, %eax
js 0x52a4
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3156(%rip), %rdi      # 0x83e6
jmp 0x52ab
leaq 0x3139(%rip), %rdi      # 0x83d2
jmp 0x52ab
leaq 0x3122(%rip), %rdi      # 0x83c4
jmp 0x52ab
leaq 0x3109(%rip), %rdi      # 0x83b4
callq 0x22b0
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: splitString(char**, char*, char const*)
void splitString(char* parts[], char* target, const char* delim) {
	char* tok;
	tok = std::strtok(target, delim);
	int i = 0;
	while (tok != NULL) {
		parts[i] = tok;
		tok = strtok(NULL, delim);
		i++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x22e0
testq %rax, %rax
je 0x52ea
movq %rax, (%r14)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x22e0
addq $0x8, %r14
jmp 0x52d2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: countChars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
int countChars(string l, char s) {
	int elements = 0;
	for (int i = 0; i < l.length(); i++) {
		if(l[i] == s) {
			elements++;
		}
	}
	return elements;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x531b
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
xorl %edi, %edi
xorl %eax, %eax
xorl %r8d, %r8d
cmpb %sil, (%rdx,%rdi)
sete %r8b
addl %r8d, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0x5303
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: shuffle(std::vector<Card, std::allocator<Card>>, int)
vector<Card> shuffle(vector<Card> deck, int seed) {
	vector<Card> newDeck;
	newDeck.clear();
	
	for (int i = 1; i < deck.size(); i+=2) {
		newDeck.push_back(deck[i]);
	}
	for (int i = 0; i < deck.size(); i+=2) {
		newDeck.push_back(deck[i]);
	}
	if(seed == 0) {
		return newDeck;
	}
	else {
		return shuffle(newDeck, seed - 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, -0x58(%rbp)
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %esi, %esi
callq 0x6c48
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %r13 # imm = 0x8E38E38E38E38E39
imulq %r13, %rcx
cmpq $0x2, %rcx
jb 0x53b6
movl $0x1, %ebx
movl $0x48, %r14d
leaq -0x50(%rbp), %r12
addq %r14, %rsi
movq %r12, %rdi
callq 0x2f92
addq $0x2, %rbx
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
addq $0x90, %r14
cmpq %rbx, %rcx
ja 0x5386
cmpq %rsi, %rax
je 0x53f1
xorl %ebx, %ebx
leaq -0x50(%rbp), %r12
xorl %r14d, %r14d
addq %rbx, %rsi
movq %r12, %rdi
callq 0x2f92
addq $0x2, %r14
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r13, %rax
addq $0x90, %rbx
cmpq %r14, %rax
ja 0x53c4
movl -0x2c(%rbp), %r14d
testl %r14d, %r14d
je 0x5428
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2fca
movq -0x58(%rbp), %rbx
decl %r14d
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x531e
leaq -0x70(%rbp), %rdi
callq 0x2f54
jmp 0x5452
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rbx
movq %rax, (%rbx)
movq -0x48(%rbp), %rax
movq %rax, 0x8(%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2f54
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2f54
jmp 0x5482
jmp 0x547f
jmp 0x547f
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2f54
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: composeSENDMessage[abi:cxx11](char, Card)
string composeSENDMessage(char type, Card cardToSend) {
	if(type == 'p') {
		//printf("About to send POST:\n%s\n", cardToSend.content.c_str());
		return "POST Server\n" + cardToSend.content;
	}
	else if(type == 'n') {
		//printf("About to send ANSWER:\n%s %s\n", cardToSend.owner.c_str(), cardToSend.content.c_str());
		return "ANSWER " + cardToSend.owner + "\n" + cardToSend.content;
	}
	else if (type == 'd') {
		//printf("About to send ADD:\n%s\n", cardToSend.content.c_str());
		return "ADD Server\n" + cardToSend.content;
	}
	else {
		return "";
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x64, %esi
je 0x55e2
cmpl $0x6e, %esi
je 0x5598
cmpl $0x70, %esi
jne 0x55f9
leaq 0x2b7b(%rip), %rsi      # 0x8111
jmp 0x55e9
leaq 0x28(%r14), %rdx
leaq 0x2b7b(%rip), %rsi      # 0x811e
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x69ac
leaq 0x2aff(%rip), %rsi      # 0x80b5
movq %r15, %rdi
callq 0x2360
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5617
movq %rdx, -0x38(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x28(%rbp)
jmp 0x561e
leaq 0x2b3d(%rip), %rsi      # 0x8126
movq %rbx, %rdi
movq %r14, %rdx
callq 0x69ac
jmp 0x56b2
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2aaf(%rip), %rdx      # 0x80b6
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x6ca8
jmp 0x56b2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x38(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x20d0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x5667
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x566d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x5699
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56b2
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x56dd
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x56dd
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56f6
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/muzuka[P]Cards-Against-Humanity-Online/Server.cpp
// Function: shuffle(std::vector<Player, std::allocator<Player>>, int)
vector<Player> shuffle(vector<Player> deck, int seed) {
	vector<Player> newDeck;
	newDeck.clear();
	
	for (int i = 1; i < deck.size(); i+=2) {
		newDeck.push_back(deck[i]);
	}
	for (int i = 0; i < deck.size(); i+=2) {
		newDeck.push_back(deck[i]);
	}
	if (seed == 0) {
		return newDeck;
	}
	else {
		return shuffle(newDeck, seed - 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, -0x58(%rbp)
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %esi, %esi
callq 0x6c78
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
movabsq $0x2e8ba2e8ba2e8ba3, %r13 # imm = 0x2E8BA2E8BA2E8BA3
imulq %r13, %rcx
cmpq $0x2, %rcx
jb 0x5796
movl $0x1, %ebx
movl $0x58, %r14d
leaq -0x50(%rbp), %r12
addq %r14, %rsi
movq %r12, %rdi
callq 0x68d2
addq $0x2, %rbx
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
addq $0xb0, %r14
cmpq %rbx, %rcx
ja 0x5766
cmpq %rsi, %rax
je 0x57d1
xorl %ebx, %ebx
leaq -0x50(%rbp), %r12
xorl %r14d, %r14d
addq %rbx, %rsi
movq %r12, %rdi
callq 0x68d2
addq $0x2, %r14
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r13, %rax
addq $0xb0, %rbx
cmpq %r14, %rax
ja 0x57a4
movl -0x2c(%rbp), %r14d
testl %r14d, %r14d
je 0x5808
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x690a
movq -0x58(%rbp), %rbx
decl %r14d
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x56fe
leaq -0x70(%rbp), %rdi
callq 0x6856
jmp 0x5832
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rbx
movq %rax, (%rbx)
movq -0x48(%rbp), %rax
movq %rax, 0x8(%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6856
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x6856
jmp 0x5862
jmp 0x585f
jmp 0x585f
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x6856
movq %rbx, %rdi
callq 0x2320