// File: /workspace/github_cpp_makefile_star2_O1/auton1[P]viterbi/entry_getters.cpp
// Function: entry::get_genotype_counts(std::vector<bool, std::allocator<bool>> const&, std::vector<bool, std::allocator<bool>> const&, unsigned int&, unsigned int&, unsigned int&) const
void entry::get_genotype_counts(const vector<bool> &include_indv, const vector<bool> &include_genotype, unsigned int &out_N_hom1, unsigned int &out_N_het, unsigned int &out_N_hom2) const
{
	out_N_hom1 = 0; out_N_hom2 = 0; out_N_het = 0;
	pair<int, int> genotype;
	if (ALT.size() > 1)
		LOG.error("Tried to return the genotype counts of a non-biallelic SNP", 99);

	for (unsigned int ui=0; ui<N_indv; ui++)
	{
		if ((include_indv[ui] == true) && (include_genotype[ui] == true))
		{
			assert(parsed_GT[ui] == true);
			get_indv_GENOTYPE_ids(ui, genotype);
			if ((genotype.first > -1) && (genotype.second > -1))
			{
				if (genotype.first != genotype.second)
					out_N_het++;
				else if (genotype.first == 0)
					out_N_hom1++;
				else if (genotype.first == 1)
					out_N_hom2++;
				else
					LOG.error("Unknown allele in genotype", 98);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
xorl %eax, %eax
movq %rcx, 0x18(%rsp)
movl %eax, (%rcx)
movq %r9, 0x20(%rsp)
movl %eax, (%r9)
movl %eax, (%r8)
movq $0x0, 0x8(%rsp)
movq 0x450(%rdi), %rax
subq 0x448(%rdi), %rax
cmpq $0x21, %rax
jb 0x2338c
movq %r15, %r14
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1773e(%rip), %rsi     # 0x3aa90
leaq 0x17771(%rip), %rdx     # 0x3aaca
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xc868
leaq 0x2713b(%rip), %rdi     # 0x4a4a8
movq %rbx, %rsi
movl $0x63, %edx
callq 0x3721e
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
movq %r14, %r15
je 0x2338c
callq 0x5410
cmpl $0x0, 0x8(%rbp)
je 0x23488
leaq 0x38(%rsp), %rsi
xorl %ebx, %ebx
movq %r15, 0x10(%rsp)
movq (%r13), %rdx
movl $0x1, %eax
movl %ebx, %ecx
shlq %cl, %rax
movq %rbx, %rcx
shrq $0x6, %rcx
movq (%rdx,%rcx,8), %rdx
btq %rbx, %rdx
jae 0x23479
movq (%r12), %rdx
testq %rax, (%rdx,%rcx,8)
je 0x23479
movq 0x560(%rbp), %rdx
testq %rax, (%rdx,%rcx,8)
je 0x23497
movq %rsi, %r14
movq %rbp, %rdi
movl %ebx, %esi
leaq 0x8(%rsp), %rdx
callq 0x22d94
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
movl %eax, %edx
orl %ecx, %edx
movq %r14, %rsi
js 0x23479
cmpl %ecx, %eax
jne 0x2341b
cmpl $0x1, %eax
je 0x23420
testl %eax, %eax
jne 0x23429
movq 0x18(%rsp), %rax
jmp 0x23425
incl (%r15)
jmp 0x23479
movq 0x20(%rsp), %rax
incl (%rax)
jmp 0x23479
movq %rsi, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
movq %rsi, %r15
leaq 0x17710(%rip), %rsi     # 0x3ab4d
leaq 0x17723(%rip), %rdx     # 0x3ab67
callq 0xc868
leaq 0x27058(%rip), %rdi     # 0x4a4a8
leaq 0x28(%rsp), %rsi
movl $0x62, %edx
callq 0x3721e
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %r15
je 0x23479
callq 0x5410
movq %r14, %rsi
incq %rbx
movl 0x8(%rbp), %eax
cmpq %rax, %rbx
jb 0x233a2
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17002(%rip), %rdi     # 0x3a4a0
leaq 0x16f8b(%rip), %rsi     # 0x3a430
leaq 0x1761f(%rip), %rcx     # 0x3aacb
movl $0x1b1, %edx            # imm = 0x1B1
callq 0x5280
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x234c8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x234d2
callq 0x5410
movq %rbx, %rdi
callq 0x57d0