LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/gzstream.h
// Function: gzstreambuf::close()
gzstreambuf * close() {
        if ( is_open()) {
            sync();
            opened = 0;
            if ( gzclose( file) == Z_OK)
                return this;
        }
        return (gzstreambuf*)0;
    }

// Assembly:
pushq %rbx
cmpb $0x0, 0x177(%rdi)
je 0x70fb
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x30(%rax)
movb $0x0, 0x177(%rbx)
movq 0x40(%rbx), %rdi
callq 0x5670
testl %eax, %eax
je 0x70fd
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/gzstream.h
// Function: gzstreambuf::open(char const*, int)
gzstreambuf* open( const char* name, int open_mode) {
        if ( is_open())
            return (gzstreambuf*)0;
        mode = open_mode;
        // no append nor read/write mode
        if ((mode & std::ios::ate) || (mode & std::ios::app)
            || ((mode & std::ios::in) && (mode & std::ios::out)))
            return (gzstreambuf*)0;
        char  fmode[10];
        char* fmodeptr = fmode;
        if ( mode & std::ios::in)
            *fmodeptr++ = 'r';
        else if ( mode & std::ios::out)
            *fmodeptr++ = 'w';
        *fmodeptr++ = 'b';
        *fmodeptr = '\0';
        file = gzopen( name, fmode);
        if (file == 0)
            return (gzstreambuf*)0;
        opened = 1;
        return this;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x177(%rdi)
jne 0x71aa
movq %rdi, %rbx
movl %edx, 0x178(%rdi)
testb $0x3, %dl
jne 0x71aa
movl %edx, %eax
notl %eax
testb $0x18, %al
je 0x71aa
testb $0x8, %dl
jne 0x716f
testb $0x10, %dl
jne 0x717a
leaq 0x6(%rsp), %rax
jmp 0x7183
leaq 0x7(%rsp), %rax
movb $0x72, -0x1(%rax)
jmp 0x7183
leaq 0x7(%rsp), %rax
movb $0x77, -0x1(%rax)
movw $0x62, (%rax)
leaq 0x6(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x55b0
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x71aa
movb $0x1, 0x177(%rbx)
jmp 0x71ac
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: splitFileName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string splitFileName(const std::string & str){
	std::string filename=str;
	std::string path="";
	std::string::size_type found=filename.find_last_of("/\\");
	if (found!=std::string::npos){
		path=str.substr(0,found);
		filename=str.substr(found+1);
	}
	return filename;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5540
leaq 0x1ef85(%rip), %rsi     # 0x262c2
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x77c0
leaq 0x1df25(%rip), %rsi     # 0x25278
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x53d0
cmpq $-0x1, %rax
je 0x73c1
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x5420
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x54a0
movq %r12, %rdi
callq 0x5778
incq %r15
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x5420
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x54a0
movq %r14, %rdi
callq 0x5778
leaq 0x28(%rsp), %rdi
callq 0x5778
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x73dc
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5778
jmp 0x73ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x5778
movq %r14, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: openFileStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::basic_ifstream<char, std::char_traits<char>>&, bool)
int openFileStream(const std::string & fileName, std::ifstream & fileStream, bool verbose){

	fileStream.close();
	fileStream.clear();

	if (verbose){
		std::cout << "Reading " << fileName << std::endl;
	}

	fileStream.open(fileName, std::ios::in);
	if (fileStream.fail()) {
		std::cerr << "Failed to open " << fileName << std::endl << std::endl;
		return 1;
	}
	return 0;
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x50a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x5680
testl %r15d, %r15d
je 0x7454
movq 0x2eb83(%rip), %rdi     # 0x35fb8
leaq 0x1de3f(%rip), %rsi     # 0x2527b
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5380
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x74a2
movq 0x2eb78(%rip), %rdi     # 0x35ff0
leaq 0x1dfa8(%rip), %rsi     # 0x25427
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: openGzFileStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, igzstream&, bool)
int openGzFileStream(const std::string & fileName, igzstream & gzFileStream, bool verbose){

	gzFileStream.close();
	gzFileStream.clear();

	gzFileStream.open(fileName.c_str());
	if (gzFileStream.fail()) {
		std::cerr << "Failed to open " << fileName << std::endl << std::endl;
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6db4
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x5680
movq (%rbx), %rsi
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x710e
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x7522
movq 0x2eaf8(%rip), %rdi     # 0x35ff0
leaq 0x1df28(%rip), %rsi     # 0x25427
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: fileToVector(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>>>>&)
int fileToVector(const std::string & filename, std::vector < std::string > & fileargs){
	std::ifstream fileStream;
	fileStream.open(filename, std::ios::in);
	if (fileStream.fail()) {
		std::cerr << "Failed to open " << filename << std::endl << std::endl;
		return 1;
	}
	std::string word;
	while (fileStream >> word){
		if (word.length()>500){
			std::cerr << "Names > 500 characters are not allowed" << std::endl;
			return 1;
		}
		else if (word.length()>0){
			fileargs.push_back(word);
		}
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x5450
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5380
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0x7599
movq 0x2ea83(%rip), %rdi     # 0x35ff0
leaq 0x1deb3(%rip), %rsi     # 0x25427
callq 0x53f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbx
jmp 0x7618
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x54d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x75ec
movq 0x10(%rsp), %rax
cmpq $0x1f5, %rax            # imm = 0x1F5
jae 0x75f0
testq %rax, %rax
je 0x75b4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x77fc
jmp 0x75b4
xorl %ebx, %ebx
jmp 0x760e
movq 0x2e9f9(%rip), %rdi     # 0x35ff0
leaq 0x1dc86(%rip), %rsi     # 0x25284
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbx
leaq 0x8(%rsp), %rdi
callq 0x5778
leaq 0x28(%rsp), %rdi
callq 0x50e0
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
jmp 0x7638
movq %rax, %rbx
jmp 0x7645
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5778
leaq 0x28(%rsp), %rdi
callq 0x50e0
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: printDuration(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)
void printDuration(const std::chrono::high_resolution_clock::time_point start){
	std::chrono::high_resolution_clock::time_point finish = std::chrono::high_resolution_clock::now();
	std::chrono::duration<double> elapsed = finish - start;
	std::cout << "Done" << std::endl;
	std::cout << "Total time required: " << elapsed.count() << "s" << std::endl;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x5050
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x1dbe4(%rip), %xmm0    # 0x25258
movsd %xmm0, 0x8(%rsp)
movq 0x2e937(%rip), %rbx     # 0x35fb8
leaq 0x1dc23(%rip), %rsi     # 0x252ab
movq %rbx, %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
leaq 0x1dc11(%rip), %rsi     # 0x252b0
movq %rbx, %rdi
callq 0x53f0
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5620
leaq 0x1fcc0(%rip), %rsi     # 0x2737c
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x51c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/general.cpp
// Function: calculateMissedSNPs(float, float, int)
int calculateMissedSNPs(float totalSiteCount, const float variantSiteCount, const int kmerSize){

	if (variantSiteCount==0){
		std::cout << "Expected number of missed alignments = 0" << std::endl;
		return 0;
	}
	if (totalSiteCount<variantSiteCount){
		std::cout << "Error in calculateMissedSNPs. More variants than sites." << std::endl;
		return 1;
	}

	double nonvariantSiteCount=totalSiteCount-variantSiteCount;
	totalSiteCount--;//as we are assuming the kmer includes one snp
	double snpprobability=nonvariantSiteCount/totalSiteCount;

	for (int i=0; i<kmerSize*2; ++i){
		totalSiteCount--;
		nonvariantSiteCount--;
		snpprobability*=nonvariantSiteCount/totalSiteCount;
	}

	std::cout << "Expected number of missed alignments = " << (1.0-snpprobability)*variantSiteCount << std::endl;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x76f8
jp 0x76f8
movq 0x2e8d1(%rip), %rdi     # 0x35fb8
leaq 0x1dbd8(%rip), %rsi     # 0x252c6
callq 0x53f0
jmp 0x77ad
ucomiss %xmm0, %xmm1
jbe 0x7718
movq 0x2e8b4(%rip), %rdi     # 0x35fb8
leaq 0x1dbe4(%rip), %rsi     # 0x252ef
callq 0x53f0
pushq $0x1
popq %rbx
jmp 0x77af
movaps %xmm0, %xmm2
movss %xmm1, 0x4(%rsp)
subss %xmm1, %xmm2
cvtss2sd %xmm2, %xmm1
addss 0x1db3f(%rip), %xmm0    # 0x25270
cvtss2sd %xmm0, %xmm2
movaps %xmm1, %xmm6
divsd %xmm2, %xmm6
addl %edi, %edi
xorl %eax, %eax
testl %edi, %edi
cmovgl %edi, %eax
movss 0x1db23(%rip), %xmm2    # 0x25270
movsd 0x1db0b(%rip), %xmm3    # 0x25260
subl $0x1, %eax
jb 0x7774
addss %xmm2, %xmm0
addsd %xmm3, %xmm1
cvtss2sd %xmm0, %xmm4
movapd %xmm1, %xmm5
divsd %xmm4, %xmm5
mulsd %xmm5, %xmm6
jmp 0x7755
movq 0x2e83d(%rip), %rdi     # 0x35fb8
leaq 0x1dba5(%rip), %rsi     # 0x25327
movsd %xmm6, 0x8(%rsp)
callq 0x53f0
movsd 0x1dad3(%rip), %xmm1    # 0x25268
subsd 0x8(%rsp), %xmm1
cvtss2sd 0x4(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x5620
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x51c0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: ascii_bitstring(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void ascii_bitstring(std::string & mybits){
	int myremainder=::fmod(int(mybits.length()),6);
	if (myremainder>0){
		for (int i = 0; i<(6-myremainder); ++i){
			mybits.push_back('0');
		}
	}
	for (std::string::size_type i = 0; i<mybits.length(); i+=6){
		assert((i+5)<mybits.length());
		mybits[i/6] = ((int(mybits[i])-'0')+((int(mybits[i+1])-'0')*2)+((int(mybits[i+2])-'0')*4)+((int(mybits[i+3])-'0')*8)+((int(mybits[i+4])-'0')*16)+((int(mybits[i+5])-'0')*32))+33;
	}
	mybits.erase(mybits.length()/6);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cvtsi2sdl 0x8(%rdi), %xmm0
movsd 0x1d8b0(%rip), %xmm1    # 0x25398
callq 0x5520
cvttsd2si %xmm0, %eax
testl %eax, %eax
jle 0x7b18
pushq $0x6
popq %rcx
subl %eax, %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
cmovgl %ecx, %r14d
pushq $0x30
popq %rbp
subl $0x1, %r14d
jb 0x7b18
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5370
jmp 0x7b06
xorl %eax, %eax
pushq $0x6
popq %rsi
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jae 0x7b7f
leaq 0x5(%rax), %rdi
cmpq %rcx, %rdi
jae 0x7b99
movq (%rbx), %rcx
movb 0x1(%rcx,%rax), %r8b
movb 0x2(%rcx,%rax), %dl
addb %r8b, %r8b
shlb $0x2, %dl
movb 0x3(%rcx,%rax), %r9b
shlb $0x3, %r9b
addb %dl, %r9b
movb 0x4(%rcx,%rax), %dl
shlb $0x4, %dl
addb %r9b, %dl
movb 0x5(%rcx,%rax), %r9b
shlb $0x5, %r9b
addb %dl, %r9b
addb (%rcx,%rax), %r8b
addb %r9b, %r8b
addb $0x51, %r8b
xorl %edx, %edx
divq %rsi
movb %r8b, (%rcx,%rax)
incq %rdi
movq %rdi, %rax
jmp 0x7b1d
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x50c0
leaq 0x1d820(%rip), %rdi     # 0x253c0
leaq 0x1d82f(%rip), %rsi     # 0x253d6
leaq 0x1d836(%rip), %rcx     # 0x253e4
pushq $0x17
popq %rdx
callq 0x5270
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: vectorbool_from_ascii(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<bool, std::allocator<bool>>&)
void vectorbool_from_ascii(std::string & myascii, std::vector < bool > & mybits){
	mybits.resize(myascii.length()*6, false);
	for (std::string::size_type i = 0; i<myascii.length(); ++i){
		int bits=int(myascii[i])-33;
		for (int j=5; j>=0; --j){
			int power=int(pow(2,j));
			mybits[j+(6*i)]=int(bits/power);
			bits=bits%power;
		}
	}
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
imulq $0x6, 0x8(%rdi), %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8fce
movq %r14, (%rsp)
cmpq 0x8(%r14), %r12
jae 0x7c42
movq (%r14), %rax
movsbl (%rax,%r12), %ebp
addl $-0x21, %ebp
imulq $0x6, %r12, %r13
pushq $0x5
popq %r14
testl %r14d, %r14d
js 0x7c39
cvtsi2sd %r14d, %xmm0
callq 0x53b0
cvttsd2si %xmm0, %ecx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %r15d
movl %r14d, %esi
addq %r13, %rsi
movl %edx, %ebp
movq %rbx, %rdi
callq 0x903c
testl %r15d, %r15d
je 0x7c2b
orq (%rax), %rdx
jmp 0x7c31
notq %rdx
andq (%rax), %rdx
movq %rdx, (%rax)
decl %r14d
jmp 0x7bf6
incq %r12
movq (%rsp), %r14
jmp 0x7bdd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: extractMiddleBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char&)
int extractMiddleBase(std::string & myString, char & myChar){
	float stringlen=(myString.length()-1)/2;
	float myremainder=::fmod((myString.length()-1),stringlen);
	if (myremainder>0){
		return 1;
	}
	myChar=myString[stringlen];
	myString.erase(myString.begin()+stringlen);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
decq %rax
movq %rax, %xmm1
shrq %rax
cvtsi2ss %rax, %xmm2
punpckldq 0x1d726(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d72e(%rip), %xmm1    # 0x253b0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movaps %xmm2, (%rsp)
cvtss2sd %xmm2, %xmm1
callq 0x5520
cvtsd2ss %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7cac
pushq $0x1
popq %rax
jmp 0x7cea
movaps (%rsp), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
cvttss2si %xmm0, %rsi
subss 0x1d343(%rip), %xmm0    # 0x25008
cvttss2si %xmm0, %rdx
sarq $0x3f, %rcx
andq %rcx, %rdx
orq %rax, %rdx
movq (%rbx), %rax
movb (%rax,%rdx), %al
movb %al, (%r14)
addq (%rbx), %rsi
movq %rbx, %rdi
callq 0x54b0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: printKmerAlleleFrequencies(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::array<int, 8ul>, 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::array<int, 8ul>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int printKmerAlleleFrequencies(const std::unordered_map < std::string, std::array < int, 8 > > & mymap, const std::string outputfile){
	
	std::cout << "Writing kmer allele frequencies to " << outputfile << std::endl;

	std::ofstream allelefile(outputfile);
	if (allelefile.fail()){
		std::cerr << std::endl << "Error: Failed to open " << outputfile << std::endl << std::endl;
		return 1;
	}
	for (std::unordered_map < std::string, std::array < int, 8 > >::const_iterator it=mymap.begin(); it!=mymap.end(); ++it){
		std::string kmer=it->first;
		allelefile << kmer;
		for (std::array < int, 8 >::const_iterator it2=it->second.begin(); it2!=it->second.end()-4; ++it2){
		
			allelefile << "\t" << *it2;
		
		}
		allelefile << std::endl;
	}
	allelefile.close();
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2e020(%rip), %rdi     # 0x35fb8
leaq 0x1d49a(%rip), %rsi     # 0x25439
callq 0x53f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
leaq 0x28(%rsp), %r15
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5740
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0x8013
movq 0x2e011(%rip), %rdi     # 0x35ff0
callq 0x51c0
leaq 0x1d435(%rip), %rsi     # 0x25420
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbx
jmp 0x808e
addq $0x10, %rbx
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
pushq $0x28
popq %r13
leaq 0x1e295(%rip), %r12     # 0x262c1
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x8082
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x5540
movq %r15, %rdi
movq %r14, %rsi
callq 0x53a0
movq %r13, %rbp
cmpq $0x38, %rbp
je 0x8070
movq %r15, %rdi
movq %r12, %rsi
callq 0x53f0
movl (%rbx,%rbp), %esi
movq %rax, %rdi
callq 0x56a0
addq $0x4, %rbp
jmp 0x804e
movq %r15, %rdi
callq 0x51c0
movq %r14, %rdi
callq 0x5778
jmp 0x802c
xorl %ebx, %ebx
leaq 0x28(%rsp), %rdi
callq 0x5560
leaq 0x28(%rsp), %rdi
callq 0x55c0
movl %ebx, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x80ae
movq %rax, %rbx
jmp 0x80c2
jmp 0x80b5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5778
leaq 0x28(%rsp), %rdi
callq 0x55c0
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: readKmerHeader(std::basic_ifstream<char, std::char_traits<char>>&, int&, 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>>>>&)
int readKmerHeader(std::ifstream & fileStream, int & kmersize, std::vector < std::string > & names){
	
	std::string line;
	std::getline(fileStream, line);
	fileStream >> kmersize;
	if (kmersize==0){
		return 1;
	}

	std::string name;
	std::getline(fileStream, line);
	std::getline(fileStream, line);

	std::istringstream ss(line);
	while(ss >> name){
		names.push_back(name);
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rsi
callq 0x5080
movq %r14, %rdi
movq %r15, %rsi
callq 0x5250
cmpl $0x0, (%r15)
je 0x83e9
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5080
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5080
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x5660
leaq 0x40(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x54d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x83d1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x77fc
jmp 0x83ab
leaq 0x40(%rsp), %rdi
callq 0x51b0
leaq 0x20(%rsp), %rdi
callq 0x5778
xorl %ebx, %ebx
jmp 0x83ec
pushq $0x1
popq %rbx
movq %rsp, %rdi
callq 0x5778
movl %ebx, %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x8405
movq %rax, %rbx
jmp 0x841c
movq %rax, %rbx
jmp 0x8426
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x51b0
leaq 0x20(%rsp), %rdi
callq 0x5778
movq %rsp, %rdi
callq 0x5778
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: addKmerToBaseArrayMap(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::array<int, 8ul>, 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::array<int, 8ul>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, bool)
void addKmerToBaseArrayMap(std::unordered_map < std::string, std::array < int, 8 > > & kmerMap, const std::string & kmer, const char base, const bool firstFile){

	std::unordered_map < std::string, std::array < int, 8 > >::iterator it = kmerMap.find(kmer);//check if the kmer is in the hash
	if ( it != kmerMap.end() ){//if the kmer is in the hash
		it->second[base_score[int(base)]]++;//increment the count of the base for the kmer
	}
	else if (firstFile) {//if the kmers isn't in the hash and we are adding from the first fastq file
		std::pair < std::unordered_map < std::string, std::array < int, 8 > >::iterator,bool>  ret = kmerMap.insert(std::make_pair(kmer, std::array < int, 8 > ()));//insert the kmer into the hash
		ret.first->second[base_score[int(base)]]=1;//increment the count of the base for the kmer
	}
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0xa1a8
testq %rax, %rax
je 0x8a45
movsbq %bl, %rcx
leaq 0x2da16(%rip), %rdx     # 0x36450
movsbq (%rdx,%rcx), %rcx
incl 0x28(%rax,%rcx,4)
jmp 0x8a96
testb %bpl, %bpl
je 0x8a96
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5540
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa278
movq %rax, %r14
movq %rsp, %rdi
callq 0x5778
movsbq %bl, %rax
leaq 0x2d9c8(%rip), %rcx     # 0x36450
movsbq (%rcx,%rax), %rax
movl $0x1, 0x28(%r14,%rax,4)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5778
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/kmers.cpp
// Function: applyFileKmerArrayMapFilters(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::array<int, 8ul>, 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::array<int, 8ul>>>>&, int const&)
void applyFileKmerArrayMapFilters(std::unordered_map < std::string, std::array < int, 8 > > & kmerMap, const int & userfilecutoff){

	std::cout << "Filtering kmers for file coverage" << std::endl;

	int filebasecoverage;
	int maxfilebasecoverage;
	float filecovcutoff;

	std::unordered_map < std::string, std::array < int, 8 > >::iterator it = kmerMap.begin();
	std::unordered_map < std::string, std::array < int, 8 > >::iterator endIter = kmerMap.end();
	for (; it!=endIter; ){

		//calculate the total file kmer coverage and remove the kmer if it is below the minimum cutoff
		filebasecoverage=0;
		maxfilebasecoverage=0;
		for (std::array < int, 8 >::iterator it2=it->second.begin(); it2!=it->second.begin()+4; ++it2){
			filebasecoverage+=*it2;
			if (*it2>maxfilebasecoverage){
				maxfilebasecoverage=*it2;
			}
		}

		if (filebasecoverage<userfilecutoff){
			kmerMap.erase(it++);
		}
		else {
			int j=4;
			for (int i=0; i<4; ++i, ++j){
				it->second[j]+=it->second[i];
				it->second[i]=0;
			}
			++it;
		}

	}
	std::cout << kmerMap.size() << " unique kmers in map after filtering" << std::endl;
	//return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2d4ec(%rip), %rdi     # 0x35fb8
leaq 0x1cac3(%rip), %rsi     # 0x25596
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq 0x10(%rbx), %rsi
pushq $0x28
popq %r15
pushq $0xe
popq %r12
testq %rsi, %rsi
je 0x8b39
xorl %eax, %eax
movq %r15, %rcx
cmpq $0x38, %rcx
je 0x8b05
addl (%rsi,%rcx), %eax
addq $0x4, %rcx
jmp 0x8af6
cmpl (%r14), %eax
jge 0x8b1a
movq (%rsi), %r13
movq %rbx, %rdi
callq 0xa5e0
movq %r13, %rsi
jmp 0x8aec
movq %r12, %rax
cmpq $0x12, %rax
je 0x8b34
movl -0x10(%rsi,%rax,4), %ecx
addl %ecx, (%rsi,%rax,4)
andl $0x0, -0x10(%rsi,%rax,4)
incq %rax
jmp 0x8b1d
movq (%rsi), %rsi
jmp 0x8aec
movq 0x18(%rbx), %rsi
movq 0x2d474(%rip), %rdi     # 0x35fb8
callq 0x5280
leaq 0x1ca68(%rip), %rsi     # 0x255b8
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x51c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/sk_alleles.cpp
// Function: addKmerToStringMap(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&, char, int, int)
void addKmerToStringMap(std::unordered_map < std::string, std::string > & myKmerMap, const std::string & myKmer, const char myBase, const int alleleNumber, const int alleleCount){
	std::unordered_map < std::string, std::string >::iterator kmit = myKmerMap.find(myKmer);//check if the kmer is in the hash				
	if ( kmit != myKmerMap.end() ){//if the kmer is in the hash
		if (kmit->second[alleleNumber]=='-'){
			kmit->second[alleleNumber]=myBase;//add the base to the correct sample
		}
		else if (kmit->second[alleleNumber]!=myBase){
			kmit->second[alleleNumber]='N';//change to N if it's a repeat
		}
	}
	else {//if the kmers isn't in the hash
		std::pair < std::unordered_map < std::string, std::string >::iterator, bool > ret = myKmerMap.insert(std::make_pair(myKmer, std::string(alleleCount , '-')));//insert the kmer into the hash
		ret.first->second[alleleNumber]=myBase;//add the base to the correct sample
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x9c92
testq %rax, %rax
je 0xc5f0
movslq %ebp, %rcx
movq 0x28(%rax), %rax
movb (%rax,%rcx), %dl
cmpb $0x2d, %dl
jne 0xc648
movb %bl, (%rax,%rcx)
jmp 0xc650
movslq %r12d, %rsi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %r12
pushq $0x2d
popq %rdx
movq %r12, %rdi
callq 0x5470
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x928e
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x9dfa
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x90b8
movq %rsp, %rdi
callq 0x5778
movslq %ebp, %rax
movq 0x28(%r14), %rcx
movb %bl, (%rcx,%rax)
jmp 0xc650
cmpb %bl, %dl
je 0xc650
movb $0x4e, (%rax,%rcx)
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x90b8
jmp 0xc66f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5778
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/sk_find.cpp
// Function: getGeneticCode[abi:cxx11](int)
std::unordered_map < std::string, char > getGeneticCode(int translationTable){

	std::unordered_map < std::string, char > myGeneticCode=geneticCode;

	if (translationTable==4){
		myGeneticCode.insert(std::make_pair( "TGA", 'W' ));
		
	}
	return myGeneticCode;


}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x25838(%rip), %rsi     # 0x36550
callq 0x135c0
cmpl $0x4, %ebp
jne 0x10d3b
leaq 0x14fbd(%rip), %rax     # 0x25ce6
movq %rsp, %rsi
movq %rax, (%rsi)
movb $0x57, 0x8(%rsi)
movq %rbx, %rdi
callq 0x13ac8
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xda5a
movq %r14, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/sk_refalign.cpp
// Function: addKmerToBasePositionMap(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>, 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::vector<int, std::allocator<int>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void addKmerToBasePositionMap(std::unordered_map < std::string, std::vector <int> > & myKmerMap, const std::string & myKmer, const int myPosition){
	std::unordered_map < std::string, std::vector <int> >::iterator it = myKmerMap.find(myKmer);//check if the kmer is in the hash
	if ( it != myKmerMap.end() ){//if the kmer is in the hash
		it->second.push_back(myPosition);//add the location of the match to the map
	}
	else {
		myKmerMap.insert(std::make_pair(myKmer, std::vector < int > {myPosition}));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x10(%rsp)
callq 0x13d4e
testq %rax, %rax
je 0x15eb3
addq $0x28, %rax
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xbe78
jmp 0x15f00
leaq 0x14(%rsp), %rsi
movl %ebp, (%rsi)
leaq 0x18(%rsp), %r15
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
callq 0x17388
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x17414
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x13e1e
leaq 0x30(%rsp), %rdi
callq 0x13450
leaq 0x18(%rsp), %rdi
callq 0xc052
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x13450
jmp 0x15f1d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xc052
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/sk_type.cpp
// Function: addKmerToStringMap(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&, char, std::vector<bool, std::allocator<bool>> const&, int)
void addKmerToStringMap(std::unordered_map < std::string, std::string > & myKmerMap, const std::string & myKmer, const char myBase, const std::vector < bool > & myBits, const int numSamples){
	std::unordered_map < std::string, std::string >::iterator kmit = myKmerMap.find(myKmer);//check if the kmer is in the map
	if ( kmit != myKmerMap.end() ){//if the kmer is in the map
		for (int i=0; i<myBits.size(); ++i){
			if (myBits[i]){
				kmit->second[i]=myBase;
			}
		}
	}
	else {//if the kmer isn't in the map
		std::pair < std::unordered_map < std::string, std::string >::iterator, bool > ret = myKmerMap.insert(std::make_pair(myKmer, std::string (numSamples,'-')));
		for (int i=0; i<myBits.size(); ++i){
			if (myBits[i]){
				ret.first->second[i]=myBase;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %r13d
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
callq 0x9c92
testq %rax, %rax
je 0x18827
movq %rax, %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
subq (%rbx), %rax
leaq (%rcx,%rax,8), %rax
cmpq %r15, %rax
jbe 0x188a9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x909a
testb %al, %al
je 0x18822
movq 0x28(%r14), %rax
movb %bpl, (%rax,%r15)
incq %r15
jmp 0x187f4
movslq %r13d, %rsi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %r14
pushq $0x2d
popq %rdx
movq %r14, %rdi
callq 0x5470
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x928e
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x9dfa
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x90b8
leaq 0x8(%rsp), %rdi
callq 0x5778
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movl 0x18(%rbx), %ecx
subq (%rbx), %rax
leaq (%rcx,%rax,8), %rax
cmpq %r15, %rax
jbe 0x188a9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x909a
testb %al, %al
je 0x188a4
movq 0x28(%r14), %rax
movb %bpl, (%rax,%r15)
incq %r15
jmp 0x1887a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x90b8
jmp 0x188ca
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5778
movq %rbx, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/ska.cpp
// Function: getint(char*)
long int getint(char * arg){
	long int i;
	char * pEnd;i=strtol(arg, &pEnd, 10);
	if(*pEnd != '\0'){
    	throw std::invalid_argument( "received non integer" );
  	}
  	return i;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %rbx
pushq $0xa
popq %rdx
movq %rbx, %rsi
callq 0x5780
movq (%rbx), %rcx
cmpb $0x0, (%rcx)
jne 0x1dcca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x51d0
movq %rax, %rbx
leaq 0x8d08(%rip), %rsi      # 0x269e4
movq %rax, %rdi
callq 0x5710
movq 0x182ed(%rip), %rsi     # 0x35fd8
movq 0x182d6(%rip), %rdx     # 0x35fc8
movq %rbx, %rdi
callq 0x5690
movq %rax, %r14
movq %rbx, %rdi
callq 0x52e0
movq %r14, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/ska.cpp
// Function: getfloat(char*)
float getfloat(char * arg){
	float f;
	char * pEnd;f=strtof(arg, &pEnd);
	if(*pEnd != '\0'){
    	throw std::invalid_argument( "received non float" );
  	}
  	return f;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x5510
movq (%rbx), %rax
cmpb $0x0, (%rax)
jne 0x1dd2c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x51d0
movq %rax, %rbx
leaq 0x8cbb(%rip), %rsi      # 0x269f9
movq %rax, %rdi
callq 0x5710
movq 0x1828b(%rip), %rsi     # 0x35fd8
movq 0x18274(%rip), %rdx     # 0x35fc8
movq %rbx, %rdi
callq 0x5690
movq %rax, %r14
movq %rbx, %rdi
callq 0x52e0
movq %r14, %rdi
callq 0x56c0
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::checkServerArguments(int, char**)
void MyHelper::checkServerArguments(int argc, char *argv[])
{
    if (argc < 3)
    {
        cout << "Usage: " << argv[0] << " <port> <directory>" << endl;
        exit(EXIT_FAILURE);
    }

    if (!stringIsInt(argv[1]) || stoi(argv[1]) < 1024 || stoi(argv[1]) > 65535)
    {
        cout << "Invalid port" << endl;
        exit(EXIT_FAILURE);
    }

    if (opendir(argv[2]) == NULL)
    {
        perror("directory error");
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
cmpl $0x2, %esi
jle 0x3726
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x3b88
movq %r14, %rsi
callq 0x37cc
testb %al, %al
je 0x375a
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x3b88
leaq 0x10(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3bc3
cmpl $0x400, %eax            # imm = 0x400
jl 0x3750
movq 0x8(%rbx), %rsi
leaq 0x50(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x3b88
leaq 0x50(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3bc3
movl %eax, %ebp
leaq 0x50(%rsp), %rdi
callq 0x3150
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3150
cmpl $0xffff, %ebp           # imm = 0xFFFF
jg 0x3764
movq 0x10(%rbx), %rdi
callq 0x33b0
testq %rax, %rax
je 0x3787
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x68a3(%rip), %rdi      # 0x9fd0
leaq 0x38d0(%rip), %rsi      # 0x7004
callq 0x32a0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x32a0
leaq 0x38c1(%rip), %rsi      # 0x700c
movq %rax, %rdi
jmp 0x3772
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3150
movq 0x6865(%rip), %rdi      # 0x9fd0
leaq 0x38ae(%rip), %rsi      # 0x7020
callq 0x32a0
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rdi
callq 0x3320
leaq 0x389f(%rip), %rdi      # 0x702d
callq 0x3240
jmp 0x377f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3150
jmp 0x37a9
jmp 0x37a6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3150
jmp 0x37ba
jmp 0x37b7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::checkClientArguments(int, char**)
void MyHelper::checkClientArguments(int argc, char *argv[])
{
    if (argc < 3)
    {
        cout << "Usage: " << argv[0] << " <address> <port>" << endl;
        exit(EXIT_FAILURE);
    }

    if (!stringIsInt(argv[2]) || stoi(argv[2]) < 1024 || stoi(argv[2]) > 65535)
    {
        cout << "Invalid Port" << endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
cmpl $0x2, %esi
jle 0x38a8
movq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x3b88
movq %r14, %rsi
callq 0x37cc
testb %al, %al
je 0x38dc
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x3b88
leaq 0x8(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3bc3
cmpl $0x400, %eax            # imm = 0x400
jl 0x38d2
movq 0x10(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x3b88
leaq 0x48(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3bc3
movl %eax, %ebx
leaq 0x48(%rsp), %rdi
callq 0x3150
leaq 0x8(%rsp), %rdi
callq 0x3150
leaq 0x28(%rsp), %rdi
callq 0x3150
cmpl $0xffff, %ebx           # imm = 0xFFFF
jg 0x38e6
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq 0x6721(%rip), %rdi      # 0x9fd0
leaq 0x374e(%rip), %rsi      # 0x7004
callq 0x32a0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x32a0
leaq 0x3770(%rip), %rsi      # 0x703d
movq %rax, %rdi
jmp 0x38f4
leaq 0x8(%rsp), %rdi
callq 0x3150
leaq 0x28(%rsp), %rdi
callq 0x3150
movq 0x66e3(%rip), %rdi      # 0x9fd0
leaq 0x375b(%rip), %rsi      # 0x704f
callq 0x32a0
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rdi
callq 0x3320
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3150
jmp 0x391d
jmp 0x391a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3150
jmp 0x392e
jmp 0x392b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::filesInDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int MyHelper::filesInDirectory(string fullDir)
{
    int amountOfFiles = 0;
    dir = opendir(fullDir.c_str());

    while ((dirent = readdir(dir)) != NULL)
    {
        buffer = dirent->d_name;
        if (buffer != "." && buffer != "..")
        {
            amountOfFiles++;
        }
    }
    closedir(dir);
    return amountOfFiles;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x33b0
movq %rax, %rdi
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %r14
xorl %ebp, %ebp
leaq 0x390f(%rip), %r15      # 0x7276
leaq 0x3907(%rip), %r12      # 0x7275
callq 0x33c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x39af
addq $0x13, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x34a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bdf
testb %al, %al
je 0x39a9
movq %r14, %rdi
movq %r12, %rsi
callq 0x3bdf
movzbl %al, %eax
addl %eax, %ebp
movq 0x8(%rbx), %rdi
jmp 0x396e
movq 0x8(%rbx), %rdi
callq 0x3400
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::filenamesInDirecotry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> MyHelper::filenamesInDirecotry(string fullDir)
{
    vector<string> files;
    dir = opendir(fullDir.c_str());

    while ((dirent = readdir(dir)) != NULL)
    {
        buffer = dirent->d_name;
        if (buffer != "." && buffer != "..")
        {
            files.push_back(buffer);
        }
    }
    closedir(dir);
    return files;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq (%rdx), %rdi
callq 0x33b0
movq %rax, %rdi
movq %rax, 0x8(%r14)
leaq 0x10(%r14), %r15
leaq 0x387e(%rip), %r12      # 0x7276
leaq 0x3876(%rip), %r13      # 0x7275
callq 0x33c0
movq %rax, (%r14)
testq %rax, %rax
je 0x3a4a
addq $0x13, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x34a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3bdf
testb %al, %al
je 0x3a44
movq %r15, %rdi
movq %r13, %rsi
callq 0x3bdf
testb %al, %al
je 0x3a44
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3bea
movq 0x8(%r14), %rdi
jmp 0x39ff
movq 0x8(%r14), %rdi
callq 0x3400
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3c16
movq %r14, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/myhelper/myhelper.cpp
// Function: MyHelper::subjectsInDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> MyHelper::subjectsInDirectory(string fullDir)
{
    vector<string> files;
    dir = opendir(fullDir.c_str());

    while ((dirent = readdir(dir)) != NULL)
    {
        buffer = dirent->d_name;
        if (buffer != "." && buffer != "..")
        {
            buffer = buffer.substr(0, buffer.length() - 4);
            files.push_back(buffer);
        }
    }
    closedir(dir);
    return files;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq (%rdx), %rdi
callq 0x33b0
movq %rax, %rdi
movq %rax, 0x8(%r14)
leaq 0x10(%r14), %r15
leaq 0x37c9(%rip), %r12      # 0x7276
leaq 0x37c1(%rip), %r13      # 0x7275
leaq 0x8(%rsp), %rbp
callq 0x33c0
movq %rax, (%r14)
testq %rax, %rax
je 0x3b2c
addq $0x13, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x34a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3bdf
testb %al, %al
je 0x3b26
movq %r15, %rdi
movq %r13, %rsi
callq 0x3bdf
testb %al, %al
je 0x3b26
movq 0x18(%r14), %rcx
addq $-0x4, %rcx
movq %rbp, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x32d0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3330
movq %rbp, %rdi
callq 0x3150
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3bea
movq 0x8(%r14), %rdi
jmp 0x3ab9
movq 0x8(%r14), %rdi
callq 0x3400
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b49
movq %rax, %r14
movq %rbx, %rdi
callq 0x3c16
movq %r14, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/mysocket/mysocket.cpp
// Function: MySocket::MySocket(int)
MySocket::MySocket(int port)
{
    memset(&address, 0, sizeof(address));
    address.sin_family = AF_INET;
    address.sin_port = htons(port);
    address.sin_addr.s_addr = INADDR_ANY;
}

// Assembly:
andq $0x0, 0x418(%rdi)
movw $0x2, 0x410(%rdi)
rolw $0x8, %si
movw %si, 0x412(%rdi)
andl $0x0, 0x414(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/mysocket/mysocket.cpp
// Function: MySocket::MySocket(char const*, int)
MySocket::MySocket(const char *addr, int port)
{
    memset(&address, 0, sizeof(address));
    address.sin_family = AF_INET;
    address.sin_port = htons(port);
    inet_aton(addr, &address.sin_addr);
}

// Assembly:
andl $0x0, 0x41c(%rdi)
andq $0x0, 0x414(%rdi)
movq %rsi, %rax
leaq 0x414(%rdi), %rsi
rolw $0x8, %dx
movw $0x2, 0x410(%rdi)
movw %dx, 0x412(%rdi)
movq %rax, %rdi
jmp 0x31f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/mysocket/mysocket.cpp
// Function: MySocket::acceptNewConnection()
int MySocket::acceptNewConnection()
{
    new_socket = accept(create_socket, (struct sockaddr *)&cliaddress, &addrlen);
    if (new_socket == -1)
    {
        socketError("accept error");
    }
    cout << "Client connected from " << inet_ntoa(cliaddress.sin_addr) << ":" << ntohs(cliaddress.sin_port) << endl;
    strcpy(buffer, "Welcome to myserver, Please enter your command:\0");
    if (send(new_socket, buffer, strlen(buffer), 0) == -1)
    {
        socketError("send error");
    }
    return new_socket;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
leaq 0x420(%rbx), %rsi
leaq 0xc(%rbx), %rdx
callq 0x30e0
movl %eax, 0x4(%rbx)
cmpl $-0x1, %eax
je 0x41fd
movq 0x5e72(%rip), %rdi      # 0x9fd0
leaq 0x2fac(%rip), %rsi      # 0x7111
callq 0x32a0
movq %rax, %r14
movl 0x424(%rbx), %edi
callq 0x3140
movq %r14, %rdi
movq %rax, %rsi
callq 0x32a0
leaq 0x2f9e(%rip), %rsi      # 0x7128
movq %rax, %rdi
callq 0x32a0
movzwl 0x422(%rbx), %ecx
rolw $0x8, %cx
movzwl %cx, %esi
movq %rax, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x3180
leaq 0x10(%rbx), %r14
movups 0x2f85(%rip), %xmm0     # 0x7140
movups %xmm0, 0x10(%rbx)
movups 0x2f8a(%rip), %xmm0     # 0x7150
movups %xmm0, 0x20(%rbx)
movups 0x2f8f(%rip), %xmm0     # 0x7160
movups %xmm0, 0x30(%rbx)
movl 0x4(%rbx), %ebp
movq %r14, %rdi
callq 0x3130
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x3190
cmpq $-0x1, %rax
je 0x4209
movl 0x4(%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2f00(%rip), %rsi      # 0x7104
callq 0x405c
leaq 0x2f1a(%rip), %rsi      # 0x712a
callq 0x405c
nop
// File: /workspace/github_cpp_makefile_star2_O2/PepiJK[P]Mail-Server-Client/src/mysocket/mysocket.cpp
// Function: MySocket::recvMessage(int)
const char *MySocket::recvMessage(int socket)
{
    if (socket == -1)
    {
        // client
        size = recv(create_socket, buffer, BUF - 1, 0);
    }
    else
    {
        // server
        size = recv(socket, buffer, BUF - 1, 0);
    }

    if (size == -1)
    {
        socketError("recv error");
    }
    else if (size == 0)
    {
        return "QUIT\n\0";
    }
    buffer[size] = '\0';
    return buffer;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $-0x1, %esi
jne 0x4224
movl (%rbx), %esi
leaq 0x10(%rbx), %r14
movl $0x3ff, %edx            # imm = 0x3FF
movl %esi, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30f0
movl %eax, 0x8(%rbx)
testl %eax, %eax
je 0x424e
cmpl $-0x1, %eax
je 0x4260
cltq
movb $0x0, 0x10(%rbx,%rax)
jmp 0x4255
leaq 0x2f1c(%rip), %r14      # 0x7171
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2ece(%rip), %rsi      # 0x7135
callq 0x405c