// File: /workspace/github_cpp_makefile_star2_O2/auton1[P]viterbi/bcf_entry_setters.cpp
// Function: bcf_entry::set_FORMAT()
void bcf_entry::set_FORMAT()
{
	FORMAT.resize(0);
	FORMAT_to_idx.clear();
	unsigned int l_pos = L_shared + 2*sizeof(uint32_t);
	unsigned int fmt_key, type, size, skip;

	for (unsigned int ui=0; ui<N_format; ui++)
	{
		fmt_key = get_typed_int(&l_pos, line, type, size);
		get_type(&l_pos, line, type, size);

		if ( (type == 1) or (type == 7) )
			skip = sizeof(int8_t)*size*N_indv;
		else if (type == 2)
			skip = sizeof(int16_t)*size*N_indv;
		else if ( (type == 3) or (type == 5) )
			skip = sizeof(int32_t)*size*N_indv;
		else
		{
			LOG.printLOG("Error: Unknown type: " + header::int2str(type) + "\n");
			parsed_FORMAT = false;
			return;
		}
		add_FORMAT_entry( entry_header.FORMAT_map[fmt_key].ID, fmt_key, ui, l_pos, type, size);
		l_pos += skip;
	}

	GT_idx = -1;
	GQ_idx = -1;
	DP_idx = -1;
	FT_idx = -1;

	if (FORMAT_to_idx.find("GT") != FORMAT_to_idx.end())
		GT_idx = FORMAT_to_idx["GT"];
	if (FORMAT_to_idx.find("GQ") != FORMAT_to_idx.end())
		GQ_idx = FORMAT_to_idx["GQ"];
	if (FORMAT_to_idx.find("DP") != FORMAT_to_idx.end())
		DP_idx = FORMAT_to_idx["DP"];
	if (FORMAT_to_idx.find("FT") != FORMAT_to_idx.end())
		FT_idx = FORMAT_to_idx["FT"];
	parsed_FORMAT = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbp
addq $0x498, %rdi            # imm = 0x498
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xfd72
leaq 0x600(%rbp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x1ef88
movl 0x6c4(%rbp), %eax
addl $0x8, %eax
leaq 0x38(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x3c0(%rbp), %rax
movq %rax, 0x78(%rsp)
leaq 0xd0(%rbp), %rax
movq %rax, 0x70(%rsp)
movl %ebx, 0x40(%rsp)
cmpl 0x6bc(%rbp), %ebx
jae 0x206da
movq %rbx, 0x80(%rsp)
movq %rbp, %rdi
leaq 0x38(%rsp), %r15
movq %r15, %rsi
movq 0x78(%rsp), %rbx
movq %rbx, %rdx
leaq 0x3c(%rsp), %r14
movq %r14, %rcx
leaq 0x14(%rsp), %r12
movq %r12, %r8
callq 0x1b5a6
movq %rbp, %rdi
movl %eax, %r13d
movl %eax, 0x44(%rsp)
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1b4ec
movl 0x3c(%rsp), %esi
leal -0x1(%rsi), %eax
cmpl $0x6, %eax
ja 0x208b6
leaq 0xe569(%rip), %rcx      # 0x2ebc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%rbp), %r15d
imull 0x14(%rsp), %r15d
jmp 0x20689
movl 0x14(%rsp), %r15d
imull 0x8(%rbp), %r15d
shll $0x2, %r15d
jmp 0x20689
movl 0x14(%rsp), %r15d
imull 0x8(%rbp), %r15d
addl %r15d, %r15d
movl %r13d, 0x18(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x162fe
leaq 0x20(%rax), %rsi
leaq 0x14(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
leaq 0x44(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x3c(%rsp), %r9
callq 0x20996
addl %r15d, 0x38(%rsp)
movq 0x80(%rsp), %rbx
incl %ebx
jmp 0x205e5
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x630(%rbp)
leaq 0xe47b(%rip), %rsi      # 0x2eb68
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x19dea
movq %rax, %r14
leaq 0x608(%rbp), %r15
leaq 0x18(%rsp), %rdi
callq 0x5908
cmpq %r15, %r14
je 0x2075f
leaq 0xe43a(%rip), %rsi      # 0x2eb68
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1edbc
leaq 0x630(%rbp), %rcx
movl (%rax), %eax
movl %eax, (%rcx)
leaq 0x18(%rsp), %rdi
callq 0x5908
leaq 0xeb20(%rip), %rsi      # 0x2f286
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x19dea
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5908
cmpq %r15, %r14
je 0x207c9
leaq 0xeaeb(%rip), %rsi      # 0x2f286
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1edbc
movl (%rax), %eax
movl %eax, 0x634(%rbp)
leaq 0x18(%rsp), %rdi
callq 0x5908
leaq 0xea9d(%rip), %rsi      # 0x2f26d
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x19dea
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5908
cmpq %r15, %r14
je 0x20833
leaq 0xea68(%rip), %rsi      # 0x2f26d
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1edbc
movl (%rax), %eax
movl %eax, 0x638(%rbp)
leaq 0x18(%rsp), %rdi
callq 0x5908
leaq 0xe331(%rip), %rsi      # 0x2eb6b
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x19dea
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5908
cmpq %r15, %r14
je 0x2089d
leaq 0xe2fc(%rip), %rsi      # 0x2eb6b
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5160
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1edbc
movl (%rax), %eax
movl %eax, 0x63c(%rbp)
leaq 0x18(%rsp), %rdi
callq 0x5908
movb $0x1, 0x3dd(%rbp)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %r14
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x12c9c
leaq 0xe337(%rip), %rsi      # 0x2ec04
leaq 0x18(%rsp), %rdi
movq %r14, %rdx
callq 0x98d5
leaq 0xc82a(%rip), %rdx      # 0x2d10b
leaq 0x88(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x98b6
leaq 0x20bd6(%rip), %rdi     # 0x414d0
leaq 0x88(%rsp), %rsi
callq 0x2beca
leaq 0x88(%rsp), %rdi
callq 0x5908
leaq 0x18(%rsp), %rdi
callq 0x5908
leaq 0x48(%rsp), %rdi
callq 0x5908
movb $0x0, 0x3dd(%rbp)
jmp 0x208a4
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x5908
jmp 0x20949
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5908
jmp 0x20958
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x20983
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
jmp 0x2097b
jmp 0x2098a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5908
jmp 0x2098d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5800
nop