// File: auton1[P]viterbi/vcf_entry.cpp
// Function: vcf_entry::print(std::ostream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool)
void vcf_entry::print(ostream &out, const set<string> &INFO_to_keep, bool keep_all_INFO)
{
	if (fully_parsed == false)
		parse_full_entry();

	out << get_CHROM() << '\t' << POS << '\t' << get_ID() << '\t' << REF << '\t' << get_ALT();

	out << '\t' << header::double2str(QUAL);
	out << '\t' << get_FILTER();

	if (keep_all_INFO == false)
		out << '\t' << get_INFO(INFO_to_keep);
	else
		out << '\t' << INFO_str;

	pair<int, int> genotype;
	string GFILTER_tmp;
	if (FORMAT.size() > 0)
	{
		char PHASE;
		out << '\t' << get_FORMAT();

		for (unsigned int ui=0; ui<N_indv; ui++)
		{
			if (include_indv[ui] == false)
				continue;
			out << '\t';
			for (int count=0; count<(int)FORMAT.size(); count++)
			{
				if (count == GT_idx) // (FORMAT[count] == "GT")
				{
					if (count != 0)	out << ':';
					if (include_genotype[ui] == true)
					{
						get_indv_GENOTYPE_ids(ui, genotype);
						PHASE = get_indv_PHASE(ui);
						if ((genotype.first != -1) && (genotype.second != -1))
							out << header::int2str(genotype.first) << PHASE << header::int2str(genotype.second);
						else if ((PHASE == '|') && (genotype.second == -1))
							out << header::int2str(genotype.first);	// Handle haploid case
						else
							out << header::int2str(genotype.first) << PHASE << header::int2str(genotype.second);
					}
					else
						out << "./.";
				}
				else if (count == GQ_idx) //(FORMAT[count] == "GQ")
				{
					if (count != 0)	out << ':';
					out << header::double2str(get_indv_GQUALITY(ui));
				}
				else if (count == DP_idx) // (FORMAT[count] == "DP")
				{
					if (count != 0)	out << ':';
					out << header::int2str(get_indv_DEPTH(ui));
				}
				else if (count == FT_idx) // (FORMAT[count] == "FT")
				{
					if (count != 0)	out << ':';
					get_indv_GFILTER(ui, GFILTER_tmp);
					out << GFILTER_tmp;
				}
				else
				{	// Unknown FORMAT so just replicate original output
					if (count != 0)	out << ':';
					read_indv_generic_entry(ui, FORMAT[count], GFILTER_tmp);
					out << GFILTER_tmp;
				}
			}
		}
	}
	out << '\n';
}

// Assembly:
subq $0x378, %rsp            # imm = 0x378
movb %cl, %al
movq %rdi, 0x370(%rsp)
movq %rsi, 0x368(%rsp)
movq %rdx, 0x360(%rsp)
andb $0x1, %al
movb %al, 0x35f(%rsp)
movq 0x370(%rsp), %rax
movq %rax, 0x120(%rsp)
movb 0x3d9(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4041d
movq 0x120(%rsp), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *0x18(%rax)
movq 0x120(%rsp), %rsi
movq 0x368(%rsp), %rax
movq %rax, 0x108(%rsp)
leaq 0x338(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0x4a260
movq 0x108(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x64a0
movq %rax, 0x118(%rsp)
jmp 0x40469
movq 0x118(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, 0x100(%rsp)
jmp 0x40485
movq 0x100(%rsp), %rdi
movq 0x120(%rsp), %rax
movl 0x400(%rax), %esi
callq 0x69c0
movq %rax, 0xf8(%rsp)
jmp 0x404aa
movq 0xf8(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, 0xf0(%rsp)
jmp 0x404c6
movq 0x120(%rsp), %rsi
leaq 0x308(%rsp), %rdi
callq 0x4a2e0
jmp 0x404dd
movq 0xf0(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x64a0
movq %rax, 0xe8(%rsp)
jmp 0x404fc
movq 0xe8(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, 0xe0(%rsp)
jmp 0x40518
movq 0xe0(%rsp), %rdi
movq 0x120(%rsp), %rsi
addq $0x428, %rsi            # imm = 0x428
callq 0x64a0
movq %rax, 0xd8(%rsp)
jmp 0x4053e
movq 0xd8(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, 0xd0(%rsp)
jmp 0x4055a
movq 0x120(%rsp), %rsi
leaq 0x2e8(%rsp), %rdi
callq 0x4a450
jmp 0x40571
movq 0xd0(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x64a0
jmp 0x40588
leaq 0x2e8(%rsp), %rdi
callq 0x6b50
leaq 0x308(%rsp), %rdi
callq 0x6b50
leaq 0x338(%rsp), %rdi
callq 0x6b50
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, %rcx
movq 0x120(%rsp), %rax
movq %rcx, 0xc0(%rsp)
movsd 0x460(%rax), %xmm0
leaq 0x2c8(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
movsd 0x3494c(%rip), %xmm1    # 0x74f40
callq 0x30730
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x64a0
jmp 0x40610
leaq 0x2c8(%rsp), %rdi
callq 0x6b50
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq 0x120(%rsp), %rsi
movq %rax, 0xb0(%rsp)
leaq 0x2a8(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x4ae50
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x64a0
jmp 0x4066b
leaq 0x2a8(%rsp), %rdi
callq 0x6b50
movb 0x35f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x407d5
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq 0x120(%rsp), %rsi
movq %rax, 0xa0(%rsp)
movq 0x360(%rsp), %rdx
leaq 0x288(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
xorl %ecx, %ecx
callq 0x4b050
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x64a0
jmp 0x406e5
leaq 0x288(%rsp), %rdi
callq 0x6b50
jmp 0x407fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
jmp 0x40751
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
jmp 0x40744
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x6b50
leaq 0x308(%rsp), %rdi
callq 0x6b50
leaq 0x338(%rsp), %rdi
callq 0x6b50
jmp 0x41024
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x6b50
jmp 0x41024
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x2a8(%rsp), %rdi
callq 0x6b50
jmp 0x41024
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x288(%rsp), %rdi
callq 0x6b50
jmp 0x41024
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq 0x120(%rsp), %rsi
movq %rax, %rdi
addq $0x6f8, %rsi            # imm = 0x6F8
callq 0x64a0
leaq 0x280(%rsp), %rdi
callq 0x2a380
leaq 0x260(%rsp), %rdi
callq 0x67e0
movq 0x120(%rsp), %rdi
addq $0x498, %rdi            # imm = 0x498
callq 0x10270
cmpq $0x0, %rax
jbe 0x40fee
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
movq %rax, 0x98(%rsp)
jmp 0x40852
movq 0x120(%rsp), %rsi
leaq 0x238(%rsp), %rdi
callq 0x4b9e0
jmp 0x40869
movq 0x98(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x64a0
jmp 0x40880
leaq 0x238(%rsp), %rdi
callq 0x6b50
movl $0x0, 0x234(%rsp)
movq 0x120(%rsp), %rcx
movl 0x234(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x40fec
movq 0x120(%rsp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
movl 0x234(%rsp), %eax
movl %eax, %esi
callq 0x102b0
movq %rdx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
jmp 0x408df
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0x220(%rsp)
movq %rax, 0x228(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x10310
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4095a
jmp 0x40fd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
jmp 0x41017
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x6b50
jmp 0x41017
movq 0x368(%rsp), %rdi
movl $0x9, %esi
callq 0x6670
jmp 0x4096e
movl $0x0, 0x21c(%rsp)
movq 0x120(%rsp), %rdi
movl 0x21c(%rsp), %eax
movl %eax, 0x84(%rsp)
addq $0x498, %rdi            # imm = 0x498
callq 0x10270
movq %rax, %rcx
movl 0x84(%rsp), %eax
cmpl %ecx, %eax
jge 0x40fd4
movq 0x120(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x630(%rcx), %eax
jne 0x40d30
cmpl $0x0, 0x21c(%rsp)
je 0x409e8
movq 0x368(%rsp), %rdi
movl $0x3a, %esi
callq 0x6670
jmp 0x409e6
jmp 0x409e8
movq 0x120(%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movl 0x234(%rsp), %eax
movl %eax, %esi
callq 0x102b0
movq %rdx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
jmp 0x40a11
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
movq %rcx, 0x208(%rsp)
movq %rax, 0x210(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x10310
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x40d13
movq 0x120(%rsp), %rdi
movl 0x234(%rsp), %esi
leaq 0x280(%rsp), %rdx
callq 0x4bd10
jmp 0x40a64
movq 0x120(%rsp), %rdi
movl 0x234(%rsp), %esi
callq 0x4bda0
movb %al, 0x6f(%rsp)
jmp 0x40a7e
movb 0x6f(%rsp), %al
movb %al, 0x25f(%rsp)
cmpl $-0x1, 0x280(%rsp)
je 0x40b96
cmpl $-0x1, 0x284(%rsp)
je 0x40b96
movq 0x368(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x280(%rsp), %esi
leaq 0x1e8(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40acd
movq 0x60(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x64a0
movq %rax, 0x58(%rsp)
jmp 0x40ae6
movq 0x58(%rsp), %rdi
movsbl 0x25f(%rsp), %esi
callq 0x6670
movq %rax, 0x50(%rsp)
jmp 0x40aff
movl 0x284(%rsp), %esi
leaq 0x1c8(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40b1a
movq 0x50(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x64a0
jmp 0x40b2e
leaq 0x1c8(%rsp), %rdi
callq 0x6b50
leaq 0x1e8(%rsp), %rdi
callq 0x6b50
jmp 0x40d11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
jmp 0x40b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x6b50
leaq 0x1e8(%rsp), %rdi
callq 0x6b50
jmp 0x41017
movsbl 0x25f(%rsp), %eax
cmpl $0x7c, %eax
jne 0x40c21
cmpl $-0x1, 0x284(%rsp)
jne 0x40c21
movq 0x368(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x280(%rsp), %esi
leaq 0x1a8(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40bd5
movq 0x48(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x64a0
jmp 0x40be9
leaq 0x1a8(%rsp), %rdi
callq 0x6b50
jmp 0x40d0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x6b50
jmp 0x41017
movq 0x368(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x280(%rsp), %esi
leaq 0x188(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40c49
movq 0x40(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x64a0
movq %rax, 0x38(%rsp)
jmp 0x40c62
movq 0x38(%rsp), %rdi
movsbl 0x25f(%rsp), %esi
callq 0x6670
movq %rax, 0x30(%rsp)
jmp 0x40c7b
movl 0x284(%rsp), %esi
leaq 0x168(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40c96
movq 0x30(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x64a0
jmp 0x40caa
leaq 0x168(%rsp), %rdi
callq 0x6b50
leaq 0x188(%rsp), %rdi
callq 0x6b50
jmp 0x40d0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
jmp 0x40cfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x6b50
leaq 0x188(%rsp), %rdi
callq 0x6b50
jmp 0x41017
jmp 0x40d11
jmp 0x40d2b
movq 0x368(%rsp), %rdi
leaq 0x343ba(%rip), %rsi     # 0x750dc
callq 0x6540
jmp 0x40d29
jmp 0x40d2b
jmp 0x40fbc
movq 0x120(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x634(%rcx), %eax
jne 0x40dfd
cmpl $0x0, 0x21c(%rsp)
je 0x40d6b
movq 0x368(%rsp), %rdi
movl $0x3a, %esi
callq 0x6670
jmp 0x40d69
jmp 0x40d6b
movq 0x120(%rsp), %rdi
movq 0x368(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x234(%rsp), %esi
callq 0x4beb0
movsd %xmm0, 0x28(%rsp)
jmp 0x40d94
movsd 0x28(%rsp), %xmm0
leaq 0x148(%rsp), %rdi
movsd 0x34196(%rip), %xmm1    # 0x74f40
callq 0x30730
jmp 0x40db1
movq 0x20(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x64a0
jmp 0x40dc5
leaq 0x148(%rsp), %rdi
callq 0x6b50
jmp 0x40fba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x6b50
jmp 0x41017
movq 0x120(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x638(%rcx), %eax
jne 0x40ec3
cmpl $0x0, 0x21c(%rsp)
je 0x40e38
movq 0x368(%rsp), %rdi
movl $0x3a, %esi
callq 0x6670
jmp 0x40e36
jmp 0x40e38
movq 0x120(%rsp), %rdi
movq 0x368(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x234(%rsp), %esi
callq 0x4be10
movl %eax, 0x1c(%rsp)
jmp 0x40e5f
movl 0x1c(%rsp), %esi
leaq 0x128(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x40e77
movq 0x10(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x64a0
jmp 0x40e8b
leaq 0x128(%rsp), %rdi
callq 0x6b50
jmp 0x40fb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x330(%rsp)
movl %eax, 0x32c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x6b50
jmp 0x41017
movq 0x120(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x63c(%rcx), %eax
jne 0x40f34
cmpl $0x0, 0x21c(%rsp)
je 0x40efa
movq 0x368(%rsp), %rdi
movl $0x3a, %esi
callq 0x6670
jmp 0x40ef8
jmp 0x40efa
movq 0x120(%rsp), %rdi
movl 0x234(%rsp), %esi
leaq 0x260(%rsp), %rdx
callq 0x4c010
jmp 0x40f18
movq 0x368(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x64a0
jmp 0x40f2f
jmp 0x40fb6
cmpl $0x0, 0x21c(%rsp)
je 0x40f54
movq 0x368(%rsp), %rdi
movl $0x3a, %esi
callq 0x6670
jmp 0x40f52
jmp 0x40f54
movq 0x120(%rsp), %rdi
movl 0x234(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x498, %rdi            # imm = 0x498
movslq 0x21c(%rsp), %rsi
callq 0x10290
movq 0x120(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %rax, %rdx
movq (%rdi), %rax
movq 0x38(%rax), %rax
leaq 0x260(%rsp), %rcx
callq *%rax
jmp 0x40f9d
movq 0x368(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x64a0
jmp 0x40fb4
jmp 0x40fb6
jmp 0x40fb8
jmp 0x40fba
jmp 0x40fbc
jmp 0x40fbe
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0x40979
jmp 0x40fd6
movl 0x234(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x234(%rsp)
jmp 0x40898
jmp 0x40fee
movq 0x368(%rsp), %rdi
movl $0xa, %esi
callq 0x6670
jmp 0x41002
leaq 0x260(%rsp), %rdi
callq 0x6b50
addq $0x378, %rsp            # imm = 0x378
retq
leaq 0x260(%rsp), %rdi
callq 0x6b50
movq 0x330(%rsp), %rdi
callq 0x69e0
nopw %cs:(%rax,%rax)