// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/bcf_entry.cpp
// Function: bcf_entry::read_indv_generic_entry(unsigned int, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void bcf_entry::read_indv_generic_entry(unsigned int indv, const int &idx, string &out)
{
	if (fully_parsed == false)
		parse_full_entry(true);

	if (parsed_FORMAT == false)
		set_FORMAT();

	if(idx == GT_idx)
		parse_genotype_entry(indv, true);

	out = ".";
	ostringstream outstream;
	outstream.str("");

	string tmpstr;
	unsigned int l_pos, type, size;
	bool miss, format_miss;

	l_pos = FORMAT_positions[idx] + FORMAT_skip[idx]*indv;
	type = FORMAT_types[idx];
	size = FORMAT_sizes[idx];

	format_miss = true;
	if(type == 1)
	{
		int8_t tmp;
		if (idx == GT_idx)
		{
			pair<int, int> genotype;
			char phase;

			get_indv_GENOTYPE_ids(indv, genotype);
			phase = get_indv_PHASE(indv);
			if ((genotype.first == -2) && (genotype.second == -2))
				outstream << ".";
			else if ((genotype.first == -1) && (genotype.second == -2))
				outstream << ".";
			else if ((genotype.first > -1) && (genotype.second == -2))
				outstream << header::int2str(genotype.first);
			else if ((genotype.first > -1) && (genotype.second > -1))
				outstream << header::int2str(genotype.first) << phase << header::int2str(genotype.second);
			else
				outstream << header::int2str(genotype.first) << phase << header::int2str(genotype.second);

			tmpstr = outstream.str();
			out = tmpstr;
		}
		else
		{
			format_miss = true;
			for (unsigned int uj=0; uj<size; uj++)
			{
				if (check_end(l_pos, type, line))
					break;

				miss = check_missing(l_pos, type, line);
				if (uj != 0)
					outstream << ",";

				if (miss)
					outstream << ".";
				else
				{
					tmp = *reinterpret_cast<const int8_t*>(&line[l_pos]);
					outstream << int(tmp);
				}
				l_pos += sizeof(int8_t);
				format_miss = format_miss && miss;
			}

			tmpstr = outstream.str();
			if ( (tmpstr.length() > 0) and !format_miss)
				out = tmpstr;
		}
	}
	else if (type == 2)
	{
		int16_t tmp;
		format_miss = true;

		for (unsigned int uj=0; uj<size; uj++)
		{
			if (check_end(l_pos, type, line))
				break;

			miss = check_missing(l_pos, type, line);
			if (uj != 0)
				outstream << ",";

			if (miss)
				outstream << ".";
			else
			{
				tmp = *reinterpret_cast<const int16_t*>(&line[l_pos]);
				outstream << int(tmp);
			}
			l_pos += sizeof(int16_t);
			format_miss = format_miss && miss;
		}

		tmpstr = outstream.str();
		if ( (tmpstr.length() > 0) and !format_miss )
			out = tmpstr;
	}
	else if (type == 3)
	{
		int32_t tmp;
		format_miss = true;

		for (unsigned int uj=0; uj<size; uj++)
		{
			if (check_end(l_pos, type, line))
				break;

			miss = check_missing(l_pos, type, line);
			if (uj != 0)
				outstream << ",";

			if (miss)
				outstream << ".";
			else
			{
				tmp = *reinterpret_cast<const int32_t*>(&line[l_pos]);
				outstream << int(tmp);
			}
			l_pos += sizeof(int32_t);
			format_miss = format_miss && miss;
		}

		tmpstr = outstream.str();
		if ( (tmpstr.length() > 0) and !format_miss )
			out = tmpstr;
	}
	else if (type == 5)
	{
		float tmp;
		format_miss = true;

		for (unsigned int uj=0; uj<size; uj++)
		{
			if (check_end(l_pos, type, line))
				break;

			miss = check_missing(l_pos, type, line);
			if (uj != 0)
				outstream << ",";

			if (miss)
				outstream << ".";
			else
			{
				tmp = *reinterpret_cast<const float*>(&line[l_pos]);
				outstream << float(tmp);
			}
			l_pos += sizeof(float);
			format_miss = format_miss && miss;
		}

		tmpstr = outstream.str();
		if ( (tmpstr.length() > 0) and !format_miss )
			out = tmpstr;
	}
	else if (type == 7)
	{
		stringstream str_stream;
		string tmp_string;
		char tmp = '.';

		for (unsigned int uj=0; uj<size; uj++)
		{
			tmp = *reinterpret_cast<const char*>(&line[l_pos]);
			l_pos += sizeof(char);
			str_stream << tmp;
		}
		tmp_string = str_stream.str();
		tmp_string.erase( remove( tmp_string.begin(), tmp_string.end(), ' ' ), tmp_string.end() );

		if (tmp_string != "")
			out = tmp;
		else
			out = ".";
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rcx, %rbx
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r15
cmpb $0x0, 0x3d9(%rdi)
jne 0x19837
movq (%r15), %rax
movq %r15, %rdi
movl $0x1, %esi
callq *0x18(%rax)
cmpb $0x0, 0x3dd(%r15)
jne 0x19849
movq %r15, %rdi
callq 0x27570
movl (%r12), %eax
cmpl 0x630(%r15), %eax
jne 0x1986e
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *0x20(%rax)
movq 0x8(%rbx), %rdx
leaq 0x1f974(%rip), %rcx     # 0x391ed
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5690
leaq 0x200(%rsp), %rdi
callq 0x55d0
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2062e(%rip), %rdx     # 0x39ed7
leaq 0x78(%rsp), %rdi
movq %rdx, %rsi
callq 0xc85e
leaq 0x208(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x5640
movq %rbx, 0x10(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x198e4
callq 0x5410
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movslq (%r12), %rax
movq 0x658(%r15), %rcx
movl (%rcx,%rax,4), %ecx
decl %ecx
cmpl $0x6, %ecx
ja 0x1a124
movq 0x688(%r15), %rdx
movl (%rdx,%rax,4), %r12d
imull %ebp, %r12d
movq 0x640(%r15), %rdx
addl (%rdx,%rax,4), %r12d
movq 0x670(%r15), %rdx
movl (%rdx,%rax,4), %ebx
leaq 0x1f6d6(%rip), %rdx     # 0x39014
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl 0x630(%r15), %eax
jne 0x19c55
leaq 0x58(%rsp), %rdx
movq $0x0, (%rdx)
movq %r15, %rdi
movl %ebp, %esi
callq 0x22b50
movq %r15, %rdi
movl %ebp, %esi
callq 0x22b98
movl %eax, %ebx
movl 0x58(%rsp), %esi
movl 0x5c(%rsp), %eax
cmpl $-0x2, %eax
sete %cl
cmpl $-0x2, %esi
setae %dl
testb %cl, %dl
je 0x19f32
leaq 0x1f854(%rip), %rsi     # 0x391ed
leaq 0x200(%rsp), %rdi
movl $0x1, %edx
callq 0x54f0
jmp 0x1a0dc
testl %ebx, %ebx
je 0x19d17
leaq 0x3c0(%r15), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %r14b
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x3, %edx
movq 0x8(%rsp), %rcx
callq 0x21788
testb %al, %al
jne 0x19d1a
movq %r15, %rdi
movl %r12d, %esi
movl $0x3, %edx
movq 0x8(%rsp), %rcx
callq 0x21712
movl %eax, %ebp
testl %r13d, %r13d
je 0x19a1c
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f275(%rip), %rsi     # 0x38c8c
callq 0x54f0
testb %bpl, %bpl
je 0x19a3c
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f7b8(%rip), %rsi     # 0x391ed
callq 0x54f0
jmp 0x19a57
movl %r12d, %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax), %esi
leaq 0x200(%rsp), %rdi
callq 0x57a0
addl $0x4, %r12d
andb %bpl, %r14b
incl %r13d
cmpl %r13d, %ebx
jne 0x199ca
jmp 0x19d1a
testl %ebx, %ebx
je 0x19d80
leaq 0x3c0(%r15), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movb $0x1, %r14b
movq %r15, %rdi
movl %r12d, %esi
movl $0x2, %edx
movq 0x8(%rsp), %rcx
callq 0x21788
testb %al, %al
jne 0x19d83
movq %r15, %rdi
movl %r12d, %esi
movl $0x2, %edx
movq 0x8(%rsp), %rcx
callq 0x21712
movl %eax, %ebp
testl %r13d, %r13d
je 0x19adb
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f1b6(%rip), %rsi     # 0x38c8c
callq 0x54f0
testb %bpl, %bpl
je 0x19afb
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f6f9(%rip), %rsi     # 0x391ed
callq 0x54f0
jmp 0x19b17
movl %r12d, %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movswl (%rcx,%rax), %esi
leaq 0x200(%rsp), %rdi
callq 0x57a0
addl $0x2, %r12d
andb %bpl, %r14b
incl %r13d
cmpl %r13d, %ebx
jne 0x19a89
jmp 0x19d83
testl %ebx, %ebx
je 0x19de9
leaq 0x3c0(%r15), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %r14b
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x5, %edx
movq 0x8(%rsp), %rcx
callq 0x21788
testb %al, %al
jne 0x19dec
movq %r15, %rdi
movl %r12d, %esi
movl $0x5, %edx
movq 0x8(%rsp), %rcx
callq 0x21712
movl %eax, %ebp
testl %r13d, %r13d
je 0x19b9b
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f0f6(%rip), %rsi     # 0x38c8c
callq 0x54f0
testb %bpl, %bpl
je 0x19bbb
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f639(%rip), %rsi     # 0x391ed
callq 0x54f0
jmp 0x19bdb
movl %r12d, %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax), %xmm0
leaq 0x200(%rsp), %rdi
callq 0x56e0
addl $0x4, %r12d
andb %bpl, %r14b
incl %r13d
cmpl %r13d, %ebx
jne 0x19b49
jmp 0x19dec
leaq 0x78(%rsp), %rdi
callq 0x52e0
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
testl %ebx, %ebx
je 0x19e52
leaq 0x88(%rsp), %r13
leaq 0x58(%rsp), %r14
movl %r12d, %eax
movq 0x3c0(%r15), %rcx
movb (%rcx,%rax), %bpl
movb %bpl, 0x58(%rsp)
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x54f0
incl %r12d
decl %ebx
jne 0x19c26
jmp 0x19e55
testl %ebx, %ebx
je 0x19f76
leaq 0x3c0(%r15), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movb $0x1, 0x7(%rsp)
leal (%r12,%r13), %ebp
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
movq 0x8(%rsp), %rcx
callq 0x21788
testb %al, %al
jne 0x19f7b
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
movq 0x8(%rsp), %rcx
callq 0x21712
movl %eax, %r14d
testl %r13d, %r13d
je 0x19cc6
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1efcb(%rip), %rsi     # 0x38c8c
callq 0x54f0
testb %r14b, %r14b
je 0x19ce6
movl $0x1, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1f50e(%rip), %rsi     # 0x391ed
callq 0x54f0
jmp 0x19d01
movl %ebp, %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movsbl (%rcx,%rax), %esi
leaq 0x200(%rsp), %rdi
callq 0x57a0
andb %r14b, 0x7(%rsp)
incl %r13d
cmpl %r13d, %ebx
jne 0x19c71
jmp 0x19f7b
movb $0x1, %r14b
leaq 0x78(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x56c0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %r13
je 0x19d58
callq 0x5410
cmpq $0x0, 0x20(%rsp)
sete %al
orb %r14b, %al
testb $0x1, %al
jne 0x1a124
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x51f0
jmp 0x1a124
movb $0x1, %r14b
leaq 0x78(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x56c0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %r13
je 0x19dc1
callq 0x5410
cmpq $0x0, 0x20(%rsp)
sete %al
orb %r14b, %al
testb $0x1, %al
jne 0x1a124
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x51f0
jmp 0x1a124
movb $0x1, %r14b
leaq 0x78(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x56c0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %r13
je 0x19e2a
callq 0x5410
cmpq $0x0, 0x20(%rsp)
sete %al
orb %r14b, %al
testb $0x1, %al
jne 0x1a124
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x51f0
jmp 0x1a124
movb $0x2e, %bpl
leaq 0x90(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x56c0
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %r13
je 0x19e90
callq 0x5410
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq %rdi, %rsi
leaq 0x58(%rsp), %rdx
movb $0x20, (%rdx)
callq 0x1bcb3
leaq 0x38(%rsp), %rdi
movq %rax, %rcx
subq (%rdi), %rcx
movq %rcx, 0x8(%rdi)
movb $0x0, (%rax)
leaq 0x20014(%rip), %rsi     # 0x39ed7
callq 0x50e0
movq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdx
testl %eax, %eax
je 0x19ee7
movsbl %bpl, %r8d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x5860
jmp 0x19efb
leaq 0x1f2ff(%rip), %rcx     # 0x391ed
movl $0x1, %r8d
xorl %esi, %esi
callq 0x5690
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x19f0f
callq 0x5410
movq 0x2f06a(%rip), %rsi     # 0x48f80
leaq 0x78(%rsp), %rdi
callq 0x5330
leaq 0xf8(%rsp), %rdi
callq 0x5100
jmp 0x1a124
cmpl $-0x2, %eax
sete %cl
testl %esi, %esi
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x19fe2
leaq 0x78(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x200(%rsp), %rdi
callq 0x54f0
jmp 0x1a0c5
movb $0x1, 0x7(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x28(%rsp), %r13
callq 0x56c0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x19fb9
callq 0x5410
cmpq $0x0, 0x20(%rsp)
sete %al
orb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1a124
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x51f0
jmp 0x1a124
orl %esi, %eax
js 0x1a04d
leaq 0x78(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x200(%rsp), %rdi
callq 0x54f0
leaq 0x38(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x54f0
movq %rax, %rbx
movl 0x5c(%rsp), %esi
leaq 0x38(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x54f0
jmp 0x1a0b2
leaq 0x78(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x200(%rsp), %rdi
callq 0x54f0
leaq 0x38(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x54f0
movq %rax, %rbx
movl 0x5c(%rsp), %esi
leaq 0x38(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x54f0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a0c5
callq 0x5410
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1a0dc
callq 0x5410
leaq 0x78(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x56c0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, %rsi
callq 0x5550
movq (%rbx), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1a115
callq 0x5410
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x51f0
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a133
callq 0x5410
movq 0x2ee86(%rip), %rsi     # 0x48fc0
leaq 0x200(%rsp), %rdi
callq 0x51e0
leaq 0x270(%rsp), %rdi
callq 0x5100
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a168
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a195
callq 0x5410
jmp 0x1a195
jmp 0x1a192
jmp 0x1a192
jmp 0x1a220
jmp 0x1a220
jmp 0x1a192
jmp 0x1a192
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1a223
callq 0x5410
jmp 0x1a223
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a220
jmp 0x1a1e5
jmp 0x1a1e5
jmp 0x1a1e5
jmp 0x1a220
jmp 0x1a220
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
jmp 0x1a22d
movq %rax, %rbx
jmp 0x1a237
jmp 0x1a220
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1a1fc
callq 0x5410
movq 0x2ed7d(%rip), %rsi     # 0x48f80
leaq 0x78(%rsp), %rdi
callq 0x5330
leaq 0xf8(%rsp), %rdi
callq 0x5100
jmp 0x1a223
jmp 0x1a220
jmp 0x1a220
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1a237
callq 0x5410
movq 0x2ed82(%rip), %rsi     # 0x48fc0
leaq 0x200(%rsp), %rdi
callq 0x51e0
leaq 0x270(%rsp), %rdi
callq 0x5100
movq %rbx, %rdi
callq 0x57d0