// File: /workspace/github_cpp_makefile_star2_O2/auton1[P]viterbi/vcf_entry.cpp
// Function: vcf_entry::parse_genotype_entry(unsigned int, bool, bool, bool, bool)
void vcf_entry::parse_genotype_entry(unsigned int indv, bool GT, bool GQ, bool DP, bool FT)
{
	if (fully_parsed == false)
		parse_full_entry(true);

	if (parsed_FORMAT == false)
		set_FORMAT(FORMAT_str);

	static string tmpstr;
	static istringstream ss;
	ss.clear(); ss.str(GENOTYPE_str[indv]);

	int N_required = GT + GQ + DP + FT;
	int N_got = 0;

	int i=0;
	while (getline(ss, tmpstr, ':'))
	{
		if (GT && (i == GT_idx))
		{
			set_indv_GENOTYPE_and_PHASE(indv, tmpstr);
			N_got++;
		}
		else if (GQ && (i == GQ_idx))
		{
			set_indv_GQUALITY(indv, header::str2double(tmpstr));
			N_got++;
		}
		else if (DP && (i == DP_idx))
		{
			set_indv_DEPTH(indv, header::str2int(tmpstr));
			N_got++;
		}
		else if (FT && (i == FT_idx))
		{
			set_indv_GFILTER(indv, tmpstr);
			N_got++;
		}

		if (N_got == N_required)
			break;
		i++;
	}

	// Set missing return values if requested a value, but couldn't find it
	if (GT && (parsed_GT[indv] == false))
	{
		set_indv_GENOTYPE_and_PHASE(indv, make_pair(-1,-1), '/');
	}
	if (GQ && (parsed_GQ[indv] == false))
	{
		set_indv_GQUALITY(indv, -1);
	}
	if (DP && (parsed_DP[indv] == false))
	{
		set_indv_DEPTH(indv, -1);
	}
	if (FT && (parsed_FT[indv] == false))
	{
		set_indv_GFILTER(indv, "");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x10(%rsp)
movl %r8d, 0x14(%rsp)
movl %ecx, 0x18(%rsp)
movl %edx, %r13d
movl %esi, 0xc(%rsp)
movq %rdi, %r14
cmpb $0x0, 0x3d9(%rdi)
jne 0x178ef
movq (%r14), %rax
pushq $0x1
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
cmpb $0x0, 0x3dd(%r14)
jne 0x17908
leaq 0x718(%r14), %rsi
movq %r14, %rdi
callq 0x1dfb2
movb 0x2a202(%rip), %al      # 0x41b10
testb %al, %al
je 0x17b37
movb 0x2a37c(%rip), %al      # 0x41c98
testb %al, %al
je 0x17b93
movq 0x2a1ed(%rip), %rax     # 0x41b18
leaq 0x2a1e6(%rip), %rcx     # 0x41b18
movq -0x18(%rax), %rdi
addq %rcx, %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x5790
movl 0xc(%rsp), %esi
movq %rsi, 0x20(%rsp)
shlq $0x5, %rsi
addq 0x758(%r14), %rsi
leaq 0x2a1cb(%rip), %rdi     # 0x41b28
callq 0x5690
movzbl %r13b, %eax
movzbl 0x18(%rsp), %ecx
addl %eax, %ecx
movzbl 0x14(%rsp), %eax
movzbl 0x10(%rsp), %ebp
addl %eax, %ebp
addl %ecx, %ebp
leaq 0x2a16e(%rip), %r15     # 0x41af0
xorl %r12d, %r12d
leaq 0x2a18c(%rip), %rdi     # 0x41b18
movq %r15, %rsi
pushq $0x3a
popq %rdx
callq 0x5870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x17a4d
testb %r13b, %r13b
je 0x179c8
cmpl 0x630(%r14), %r12d
jne 0x179c8
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %r15, %rdx
callq 0x1e2ba
jmp 0x17a40
cmpb $0x0, 0x18(%rsp)
je 0x179f6
cmpl 0x634(%r14), %r12d
jne 0x179f6
movq %r15, %rdi
movsd 0x1659d(%rip), %xmm0    # 0x2df80
callq 0x12db6
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x1e89c
jmp 0x17a40
cmpb $0x0, 0x14(%rsp)
je 0x17a21
cmpl 0x638(%r14), %r12d
jne 0x17a21
movq %r15, %rdi
pushq $-0x1
popq %rsi
callq 0x12782
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %eax, %edx
callq 0x1dd9c
jmp 0x17a40
cmpb $0x0, 0x10(%rsp)
je 0x17a42
cmpl 0x63c(%r14), %r12d
jne 0x17a42
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %r15, %rdx
callq 0x1e93c
incl %ebx
incl %r12d
cmpl %ebp, %ebx
jne 0x17985
testb %r13b, %r13b
movq 0x20(%rsp), %rbx
je 0x17a83
leaq 0x560(%r14), %rdi
movq %rbx, %rsi
callq 0x9cc0
testq %rdx, (%rax)
jne 0x17a83
leaq 0x28(%rsp), %rdx
orq $-0x1, (%rdx)
pushq $0x2f
popq %rcx
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x1e772
cmpb $0x0, 0x18(%rsp)
je 0x17ab2
leaq 0x588(%r14), %rdi
movq %rbx, %rsi
callq 0x9cc0
testq %rdx, (%rax)
jne 0x17ab2
movsd 0x164da(%rip), %xmm0    # 0x2df80
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x1e89c
cmpb $0x0, 0x14(%rsp)
je 0x17adc
leaq 0x5b0(%r14), %rdi
movq %rbx, %rsi
callq 0x9cc0
testq %rdx, (%rax)
jne 0x17adc
pushq $-0x1
popq %rdx
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x1dd9c
cmpb $0x0, 0x10(%rsp)
je 0x17b28
leaq 0x5d8(%r14), %rdi
movq %rbx, %rsi
callq 0x9cc0
testq %rdx, (%rax)
jne 0x17b28
leaq 0x17339(%rip), %rsi     # 0x2ee37
leaq 0x28(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x5160
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x1e93c
leaq 0x28(%rsp), %rdi
callq 0x5908
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29fd2(%rip), %rdi     # 0x41b10
callq 0x5850
testl %eax, %eax
je 0x17916
leaq 0x29fae(%rip), %rax     # 0x41b00
movq %rax, 0x29f97(%rip)     # 0x41af0
leaq 0x29f90(%rip), %rsi     # 0x41af0
andq $0x0, 0x29f90(%rip)     # 0x41af8
movb $0x0, 0x29f91(%rip)     # 0x41b00
movq 0x29432(%rip), %rdi     # 0x40fa8
leaq 0x29903(%rip), %rdx     # 0x41480
callq 0x53f0
leaq 0x29f87(%rip), %rdi     # 0x41b10
callq 0x5290
jmp 0x17916
leaq 0x2a0fe(%rip), %rdi     # 0x41c98
callq 0x5850
testl %eax, %eax
je 0x17924
leaq 0x29f6a(%rip), %rdi     # 0x41b18
callq 0x5330
movq 0x293f6(%rip), %rdi     # 0x40fb0
leaq 0x29f57(%rip), %rsi     # 0x41b18
leaq 0x298b8(%rip), %rdx     # 0x41480
callq 0x53f0
leaq 0x2a0c4(%rip), %rdi     # 0x41c98
callq 0x5290
jmp 0x17924
movq %rax, %rbx
leaq 0x2a0b0(%rip), %rdi     # 0x41c98
callq 0x5270
jmp 0x17c01
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5908
jmp 0x17c01
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5800
nop