// File: /workspace/github_cpp_makefile_star2_O3/simonrharris[P]SKA/src/kmers.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&, std::vector<int, std::allocator<int>> const&, int, int, int)
void addKmerToStringMap(std::unordered_map < std::string, std::string > & myKmerMap, const std::string & myKmer, const char myBase, const std::vector < bool > & myBits, const std::vector < int > & mySamples, int currentSampleNumber, int totalSamples, int maxMissing){
	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<mySamples.size(); ++i){ //add the base to all samples that are true in the bitset
			if (myBits[mySamples[i]]){
				kmit->second[i+currentSampleNumber]=myBase;
			}
		}
	}
	else {//if the kmer isn't in the map
		if ((currentSampleNumber)<=maxMissing){
			std::pair < std::unordered_map < std::string, std::string >::iterator, bool > ret = myKmerMap.insert(std::make_pair(myKmer, std::string (totalSamples,'-')));
			for (int i=0; i<mySamples.size(); ++i){
				if (myBits[mySamples[i]]){
					ret.first->second[i+currentSampleNumber]=myBase;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %r12d
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r15
callq 0xb6d2
testq %rax, %rax
je 0xa0bc
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
cmpq %rcx, %rsi
je 0xa1d9
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movslq %r12d, %rdi
xorl %r8d, %r8d
leaq 0x3f(%rdx), %r9
movslq (%rcx,%r8,4), %r10
leal 0x3f(%r10), %r11d
testq %r10, %r10
cmovnsl %r10d, %r11d
sarl $0x6, %r11d
movslq %r11d, %r11
shlq $0x3, %r11
addq (%r14), %r11
movq %r10, %r15
andq %r9, %r15
xorl %r12d, %r12d
cmpq %rdx, %r15
setbe %r12b
movq -0x8(%r11,%r12,8), %r11
btq %r10, %r11
jae 0xa0a5
movq 0x28(%rax), %rcx
addq %rdi, %rcx
movb %bpl, (%r8,%rcx)
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
incq %r8
movq %rsi, %r10
subq %rcx, %r10
sarq $0x2, %r10
cmpq %r8, %r10
ja 0xa05b
jmp 0xa1d9
cmpl 0xa8(%rsp), %r12d
jg 0xa1d9
movslq 0xa0(%rsp), %rsi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x5440
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
callq 0xaccc
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0xb7ea
movq %rax, %r15
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa127
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa142
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa15e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
je 0xa1d9
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movslq %r12d, %rsi
xorl %edi, %edi
leaq 0x3f(%rdx), %r8
movslq (%rax,%rdi,4), %r9
leal 0x3f(%r9), %r10d
testq %r9, %r9
cmovnsl %r9d, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
shlq $0x3, %r10
addq (%r14), %r10
movq %r9, %r11
andq %r8, %r11
xorl %r12d, %r12d
cmpq %rdx, %r11
setbe %r12b
movq -0x8(%r10,%r12,8), %r10
btq %r9, %r10
jae 0xa1c7
movq 0x28(%r15), %rax
addq %rsi, %rax
movb %bpl, (%rdi,%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
incq %rdi
movq %rcx, %r9
subq %rax, %r9
sarq $0x2, %r9
cmpq %rdi, %r9
ja 0xa17d
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xaaf0
jmp 0xa1fa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa216
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %rbx, %rdi
callq 0x56a0