// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]optimal-seed-solver/analyzeBasic.cc
// Function: AnalyzeBasic::generateHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
void AnalyzeBasic::generateHash(string refName, unsigned int seedLength) {
	refDB.loadRefFile(refName);

	this->seedLength = seedLength;

	string seed = string(seedLength, 'N');
	
	freqTable.resize( (1 << (2 * seedLength) ), 0);

	for (unsigned int chromoCount = 0; chromoCount < refDB.getNumOfChromo(); chromoCount++) {
		refDB.loadChromo(chromoCount);
		for (unsigned int refPos = 0; refPos < refDB.getChromoLength() - seedLength; refPos++) {
			seed = refDB.getRefSeq(refPos, seedLength);
			if (seed.find('N') == string::npos && seed.find('M') == string::npos && seed.find('R') == string::npos) {
				unsigned int hash = hashGen.calculateHash(seed, seed.length() );
				freqTable[hash]++;
			}
		}
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x4356
movq %r14, %rdi
movq %r15, %rsi
callq 0x5292
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x4789
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3260
movl %ebx, 0x270(%r14)
movl %ebx, %esi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
movl $0x4e, %edx
callq 0x32c0
leal (%rbx,%rbx), %ecx
movl $0x1, %esi
shll %cl, %esi
leaq 0x278(%r14), %rdi
leaq 0x58(%rsp), %rdx
movl $0x0, (%rdx)
movq %rdi, 0x28(%rsp)
callq 0x4bb6
leaq 0x68(%rsp), %r13
leaq 0x268(%r14), %rax
movq %rax, 0x30(%rsp)
movq $0x0, (%rsp)
leaq 0x58(%rsp), %rbp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x58ca
movq (%rsp), %rsi
cmpl %eax, %esi
jae 0x48cb
movq %r14, %rdi
callq 0x5672
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x58c2
subl %ebx, %eax
cmpl %eax, %r12d
jae 0x48bc
movq %rbp, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %ebx, %ecx
callq 0x5908
movq %r15, %rdi
movq %rbp, %rsi
callq 0x32e0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x4857
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3260
movq %r15, %rdi
movl $0x4e, %esi
xorl %edx, %edx
callq 0x3300
cmpq $-0x1, %rax
jne 0x48b4
movq %r15, %rdi
movl $0x4d, %esi
xorl %edx, %edx
callq 0x3300
cmpq $-0x1, %rax
jne 0x48b4
movq %r15, %rdi
movl $0x52, %esi
xorl %edx, %edx
callq 0x3300
cmpq $-0x1, %rax
jne 0x48b4
movl 0x10(%rsp), %edx
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x5d86
movl %eax, %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
incl (%rcx,%rax,4)
incl %r12d
jmp 0x4812
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
jmp 0x47f3
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x48e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4917
movq %rax, %rbx
jmp 0x4936
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x4936
movq 0x48(%rsp), %rsi
jmp 0x492e
jmp 0x4917
jmp 0x4917
jmp 0x4917
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4936
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3410