// File: /workspace/github_cpp_makefile_star2_O3/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 0x1cb08
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x18(%rax)
cmpb $0x0, 0x3dd(%r14)
jne 0x1cb21
leaq 0x718(%r14), %rsi
movq %r14, %rdi
callq 0x2478a
movb 0x2cfc1(%rip), %al      # 0x49ae8
testb %al, %al
je 0x1cd8c
movb 0x2d13b(%rip), %al      # 0x49c70
testb %al, %al
je 0x1cd96
movq 0x2cfac(%rip), %rax     # 0x49af0
leaq 0x2cfa5(%rip), %r15     # 0x49af0
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 0x2cf8b(%rip), %rdi     # 0x49b00
callq 0x5640
leaq 0x2cf47(%rip), %rsi     # 0x49ac8
movq %r15, %rdi
movl $0x3a, %edx
callq 0x5830
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1cc8b
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 0x2cf05(%rip), %rbp     # 0x49ac8
xorl %r12d, %r12d
testb %r13b, %r13b
je 0x1cbe4
cmpl 0x630(%r14), %ebx
jne 0x1cbe4
movq %r14, %rdi
movl (%rsp), %esi
movq %rbp, %rdx
callq 0x24b52
jmp 0x1cc5b
cmpb $0x0, 0xc(%rsp)
je 0x1cc11
cmpl 0x634(%r14), %ebx
jne 0x1cc11
movq %rbp, %rdi
movsd 0x1c441(%rip), %xmm0    # 0x39040
callq 0x1733c
movq %r14, %rdi
movl (%rsp), %esi
callq 0x253c6
jmp 0x1cc5b
cmpb $0x0, 0x8(%rsp)
je 0x1cc3d
cmpl 0x638(%r14), %ebx
jne 0x1cc3d
movq %rbp, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16afa
movq %r14, %rdi
movl (%rsp), %esi
movl %eax, %edx
callq 0x244ee
jmp 0x1cc5b
cmpb $0x0, 0x4(%rsp)
je 0x1cc5e
cmpl 0x63c(%r14), %ebx
jne 0x1cc5e
movq %r14, %rdi
movl (%rsp), %esi
movq %rbp, %rdx
callq 0x2546a
incl %r12d
cmpl %r15d, %r12d
je 0x1cc8b
incl %ebx
leaq 0x2ce84(%rip), %rdi     # 0x49af0
movq %rbp, %rsi
movl $0x3a, %edx
callq 0x5830
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1cbc6
testb %r13b, %r13b
movq 0x10(%rsp), %rbx
je 0x1ccc7
movq 0x560(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1ccc7
leaq 0x18(%rsp), %rdx
movq $-0x1, (%rdx)
movq %r14, %rdi
movl (%rsp), %esi
movl $0x2f, %ecx
callq 0x25290
cmpb $0x0, 0xc(%rsp)
je 0x1ccf7
movq 0x588(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1ccf7
movsd 0x1c354(%rip), %xmm0    # 0x39040
movq %r14, %rdi
movl (%rsp), %esi
callq 0x253c6
cmpb $0x0, 0x8(%rsp)
je 0x1cd24
movq 0x5b0(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1cd24
movq %r14, %rdi
movl (%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x244ee
cmpb $0x0, 0x4(%rsp)
je 0x1cd7d
movq 0x5d8(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1cd7d
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1d186(%rip), %rdx     # 0x39ed7
leaq 0x18(%rsp), %rdi
movq %rdx, %rsi
callq 0xc85e
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl (%rsp), %esi
callq 0x2546a
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cd7d
callq 0x5410
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5b1a
jmp 0x1cb2f
leaq 0x2ced3(%rip), %rdi     # 0x49c70
callq 0x5810
testl %eax, %eax
je 0x1cb3d
leaq 0x2cd3f(%rip), %rdi     # 0x49af0
callq 0x5310
movq 0x2c1db(%rip), %rdi     # 0x48f98
leaq 0x2cd2c(%rip), %rsi     # 0x49af0
leaq 0x2c68d(%rip), %rdx     # 0x49458
callq 0x53d0
leaq 0x2ce99(%rip), %rdi     # 0x49c70
callq 0x5270
jmp 0x1cb3d
movq %rax, %rbx
leaq 0x2ce85(%rip), %rdi     # 0x49c70
callq 0x5250
jmp 0x1ce09
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ce09
callq 0x5410
jmp 0x1ce09
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57d0
nop