// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
movl %edx, %r13d
movl %esi, (%rsp)
movq %rdi, %r14
cmpb $0x0, 0x3d9(%rdi)
jne 0x1cc7e
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x18(%rax)
cmpb $0x0, 0x3dd(%r14)
jne 0x1cc97
leaq 0x718(%r14), %rsi
movq %r14, %rdi
callq 0x249ce
movb 0x2de4b(%rip), %al      # 0x4aae8
testb %al, %al
je 0x1cf02
movb 0x2dfc5(%rip), %al      # 0x4ac70
testb %al, %al
je 0x1cf0c
movq 0x2de36(%rip), %rax     # 0x4aaf0
leaq 0x2de2f(%rip), %r15     # 0x4aaf0
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x5750
movl (%rsp), %esi
movq %rsi, 0x10(%rsp)
shlq $0x5, %rsi
addq 0x758(%r14), %rsi
leaq 0x2de15(%rip), %rdi     # 0x4ab00
callq 0x5640
leaq 0x2ddd1(%rip), %rsi     # 0x4aac8
movq %r15, %rdi
movl $0x3a, %edx
callq 0x5830
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1ce01
movzbl %r13b, %eax
movzbl 0xc(%rsp), %ecx
addl %eax, %ecx
movzbl 0x8(%rsp), %eax
movzbl 0x4(%rsp), %r15d
addl %eax, %r15d
addl %ecx, %r15d
leaq 0x2dd8f(%rip), %rbp     # 0x4aac8
xorl %r12d, %r12d
testb %r13b, %r13b
je 0x1cd5a
cmpl 0x630(%r14), %ebx
jne 0x1cd5a
movq %r14, %rdi
movl (%rsp), %esi
movq %rbp, %rdx
callq 0x24d96
jmp 0x1cdd1
cmpb $0x0, 0xc(%rsp)
je 0x1cd87
cmpl 0x634(%r14), %ebx
jne 0x1cd87
movq %rbp, %rdi
movsd 0x1d2eb(%rip), %xmm0    # 0x3a060
callq 0x173b2
movq %r14, %rdi
movl (%rsp), %esi
callq 0x25604
jmp 0x1cdd1
cmpb $0x0, 0x8(%rsp)
je 0x1cdb3
cmpl 0x638(%r14), %ebx
jne 0x1cdb3
movq %rbp, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16b6e
movq %r14, %rdi
movl (%rsp), %esi
movl %eax, %edx
callq 0x2472a
jmp 0x1cdd1
cmpb $0x0, 0x4(%rsp)
je 0x1cdd4
cmpl 0x63c(%r14), %ebx
jne 0x1cdd4
movq %r14, %rdi
movl (%rsp), %esi
movq %rbp, %rdx
callq 0x256a4
incl %r12d
cmpl %r15d, %r12d
je 0x1ce01
incl %ebx
leaq 0x2dd0e(%rip), %rdi     # 0x4aaf0
movq %rbp, %rsi
movl $0x3a, %edx
callq 0x5830
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1cd3c
testb %r13b, %r13b
movq 0x10(%rsp), %rbx
je 0x1ce3d
movq 0x560(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1ce3d
leaq 0x18(%rsp), %rdx
movq $-0x1, (%rdx)
movq %r14, %rdi
movl (%rsp), %esi
movl $0x2f, %ecx
callq 0x254d4
cmpb $0x0, 0xc(%rsp)
je 0x1ce6d
movq 0x588(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1ce6d
movsd 0x1d1fe(%rip), %xmm0    # 0x3a060
movq %r14, %rdi
movl (%rsp), %esi
callq 0x25604
cmpb $0x0, 0x8(%rsp)
je 0x1ce9a
movq 0x5b0(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1ce9a
movq %r14, %rdi
movl (%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2472a
cmpb $0x0, 0x4(%rsp)
je 0x1cef3
movq 0x5d8(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1cef3
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1e038(%rip), %rdx     # 0x3aeff
leaq 0x18(%rsp), %rdi
movq %rdx, %rsi
callq 0xc868
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl (%rsp), %esi
callq 0x256a4
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cef3
callq 0x5410
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5b1a
jmp 0x1cca5
leaq 0x2dd5d(%rip), %rdi     # 0x4ac70
callq 0x5810
testl %eax, %eax
je 0x1ccb3
leaq 0x2dbc9(%rip), %rdi     # 0x4aaf0
callq 0x5310
movq 0x2d065(%rip), %rdi     # 0x49f98
leaq 0x2dbb6(%rip), %rsi     # 0x4aaf0
leaq 0x2d517(%rip), %rdx     # 0x4a458
callq 0x53d0
leaq 0x2dd23(%rip), %rdi     # 0x4ac70
callq 0x5270
jmp 0x1ccb3
movq %rax, %rbx
leaq 0x2dd0f(%rip), %rdi     # 0x4ac70
callq 0x5250
jmp 0x1cf7f
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cf7f
callq 0x5410
jmp 0x1cf7f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57d0
nop