// File: /workspace/github_cpp_makefile_star2_O1/auton1[P]viterbi/vcf_entry.cpp
// Function: vcf_entry::parse_FORMAT()
void vcf_entry::parse_FORMAT()
{
	FORMAT_binary.resize(0);
	vector<char> tmp_vector;
	vector<string> tmp_split;
	vector< vector<string> > format_matrix(N_indv);

	unsigned int type, number, size, position=0;

	for (unsigned int ui=0; ui<N_indv; ui++)
	{
		if ( (GENOTYPE_str[ui] != "") and (GENOTYPE_str[ui] != ".") )
			header::tokenize(GENOTYPE_str[ui],':', tmp_split);
		else
			tmp_split.assign(FORMAT.size(),".");
		format_matrix[ui] = tmp_split;

		for (unsigned int uj=format_matrix[ui].size(); uj<FORMAT.size(); uj++)
			format_matrix[ui].push_back(".");
	}

	FORMAT_positions.resize(FORMAT.size()); FORMAT_types.resize(FORMAT.size()); FORMAT_skip.resize(FORMAT.size());

	for (unsigned int ui=0; ui<FORMAT.size(); ui++)
	{
		if (entry_header.FORMAT_reverse_map.find(FORMAT[ui]) == entry_header.FORMAT_reverse_map.end())
		{
			LOG.one_off_warning("FORMAT value " + FORMAT[ui] + " is not defined in the header and will not be encoded.");
			N_FORMAT_removed++;
			continue;
		}
		FORMAT_positions[ui] = position;
		make_typed_int(tmp_vector, entry_header.FORMAT_reverse_map[ FORMAT[ui] ], true );
		FORMAT_binary.insert(FORMAT_binary.end(), tmp_vector.begin(), tmp_vector.end() );

		tmp_vector.resize(0);
		tmp_split.resize(0);

		type = entry_header.FORMAT_map[ entry_header.FORMAT_reverse_map[FORMAT[ui]] ].Type;
		number = entry_header.FORMAT_map[ entry_header.FORMAT_reverse_map[FORMAT[ui]] ].N_entries;

		for (unsigned int uj=0; uj<N_indv; uj++)
			tmp_split.push_back( format_matrix[uj][ui] );

		if ((int)ui == GT_idx)
			make_typed_GT_vector(tmp_vector, tmp_split );
		else if (type == Integer)
			make_typed_int_vector(tmp_vector, tmp_split, number );
		else if (type == Float)
			make_typed_float_vector(tmp_vector, tmp_split, number );
		else if ( (type == Character) or (type == String) )
			make_typed_string_vector(tmp_vector, tmp_split, number );
		else
			LOG.error("Invalid type in FORMAT definition", 0);

		position = 0;
		get_type(&position, tmp_vector, type, size);
		FORMAT_types[ui] = type;

		if ( (type == 1) || (type == 7) )
			FORMAT_skip[ui] = size*sizeof(int8_t);
		else if (type == 2)
			FORMAT_skip[ui] = size*sizeof(int16_t);
		else if ( (type == 3) || (type == 5) )
			FORMAT_skip[ui] = size*sizeof(int32_t);

		FORMAT_binary.insert(FORMAT_binary.end(), tmp_vector.begin(), tmp_vector.end() );
		tmp_vector.resize(0);
		position = FORMAT_binary.size();
	}
	parsed_FORMAT_binary = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
addq $0x4b0, %rdi            # imm = 0x4B0
xorl %r14d, %r14d
movq %rdi, 0x70(%rsp)
xorl %esi, %esi
callq 0xf31a
movq %r14, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movl 0x8(%rbx), %esi
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1f136
movl $0x0, (%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x1d1bb
leaq 0x58(%rsp), %r14
xorl %r13d, %r13d
leaq 0x48(%rsp), %rbp
movq %r13, %r15
shlq $0x5, %r15
movq 0x758(%rbx), %rdi
addq %r15, %rdi
leaq 0x1de9a(%rip), %rsi     # 0x3aeff
callq 0x50e0
testl %eax, %eax
je 0x1d0a3
movq 0x758(%rbx), %rdi
addq %r15, %rdi
leaq 0x1d18e(%rip), %rsi     # 0x3a20d
callq 0x50e0
testl %eax, %eax
je 0x1d0a3
addq 0x758(%rbx), %r15
movq %r15, %rdi
movl $0x3a, %esi
leaq 0x30(%rsp), %rdx
callq 0x16a7e
jmp 0x1d0f2
movq 0x498(%rbx), %r12
movq 0x4a0(%rbx), %r15
movq %r14, 0x48(%rsp)
movq %rbp, %rdi
leaq 0x1d14d(%rip), %rsi     # 0x3a20d
leaq 0x1d147(%rip), %rdx     # 0x3a20e
callq 0xc868
subq %r12, %r15
sarq $0x5, %r15
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1f6b8
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d0f2
callq 0x5410
leaq (,%r13,2), %r15
addq %r13, %r15
leaq (,%r15,8), %rdi
addq 0x78(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf346
movq %r13, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq 0x8(%rax,%r15,8), %r12
subq (%rax,%r15,8), %r12
shrq $0x5, %r12
movl %r12d, %eax
movq 0x4a0(%rbx), %rcx
subq 0x498(%rbx), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
jbe 0x1d1a7
incl %r12d
movq 0x78(%rsp), %r13
movq %r14, 0x48(%rsp)
movq %rbp, %rdi
leaq 0x1d0b1(%rip), %rsi     # 0x3a20d
leaq 0x1d0ab(%rip), %rdx     # 0x3a20e
callq 0xc868
leaq (,%r15,8), %rdi
addq %r13, %rdi
movq %rbp, %rsi
callq 0x13458
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d18a
callq 0x5410
movq 0x4a0(%rbx), %rax
subq 0x498(%rbx), %rax
movl %r12d, %ecx
sarq $0x5, %rax
incl %r12d
cmpq %rcx, %rax
ja 0x1d148
movq 0x28(%rsp), %r13
incq %r13
movl 0x8(%rbx), %eax
cmpq %rax, %r13
jb 0x1d04d
leaq 0x640(%rbx), %rdi
movq 0x4a0(%rbx), %rsi
subq 0x498(%rbx), %rsi
sarq $0x5, %rsi
callq 0x1b394
leaq 0x658(%rbx), %rdi
movq 0x4a0(%rbx), %rsi
subq 0x498(%rbx), %rsi
sarq $0x5, %rsi
movq %rdi, 0x98(%rsp)
callq 0x1b394
leaq 0x688(%rbx), %rdi
movq 0x4a0(%rbx), %rsi
subq 0x498(%rbx), %rsi
sarq $0x5, %rsi
movq %rdi, 0x90(%rsp)
callq 0x1b394
movq 0x498(%rbx), %rsi
cmpq %rsi, 0x4a0(%rbx)
je 0x1d5e7
leaq 0x1c0(%rbx), %rbp
leaq 0x1c8(%rbx), %rax
movq %rax, 0xa0(%rsp)
leaq 0xd0(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0xb8(%rsp), %r15
xorl %r12d, %r12d
movq %rbp, 0x68(%rsp)
movq %r12, %r14
shlq $0x5, %r14
addq %r14, %rsi
movq %rbp, %rdi
callq 0x1818e
cmpq 0xa0(%rsp), %rax
je 0x1d397
movl (%rsp), %eax
movq 0x640(%rbx), %rcx
movl %eax, (%rcx,%r12,4)
movq 0x498(%rbx), %rsi
addq %r14, %rsi
movq %rbp, %rdi
callq 0x1785c
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x1fd74
movq 0x4b8(%rbx), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x70(%rsp), %rdi
callq 0x1be7e
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xf31a
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x1300a
movq 0x498(%rbx), %rsi
addq %r14, %rsi
movq %rbp, %rdi
callq 0x1785c
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x177f8
movl 0x88(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x498(%rbx), %rsi
addq %r14, %rsi
movq %rbp, %rdi
callq 0x1785c
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x177f8
movl 0x44(%rax), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x1d372
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x78(%rsp), %rax
movq (%rax,%r13), %rsi
addq %r14, %rsi
leaq 0x30(%rsp), %rdi
callq 0x13080
incq %rbp
movl 0x8(%rbx), %eax
addq $0x18, %r13
cmpq %rax, %rbp
jb 0x1d34d
cmpl 0x630(%rbx), %r12d
jne 0x1d3f0
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x20198
movq 0x68(%rsp), %rbp
jmp 0x1d51d
addq 0x498(%rbx), %r14
leaq 0x48(%rsp), %r13
movq %r13, %rdi
leaq 0x1cdf7(%rip), %rsi     # 0x3a1a4
movq %r14, %rdx
callq 0xb7dd
movq %r13, %rdi
leaq 0x1cdf3(%rip), %rsi     # 0x3a1b2
callq 0x5870
movq %r15, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d425
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x1d42c
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
movq 0x68(%rsp), %rbp
je 0x1d48c
testl %eax, %eax
jne 0x1d4a4
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq 0x207aa
jmp 0x1d51d
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2d05a(%rip), %rdi     # 0x4a4a8
leaq 0xa8(%rsp), %rsi
callq 0x37516
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d46d
callq 0x5410
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1d481
callq 0x5410
incl 0x4cc(%rbx)
jmp 0x1d5c6
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq 0x20f26
jmp 0x1d51d
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x1d4c4
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq 0x1ff68
jmp 0x1d51d
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
leaq 0x1cd03(%rip), %rsi     # 0x3a1e9
leaq 0x1cd1d(%rip), %rdx     # 0x3a20a
callq 0xc868
leaq 0x2cfaf(%rip), %rdi     # 0x4a4a8
movq %r14, %rsi
xorl %edx, %edx
callq 0x3721e
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d51d
callq 0x5410
movl $0x0, (%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x4(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x21532
movl 0x4(%rsp), %eax
movq 0x98(%rsp), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%r12,4)
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x6, %eax
ja 0x1d590
leaq 0x1cc19(%rip), %rcx     # 0x3a17c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0xc(%rsp), %eax
jmp 0x1d581
movl 0xc(%rsp), %eax
shll $0x2, %eax
jmp 0x1d581
movl 0xc(%rsp), %eax
addl %eax, %eax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%r12,4)
movq 0x4b8(%rbx), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x70(%rsp), %rdi
callq 0x1be7e
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xf31a
movl 0x4b8(%rbx), %eax
subl 0x4b0(%rbx), %eax
movl %eax, (%rsp)
incl %r12d
movq 0x498(%rbx), %rsi
movq 0x4a0(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x1d26b
movb $0x1, 0x3de(%rbx)
leaq 0x78(%rsp), %rdi
callq 0x1b6be
leaq 0x30(%rsp), %rdi
callq 0xc4f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d611
callq 0x5410
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1d69f
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
jmp 0x1d665
jmp 0x1d692
jmp 0x1d692
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d65b
callq 0x5410
jmp 0x1d65b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
jne 0x1d68b
jmp 0x1d695
jmp 0x1d692
jmp 0x1d692
jmp 0x1d67e
jmp 0x1d692
jmp 0x1d692
jmp 0x1d692
jmp 0x1d692
jmp 0x1d692
jmp 0x1d692
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d695
callq 0x5410
jmp 0x1d695
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x1b6be
leaq 0x30(%rsp), %rdi
callq 0xc4f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d6b8
callq 0x5410
movq %rbx, %rdi
callq 0x57d0