// File: 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
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf760
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf7c0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf790
testb $0x1, %al
jne 0x3dbc1
jmp 0x3dc3a
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10c80
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
jae 0x3dc35
movq -0x20(%rbp), %rdi
movslq -0x3c(%rbp), %rsi
callq 0xf810
testb $0x1, %al
jne 0x3dbfe
jmp 0x3dc28
movb -0x11(%rbp), %al
movb %al, -0xe9(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x3c(%rbp), %rsi
callq 0x69e0
movb -0xe9(%rbp), %cl
movb %cl, (%rax)
jmp 0x3dc2a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3dbc8
jmp 0x3de13
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x6910
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rcx
leaq -0xb0(%rbp), %rdi
movl $0x2d, %edx
callq 0x9150
jmp 0x3dc8f
movq -0x108(%rbp), %rsi
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0xf8f0
jmp 0x3dcab
movq -0x110(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xf8b0
movb %dl, -0x119(%rbp)
movq %rax, -0x118(%rbp)
jmp 0x3dccd
movb -0x119(%rbp), %al
movq -0x118(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movb %al, -0xd0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x50(%rbp)
movb -0xd0(%rbp), %al
movb %al, -0x48(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xf930
leaq -0xb0(%rbp), %rdi
callq 0x6a08
leaq -0xb1(%rbp), %rdi
callq 0x65a0
movl $0x0, -0xdc(%rbp)
movslq -0xdc(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10c80
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jae 0x3de11
movq -0x20(%rbp), %rdi
movslq -0xdc(%rbp), %rsi
callq 0xf810
testb $0x1, %al
jne 0x3dd6c
jmp 0x3ddfb
movb -0x11(%rbp), %al
movb %al, -0x129(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x69e0
movb -0x129(%rbp), %cl
movb %cl, (%rax)
jmp 0x3ddfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x3dded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x3dde1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xf930
leaq -0xb0(%rbp), %rdi
callq 0x6a08
leaq -0xb1(%rbp), %rdi
callq 0x65a0
jmp 0x3de1c
jmp 0x3ddfd
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x3dd29
jmp 0x3de13
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0x6900
nopl (%rax,%rax)