// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r12
callq 0xb71e
testq %rax, %rax
je 0xa12f
movq (%rbx), %r8
cmpq %r8, 0x8(%rbx)
je 0xa244
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movslq %r15d, %rdx
xorl %esi, %esi
leaq 0x3f(%rcx), %rdi
movslq (%r8,%rsi,4), %r8
leaq 0x3f(%r8), %r9
testq %r8, %r8
cmovnsq %r8, %r9
sarq $0x6, %r9
shlq $0x3, %r9
addq (%r14), %r9
movq %r8, %r10
andq %rdi, %r10
xorl %r11d, %r11d
cmpq %rcx, %r10
setbe %r11b
movq -0x8(%r9,%r11,8), %r9
btq %r8, %r9
jae 0xa114
movq 0x28(%rax), %r8
addq %rdx, %r8
movb %bpl, (%rsi,%r8)
incq %rsi
movq (%rbx), %r8
movq 0x8(%rbx), %r9
subq %r8, %r9
sarq $0x2, %r9
cmpq %rsi, %r9
ja 0xa0d4
jmp 0xa244
cmpl 0xa8(%rsp), %r15d
jg 0xa244
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 0xad2a
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0xb836
movq %rax, %r12
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa19a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1b5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa1d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
movq (%rbx), %rdi
cmpq %rdi, 0x8(%rbx)
je 0xa244
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movslq %r15d, %rcx
xorl %edx, %edx
leaq 0x3f(%rax), %rsi
movslq (%rdi,%rdx,4), %rdi
leaq 0x3f(%rdi), %r8
testq %rdi, %rdi
cmovnsq %rdi, %r8
sarq $0x6, %r8
shlq $0x3, %r8
addq (%r14), %r8
movq %rdi, %r9
andq %rsi, %r9
xorl %r10d, %r10d
cmpq %rax, %r9
setbe %r10b
movq -0x8(%r8,%r10,8), %r8
btq %rdi, %r8
jae 0xa22e
movq 0x28(%r12), %rdi
addq %rcx, %rdi
movb %bpl, (%rdx,%rdi)
incq %rdx
movq (%rbx), %rdi
movq 0x8(%rbx), %r8
subq %rdi, %r8
sarq $0x2, %r8
cmpq %rdx, %r8
ja 0xa1ed
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xab50
jmp 0xa265
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa281
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %rbx, %rdi
callq 0x56a0