// File: /workspace/github_cpp_makefile_star2_O3/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 0x2313c
movq %r15, %r14
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1696a(%rip), %rsi     # 0x39a6c
leaq 0x1699d(%rip), %rdx     # 0x39aa6
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xc85e
leaq 0x2638b(%rip), %rdi     # 0x494a8
movq %rbx, %rsi
movl $0x63, %edx
callq 0x36ec8
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
movq %r14, %r15
je 0x2313c
callq 0x5410
cmpl $0x0, 0x8(%rbp)
je 0x23232
xorl %ebx, %ebx
leaq 0x38(%rsp), %rsi
movq %r15, 0x10(%rsp)
movq (%r13), %rdx
movl $0x1, %eax
movl %ebx, %ecx
shlq %cl, %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rdx,%rcx,8), %rdx
btq %rbx, %rdx
jae 0x23227
movq (%r12), %rdx
testq %rax, (%rdx,%rcx,8)
je 0x23227
movq 0x560(%rbp), %rdx
testq %rax, (%rdx,%rcx,8)
je 0x23241
movq %rsi, %r14
movq %rbp, %rdi
movl %ebx, %esi
leaq 0x8(%rsp), %rdx
callq 0x22b50
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
movl %eax, %edx
orl %ecx, %edx
movq %r14, %rsi
js 0x23227
cmpl %ecx, %eax
jne 0x231c9
cmpl $0x1, %eax
je 0x231ce
testl %eax, %eax
jne 0x231d7
movq 0x18(%rsp), %rax
jmp 0x231d3
incl (%r15)
jmp 0x23227
movq 0x20(%rsp), %rax
incl (%rax)
jmp 0x23227
movq %rsi, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
movq %rsi, %r15
leaq 0x1693e(%rip), %rsi     # 0x39b29
leaq 0x16951(%rip), %rdx     # 0x39b43
callq 0xc85e
leaq 0x262aa(%rip), %rdi     # 0x494a8
leaq 0x28(%rsp), %rsi
movl $0x62, %edx
callq 0x36ec8
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %r15
je 0x23227
callq 0x5410
movq %r14, %rsi
incl %ebx
cmpl 0x8(%rbp), %ebx
jb 0x23152
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16234(%rip), %rdi     # 0x3947c
leaq 0x161bd(%rip), %rsi     # 0x3940c
leaq 0x16851(%rip), %rcx     # 0x39aa7
movl $0x1b1, %edx            # imm = 0x1B1
callq 0x5280
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x23272
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2327c
callq 0x5410
movq %rbx, %rdi
callq 0x57d0