// File: /workspace/github_cpp_makefile_star2_O2/gcollet[P]MstatX/src/msa.cpp
// Function: Msa::printBasic()
void
Msa :: printBasic(){
	string dictionary = "ARNDCQEGHILKMFPSTWYV-";
	vector<int> counts(dictionary.size(), 0);
	string out_name = Options::Get().output_fname;
	out_name = out_name.substr(0,out_name.find('.')) + ".aa_count";
	ofstream file(out_name.c_str());
	if (!file.is_open()){
	  cerr << "Cannot open file " << out_name << "\n";
		exit(0);
	}
	for (int a(0); a < (int) dictionary.size(); a++) {
		file << dictionary[a] << " ";
	}
	file << "\n";
	for (int col(0); col < ncol; col++){
		for (int seq(0); seq < nseq; seq++){
			int pos = (int) dictionary.find(mali_seq[seq][col]);
			if (pos < (int) dictionary.size()){
				counts[pos]++;
			} else {
				cerr << mali_seq[seq][col] << " is not in the dictionary\n";
			}
		}
		for (int a(0); a < (int) dictionary.size(); a++) {
			file << counts[a] << " ";
			counts[a] = 0;
		}
		file << "\n";
	}
	file.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
leaq 0x3902(%rip), %rsi      # 0xd717
leaq 0x18(%rsp), %r14
leaq 0x78(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x79bc
movq 0x8(%r14), %rsi
andl $0x0, (%r15)
movq %rsp, %rdi
leaq 0x78(%rsp), %rdx
leaq 0x38(%rsp), %rcx
callq 0x5b52
callq 0x4a00
addq $0xa8, %rax
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x4350
leaq 0x38(%rsp), %r14
pushq $0x2e
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x4340
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4280
leaq 0x38a6(%rip), %rdx      # 0xd72d
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x84c4
leaq 0x38(%rsp), %r14
leaq 0x78(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x42f0
movq %r15, %rdi
callq 0x4110
leaq 0x58(%rsp), %rdi
callq 0x4110
movq (%r14), %rsi
leaq 0x78(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x42a0
leaq 0xe8(%rsp), %rdi
callq 0x4080
testb %al, %al
je 0xa049
xorl %r12d, %r12d
leaq 0x78(%rsp), %r14
leaq 0x36a0(%rip), %r15      # 0xd591
movslq 0x20(%rsp), %rax
cmpq %rax, %r12
jge 0x9f1d
movq 0x18(%rsp), %rax
movsbl (%rax,%r12), %esi
movq %r14, %rdi
callq 0x42b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4250
incq %r12
jmp 0x9ef1
leaq 0x35d2(%rip), %rsi      # 0xd4f6
leaq 0x78(%rsp), %rdi
callq 0x4250
xorl %r15d, %r15d
leaq 0x78(%rsp), %r13
leaq 0x3654(%rip), %rbp      # 0xd591
movslq 0xcc(%rbx), %rax
cmpq %rax, %r15
jge 0xa007
xorl %r12d, %r12d
xorl %r14d, %r14d
movslq 0xc8(%rbx), %rax
cmpq %rax, %r14
jge 0x9fba
movq 0x38(%rbx), %rax
movq (%rax,%r12), %rax
movsbl (%rax,%r15), %esi
leaq 0x18(%rsp), %rdi
xorl %edx, %edx
callq 0x4340
cmpl 0x20(%rsp), %eax
jge 0x9f89
movq (%rsp), %rcx
cltq
incl (%rcx,%rax,4)
jmp 0x9fb1
movq 0x38(%rbx), %rax
movq (%rax,%r12), %rax
movsbl (%rax,%r15), %esi
movq 0x904b(%rip), %rdi      # 0x12fe8
callq 0x42b0
movq %rax, %rdi
leaq 0x378b(%rip), %rsi      # 0xd737
callq 0x4250
incq %r14
addq $0x20, %r12
jmp 0x9f53
xorl %r14d, %r14d
movslq 0x20(%rsp), %rax
cmpq %rax, %r14
jge 0x9ff0
movq (%rsp), %rax
movl (%rax,%r14,4), %esi
movq %r13, %rdi
callq 0x4420
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4250
movq (%rsp), %rax
andl $0x0, (%rax,%r14,4)
incq %r14
jmp 0x9fbd
movq %r13, %rdi
leaq 0x34fc(%rip), %rsi      # 0xd4f6
callq 0x4250
incq %r15
jmp 0x9f3d
leaq 0x78(%rsp), %rdi
callq 0x4360
leaq 0x78(%rsp), %rdi
callq 0x4380
leaq 0x38(%rsp), %rdi
callq 0x4110
movq %rsp, %rdi
callq 0x5bbe
leaq 0x18(%rsp), %rdi
callq 0x4110
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8f98(%rip), %rdi      # 0x12fe8
leaq 0x2fc9(%rip), %rsi      # 0xd020
callq 0x4250
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x4240
leaq 0x3486(%rip), %rsi      # 0xd4f6
movq %rax, %rdi
callq 0x4250
xorl %edi, %edi
callq 0x42d0
jmp 0xa090
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4110
jmp 0xa0b4
movq %rax, %rbx
jmp 0xa0b4
movq %rax, %rbx
jmp 0xa0c6
movq %rax, %rbx
jmp 0xa0be
jmp 0xa0a7
jmp 0xa0a7
jmp 0xa0a7
jmp 0xa0a7
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4380
leaq 0x38(%rsp), %rdi
callq 0x4110
movq %rsp, %rdi
callq 0x5bbe
leaq 0x18(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x4430