// File: CMU-SAFARI[P]optimal-seed-solver/KmerHash.cc
// Function: KmerHash::getKmer[abi:cxx11]() const
string KmerHash::getKmer() const {
	string Kmer(KmerSize, 'N');

	cout << "kmer size: " << KmerSize << endl;

	for (int i = 0; i < KmerSize; i++) {

		unsigned int bpVal = (hashVal >> (2 * (KmerSize - i) ) ) & 3;
		switch (bpVal) {
		case 0:
			Kmer[i] = 'A';
			break;
		case 1:
			Kmer[i] = 'C';
			break;
		case 2:
			Kmer[i] = 'G';
			break;
		case 3:
			Kmer[i] = 'T';
			break;
		default:
			cerr << "unrecognized character: " << Kmer[i] << endl;
			break;
		}

	}
	return Kmer;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x60(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movb $0x0, 0x97(%rsp)
movl 0x4(%rax), %eax
movq %rax, 0x68(%rsp)
leaq 0x96(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x2180
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rcx
movl $0x4e, %edx
callq 0x2b20
jmp 0x28be
leaq 0x96(%rsp), %rdi
callq 0x20e0
movq 0x26f6(%rip), %rdi      # 0x4fc8
leaq 0x7e3(%rip), %rsi       # 0x30bc
callq 0x20b0
movq %rax, 0x48(%rsp)
jmp 0x28e5
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x2140
movq %rax, 0x40(%rsp)
jmp 0x28fe
movq 0x40(%rsp), %rdi
movq 0x26ae(%rip), %rsi      # 0x4fb8
callq 0x20c0
jmp 0x2911
movl $0x0, 0x80(%rsp)
movq 0x58(%rsp), %rcx
movl 0x80(%rsp), %eax
cmpl 0x4(%rcx), %eax
jae 0x2acc
movq 0x58(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
movl 0x80(%rsp), %edx
subl %edx, %ecx
addb %cl, %cl
shrl %cl, %eax
andl $0x3, %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movq %rax, 0x38(%rsp)
subq $0x3, %rax
ja 0x2a55
movq 0x38(%rsp), %rax
leaq 0x73e(%rip), %rcx       # 0x30ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x96(%rsp), %rdi
callq 0x20e0
jmp 0x2af5
movq 0x60(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x2050
jmp 0x2af5
movq 0x60(%rsp), %rdi
movslq 0x80(%rsp), %rsi
callq 0x2190
movq %rax, 0x30(%rsp)
jmp 0x29d9
movq 0x30(%rsp), %rax
movb $0x41, (%rax)
jmp 0x2ab4
movq 0x60(%rsp), %rdi
movslq 0x80(%rsp), %rsi
callq 0x2190
movq %rax, 0x28(%rsp)
jmp 0x29ff
movq 0x28(%rsp), %rax
movb $0x43, (%rax)
jmp 0x2ab4
movq 0x60(%rsp), %rdi
movslq 0x80(%rsp), %rsi
callq 0x2190
movq %rax, 0x20(%rsp)
jmp 0x2a25
movq 0x20(%rsp), %rax
movb $0x47, (%rax)
jmp 0x2ab4
movq 0x60(%rsp), %rdi
movslq 0x80(%rsp), %rsi
callq 0x2190
movq %rax, 0x18(%rsp)
jmp 0x2a4b
movq 0x18(%rsp), %rax
movb $0x54, (%rax)
jmp 0x2ab4
movq 0x2594(%rip), %rdi      # 0x4ff0
leaq 0x665(%rip), %rsi       # 0x30c8
callq 0x20b0
movq %rax, 0x10(%rsp)
jmp 0x2a6f
movq 0x60(%rsp), %rdi
movslq 0x80(%rsp), %rsi
callq 0x2190
movq %rax, 0x8(%rsp)
jmp 0x2a88
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movsbl (%rax), %esi
callq 0x2110
movq %rax, (%rsp)
jmp 0x2aa0
movq (%rsp), %rdi
movq 0x250d(%rip), %rsi      # 0x4fb8
callq 0x20c0
jmp 0x2ab2
jmp 0x2ab4
jmp 0x2ab6
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x291c
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0x2ae8
movq 0x60(%rsp), %rdi
callq 0x2050
movq 0x50(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x2170
nopw %cs:(%rax,%rax)