// File: 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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf760
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf7c0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xf790
testb $0x1, %al
jne 0x1ccc3
jmp 0x1cd57
leaq -0x28(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x18(%rbp), %rsi
callq 0x69e0
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1cd10
movb -0x11(%rbp), %al
movb %al, -0xc9(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x18(%rbp), %rsi
callq 0x69e0
movb -0xc9(%rbp), %cl
movb %cl, (%rax)
jmp 0x1cd52
leaq -0x28(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x18(%rbp), %rsi
callq 0x69e0
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0x1cd50
leaq -0x28(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x18(%rbp), %rsi
callq 0x69e0
movb $0x4e, (%rax)
jmp 0x1cd52
jmp 0x1cebc
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x6910
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
movl $0x2d, %edx
callq 0x9150
jmp 0x1cdac
movq -0xe8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0xf8f0
jmp 0x1cdc5
movq -0xf0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xf8b0
movb %dl, -0xf9(%rbp)
movq %rax, -0xf8(%rbp)
jmp 0x1cde4
movb -0xf9(%rbp), %al
movq -0xf8(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movb %al, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x40(%rbp)
movb -0xc0(%rbp), %al
movb %al, -0x38(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xf930
leaq -0xa0(%rbp), %rdi
callq 0x6a08
leaq -0xa1(%rbp), %rdi
callq 0x65a0
movb -0x11(%rbp), %al
movb %al, -0xfa(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x18(%rbp), %rsi
callq 0x69e0
movb -0xfa(%rbp), %cl
movb %cl, (%rax)
jmp 0x1cebc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x1ceae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x1cea2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xf930
leaq -0xa0(%rbp), %rdi
callq 0x6a08
leaq -0xa1(%rbp), %rdi
callq 0x65a0
jmp 0x1cec5
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x6900
nopw %cs:(%rax,%rax)