// File: /workspace/github_cpp_makefile_star2_O1/auton1[P]viterbi/bcf_entry.cpp
// Function: bcf_entry::parse_genotype_entry(unsigned int, bool, bool, bool, bool)
void bcf_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();

	unsigned int l_pos, indv_size, type, size, ui;
	vector<int> ids;

	if ( GT && !parsed_GT[indv] && GT_idx != -1 )
		ids.push_back(GT_idx);
	if (GQ && !parsed_GQ[indv] && GQ_idx != -1)
		ids.push_back(GQ_idx);
	if (DP && !parsed_DP[indv] && DP_idx != -1)
		ids.push_back(DP_idx);
	if (FT && !parsed_FT[indv] && FT_idx != -1)
		ids.push_back(FT_idx);

	for(unsigned int i=0; i<ids.size(); i++)
	{
		ui = ids[i];
		type = FORMAT_types[ui];
		size = FORMAT_sizes[ui];
		indv_size = FORMAT_skip[ui];
		l_pos = FORMAT_positions[ui] + indv*indv_size;

		if ((int)ui == GT_idx)
			set_indv_GENOTYPE_and_PHASE(indv, l_pos, size);
		else if ((int)ui == GQ_idx)
		{
			if (size>1)
				LOG.error("Error: Only expect single value for QUALITY.\n");

			float tmp;
			if (type==5)
				tmp = *reinterpret_cast<const float*>(&line[l_pos]);
			else if (type==1)
			{
				int8_t tmp2 = *reinterpret_cast<const int8_t*>(&line[l_pos]);
				tmp = (float)tmp2;
			}
			else if (type==2)
			{
				int16_t tmp2 = *reinterpret_cast<const int16_t*>(&line[l_pos]);
				tmp = (float)tmp2;
			}
			else if (type==3)
			{
				int32_t tmp2 = *reinterpret_cast<const int32_t*>(&line[l_pos]);
				tmp = (float)tmp2;
			}
			else
				LOG.error("Error: Invalid type for QUALITY.\n");

			set_indv_GQUALITY(indv, tmp);
		}
		else if ((int)ui == DP_idx)
		{
			if (size>1)
				LOG.error("Error: Only expect single value for DEPTH.\n");

			int tmp = -1;

			if (type==1)
			{
				if ( !check_missing(l_pos, 1, line) )
					tmp = *reinterpret_cast<const int8_t*>(&line[l_pos]);
			}
			else if (type==2)
			{
				if ( !check_missing(l_pos, 2, line) )
					tmp = *reinterpret_cast<const int16_t*>(&line[l_pos]);
			}
			else if (type==3)
			{
				if ( !check_missing(l_pos, 3, line) )
					tmp = *reinterpret_cast<const int32_t*>(&line[l_pos]);
			}
			else if (type==5)
			{
				float tmp2 = -1;
				if ( !check_missing(l_pos, 5, line) )
					tmp2 = *reinterpret_cast<const float*>(&line[l_pos]);
				tmp = (int)tmp2;
			}
			else
				LOG.error("Error: Invalid type for DEPTH.\n");

			set_indv_DEPTH(indv, tmp);
		}
		else if ((int)ui == FT_idx)
		{
			if (type == 7)
			{
				vector<char> tmp;
				tmp.resize( size*sizeof(char) );
				memcpy(&tmp[0], &line[l_pos], size*sizeof(char));
				set_indv_GFILTER(indv, tmp);
			}
			else
				LOG.one_off_warning("Warning: FT values must be encoded in string format.\n");
		}
	}
	// 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 $0x108, %rsp            # imm = 0x108
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x0, 0x3d9(%rdi)
jne 0x19033
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x18(%rax)
cmpb $0x0, 0x3dd(%r14)
jne 0x19045
movq %r14, %rdi
callq 0x277b0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testb %r13b, %r13b
je 0x19075
movq 0x560(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jae 0x19681
testb %r12b, %r12b
je 0x19094
movq 0x588(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jae 0x196b1
testb %r15b, %r15b
je 0x190b3
movq 0x5b0(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jae 0x196dd
testb %bpl, %bpl
je 0x190d2
movq 0x5d8(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jae 0x19709
movl %r13d, 0x5c(%rsp)
movl %r12d, 0x60(%rsp)
movl %r15d, 0x64(%rsp)
movl %ebp, 0x58(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x1956b
leaq 0x3c0(%r14), %rcx
movq %rcx, 0x8(%rsp)
movl $0x1, %r13d
xorl %ecx, %ecx
leaq 0x2c(%rsp), %r12
movl (%rax,%rcx,4), %eax
movq 0x658(%r14), %rcx
movq 0x670(%r14), %rdx
movl (%rcx,%rax,4), %ebp
movl (%rdx,%rax,4), %esi
movl %esi, 0x2c(%rsp)
movq 0x640(%r14), %rcx
movq 0x688(%r14), %rdx
movl (%rdx,%rax,4), %edx
imull %ebx, %edx
addl (%rcx,%rax,4), %edx
movl %edx, 0x4(%rsp)
cmpl 0x630(%r14), %eax
jne 0x19164
movq %r14, %rdi
movl %ebx, %esi
leaq 0x4(%rsp), %rdx
movq %r12, %rcx
callq 0x27dde
jmp 0x1954b
cmpl 0x634(%r14), %eax
jne 0x19201
cmpl $0x2, %esi
jb 0x191d2
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq 0xe8(%rsp), %r15
movq %r15, %rdi
leaq 0x20ed0(%rip), %rsi     # 0x3a068
leaq 0x20ef6(%rip), %rdx     # 0x3a095
callq 0xc868
leaq 0x312fd(%rip), %rdi     # 0x4a4a8
movq %r15, %rsi
movl $0x1, %edx
callq 0x3721e
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x191d2
callq 0x5410
decl %ebp
cmpl $0x4, %ebp
ja 0x19389
leaq 0x20e3c(%rip), %rcx     # 0x3a020
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x4(%rsp), %eax
movq 0x3c0(%r14), %rcx
movsbl (%rcx,%rax), %eax
jmp 0x19353
cmpl 0x638(%r14), %eax
jne 0x192c2
cmpl $0x2, %esi
jb 0x1926f
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
leaq 0x20e83(%rip), %rsi     # 0x3a0b8
leaq 0x20ea7(%rip), %rdx     # 0x3a0e3
callq 0xc868
leaq 0x31260(%rip), %rdi     # 0x4a4a8
movq %r15, %rsi
movl $0x1, %edx
callq 0x3721e
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1926f
callq 0x5410
decl %ebp
cmpl $0x4, %ebp
ja 0x194de
leaq 0x20d8b(%rip), %rcx     # 0x3a00c
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x4(%rsp), %esi
movq %r14, %rdi
movl $0x1, %edx
movq 0x8(%rsp), %rcx
callq 0x218ae
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x1953f
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movsbl (%rcx,%rax), %ebp
jmp 0x1953f
cmpl 0x63c(%r14), %eax
jne 0x1954b
cmpl $0x7, %ebp
jne 0x193ec
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0xf31a
movq 0x30(%rsp), %rdi
movl 0x4(%rsp), %esi
addq 0x3c0(%r14), %rsi
movl 0x2c(%rsp), %edx
callq 0x5380
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x28506
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x19433
jmp 0x1954b
movl 0x4(%rsp), %eax
movq 0x3c0(%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2ssl (%rcx,%rax), %xmm0
jmp 0x1936c
movl 0x4(%rsp), %eax
movq 0x3c0(%r14), %rcx
movswl (%rcx,%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
jmp 0x1936c
movl 0x4(%rsp), %eax
movq 0x3c0(%r14), %rcx
movss (%rcx,%rax), %xmm0
movss %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x2844a
jmp 0x1954b
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xc8(%rsp), %r15
movq %r15, %rdi
leaq 0x20ceb(%rip), %rsi     # 0x3a096
leaq 0x20d05(%rip), %rdx     # 0x3a0b7
callq 0xc868
leaq 0x310ea(%rip), %rdi     # 0x4a4a8
movq %r15, %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0x30(%rsp), %r15
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x19377
callq 0x5410
jmp 0x19377
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %r15
movq %r15, %rdi
leaq 0x20cff(%rip), %rsi     # 0x3a104
leaq 0x20d2d(%rip), %rdx     # 0x3a139
callq 0xc868
leaq 0x31090(%rip), %rdi     # 0x4a4a8
movq %r15, %rsi
callq 0x37516
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x1954b
callq 0x5410
jmp 0x1954b
movl 0x4(%rsp), %esi
movq %r14, %rdi
movl $0x3, %edx
movq 0x8(%rsp), %rcx
callq 0x218ae
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x1953f
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax), %ebp
jmp 0x1953f
movl 0x4(%rsp), %esi
movq %r14, %rdi
movl $0x2, %edx
movq 0x8(%rsp), %rcx
callq 0x218ae
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x1953f
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movswl (%rcx,%rax), %ebp
jmp 0x1953f
movl 0x4(%rsp), %esi
movq %r14, %rdi
movl $0x5, %edx
movq 0x8(%rsp), %rcx
callq 0x218ae
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x1953f
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
cvttss2si (%rcx,%rax), %ebp
jmp 0x1953f
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %r15
movq %r15, %rdi
leaq 0x20be4(%rip), %rsi     # 0x3a0e4
leaq 0x20bfc(%rip), %rdx     # 0x3a103
callq 0xc868
leaq 0x30f95(%rip), %rdi     # 0x4a4a8
movq %r15, %rsi
movl $0x1, %edx
callq 0x3721e
movq 0x88(%rsp), %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1953f
callq 0x5410
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x2472a
movl %r13d, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0x1910e
cmpb $0x0, 0x5c(%rsp)
movl 0x64(%rsp), %r15d
movl 0x60(%rsp), %ebp
je 0x195ac
movq 0x560(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x195ac
leaq 0x30(%rsp), %rdx
movq $-0x1, (%rdx)
movq %r14, %rdi
movl %ebx, %esi
movl $0x2f, %ecx
callq 0x2826a
testb %bpl, %bpl
movl 0x58(%rsp), %ebp
je 0x195e0
movq 0x588(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x195e0
leaq 0x30(%rsp), %rdx
movl $0xbf800000, (%rdx)     # imm = 0xBF800000
movq %r14, %rdi
movl %ebx, %esi
callq 0x2844a
testb %r15b, %r15b
je 0x1960a
movq 0x5b0(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x1960a
movq %r14, %rdi
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2472a
testb %bpl, %bpl
je 0x19660
movq 0x5d8(%r14), %rax
movl %ebx, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rbx, %rax
jb 0x19660
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x218ca(%rip), %rdx     # 0x3aeff
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0xc868
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x2878a
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x19660
callq 0x5410
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1966f
callq 0x5410
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x630(%r14), %eax
cmpl $-0x1, %eax
je 0x19075
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19735
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x19075
movl 0x634(%r14), %eax
cmpl $-0x1, %eax
je 0x19094
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x1974b
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x19094
movl 0x638(%r14), %eax
cmpl $-0x1, %eax
je 0x190b3
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19761
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x190b3
movl 0x63c(%r14), %eax
cmpl $-0x1, %eax
je 0x190d2
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19777
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x190d2
leaq 0x630(%r14), %rdx
leaq 0x10(%rsp), %rdi
callq 0xca5a
jmp 0x19075
leaq 0x634(%r14), %rdx
leaq 0x10(%rsp), %rdi
callq 0xca5a
jmp 0x19094
leaq 0x638(%r14), %rdx
leaq 0x10(%rsp), %rdi
callq 0xca5a
jmp 0x190b3
leaq 0x63c(%r14), %rdx
leaq 0x10(%rsp), %rdi
callq 0xca5a
jmp 0x190d2
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
jne 0x19836
jmp 0x19846
jmp 0x19843
jmp 0x19843
jmp 0x19843
jmp 0x19843
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
jmp 0x19831
jmp 0x19843
jmp 0x19843
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
jmp 0x19831
jmp 0x19843
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
jmp 0x19831
jmp 0x19843
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
jmp 0x19831
jmp 0x19843
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x19836
jmp 0x19846
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x19846
callq 0x5410
jmp 0x19846
jmp 0x19843
jmp 0x19843
jmp 0x19843
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19855
callq 0x5410
movq %rbx, %rdi
callq 0x57d0
nop