// File: 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:
subq $0x308, %rsp            # imm = 0x308
movq %rdi, 0x300(%rsp)
movq 0x300(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
addq $0x498, %rdi            # imm = 0x498
xorl %eax, %eax
movl %eax, %esi
callq 0x2a0f0
movq 0xf0(%rsp), %rdi
addq $0x600, %rdi            # imm = 0x600
callq 0x51bc0
movq 0xf0(%rsp), %rax
movl 0x6c4(%rax), %eax
addq $0x8, %rax
movl %eax, 0x2fc(%rsp)
movl $0x0, 0x2e8(%rsp)
movq 0xf0(%rsp), %rcx
movl 0x2e8(%rsp), %eax
cmpl 0x6bc(%rcx), %eax
jae 0x57221
movq 0xf0(%rsp), %rdi
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
leaq 0x2fc(%rsp), %rsi
leaq 0x2f4(%rsp), %rcx
leaq 0x2f0(%rsp), %r8
callq 0x48bf0
movq 0xf0(%rsp), %rdi
movl %eax, 0x2f8(%rsp)
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
leaq 0x2fc(%rsp), %rsi
leaq 0x2f4(%rsp), %rcx
leaq 0x2f0(%rsp), %r8
callq 0x489f0
cmpl $0x1, 0x2f4(%rsp)
je 0x56fdb
cmpl $0x7, 0x2f4(%rsp)
jne 0x57001
movq 0xf0(%rsp), %rcx
movl 0x2f0(%rsp), %eax
shlq $0x0, %rax
movl 0x8(%rcx), %ecx
imulq %rcx, %rax
movl %eax, 0x2ec(%rsp)
jmp 0x57188
cmpl $0x2, 0x2f4(%rsp)
jne 0x57030
movq 0xf0(%rsp), %rcx
movl 0x2f0(%rsp), %eax
shlq %rax
movl 0x8(%rcx), %ecx
imulq %rcx, %rax
movl %eax, 0x2ec(%rsp)
jmp 0x57186
cmpl $0x3, 0x2f4(%rsp)
je 0x57044
cmpl $0x5, 0x2f4(%rsp)
jne 0x5706a
movq 0xf0(%rsp), %rcx
movl 0x2f0(%rsp), %eax
shlq $0x2, %rax
movl 0x8(%rcx), %ecx
imulq %rcx, %rax
movl %eax, 0x2ec(%rsp)
jmp 0x57184
movl 0x2f4(%rsp), %esi
leaq 0x288(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
movq 0xe8(%rsp), %rdx
leaq 0x1ea62(%rip), %rsi     # 0x75afc
leaq 0x2a8(%rsp), %rdi
callq 0xf4f0
jmp 0x570a9
leaq 0x1d03b(%rip), %rdx     # 0x740eb
leaq 0x2c8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0xf4a0
jmp 0x570c7
leaq 0x3c532(%rip), %rdi     # 0x93600
leaq 0x2c8(%rsp), %rsi
callq 0x71280
jmp 0x570dd
leaq 0x2c8(%rsp), %rdi
callq 0x6b50
leaq 0x2a8(%rsp), %rdi
callq 0x6b50
leaq 0x288(%rsp), %rdi
callq 0x6b50
movq 0xf0(%rsp), %rax
movb $0x0, 0x3dd(%rax)
jmp 0x57a24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57172
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57165
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x6b50
leaq 0x2a8(%rsp), %rdi
callq 0x6b50
leaq 0x288(%rsp), %rdi
callq 0x6b50
jmp 0x57a2c
jmp 0x57186
jmp 0x57188
movq 0xf0(%rsp), %rdi
addq $0x10, %rdi
addq $0xc0, %rdi
movl 0x2f8(%rsp), %eax
movl %eax, 0x278(%rsp)
leaq 0x278(%rsp), %rsi
callq 0x39590
movq 0xf0(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x2f8(%rsp), %rdx
leaq 0x2e8(%rsp), %rcx
leaq 0x2fc(%rsp), %r8
leaq 0x2f4(%rsp), %r9
leaq 0x2f0(%rsp), %rax
movq %rax, (%rsp)
callq 0x57a40
movl 0x2ec(%rsp), %eax
addl 0x2fc(%rsp), %eax
movl %eax, 0x2fc(%rsp)
movl 0x2e8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2e8(%rsp)
jmp 0x56f47
movq 0xf0(%rsp), %rax
movl $0xffffffff, 0x630(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x634(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x638(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x63c(%rax) # imm = 0xFFFFFFFF
addq $0x600, %rax            # imm = 0x600
movq %rax, 0xd8(%rsp)
leaq 0x24f(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x69f0
movq 0xe0(%rsp), %rdx
leaq 0x1e835(%rip), %rsi     # 0x75ab8
leaq 0x250(%rsp), %rdi
callq 0x67c0
jmp 0x57292
movq 0xd8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x43430
movq %rax, 0xd0(%rsp)
jmp 0x572b1
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rax
movq %rax, 0x270(%rsp)
addq $0x600, %rdi            # imm = 0x600
callq 0x3b7e0
movq %rax, 0x240(%rsp)
leaq 0x270(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x43410
movb %al, 0xcf(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x6b50
leaq 0x24f(%rsp), %rdi
callq 0x65f0
movb 0xcf(%rsp), %al
testb $0x1, %al
jne 0x57323
jmp 0x57454
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0xb8(%rsp)
leaq 0x21f(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x69f0
movq 0xc0(%rsp), %rdx
leaq 0x1e75b(%rip), %rsi     # 0x75ab8
leaq 0x220(%rsp), %rdi
callq 0x67c0
jmp 0x5736c
movq 0xb8(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x51bd0
movq %rax, 0xb0(%rsp)
jmp 0x5738b
movq 0xf0(%rsp), %rax
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x630(%rax)
leaq 0x220(%rsp), %rdi
callq 0x6b50
leaq 0x21f(%rsp), %rdi
callq 0x65f0
jmp 0x57454
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x573f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x6b50
leaq 0x24f(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57442
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x6b50
leaq 0x21f(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0xa0(%rsp)
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x69f0
movq 0xa8(%rsp), %rdx
leaq 0x1ecc8(%rip), %rsi     # 0x76156
leaq 0x1f0(%rsp), %rdi
callq 0x67c0
jmp 0x5749d
movq 0xa0(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x43430
movq %rax, 0x98(%rsp)
jmp 0x574bc
movq 0xf0(%rsp), %rdi
movq 0x98(%rsp), %rax
movq %rax, 0x210(%rsp)
addq $0x600, %rdi            # imm = 0x600
callq 0x3b7e0
movq %rax, 0x1e0(%rsp)
leaq 0x210(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x43410
movb %al, 0x97(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x6b50
leaq 0x1ef(%rsp), %rdi
callq 0x65f0
movb 0x97(%rsp), %al
testb $0x1, %al
jne 0x5752e
jmp 0x57659
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x80(%rsp)
leaq 0x1bf(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x69f0
movq 0x88(%rsp), %rdx
leaq 0x1ebee(%rip), %rsi     # 0x76156
leaq 0x1c0(%rsp), %rdi
callq 0x67c0
jmp 0x57577
movq 0x80(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x51bd0
movq %rax, 0x78(%rsp)
jmp 0x57593
movq 0xf0(%rsp), %rax
movq 0x78(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x634(%rax)
leaq 0x1c0(%rsp), %rdi
callq 0x6b50
leaq 0x1bf(%rsp), %rdi
callq 0x65f0
jmp 0x57659
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x575fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x6b50
leaq 0x1ef(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57647
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x6b50
leaq 0x1bf(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x68(%rsp)
leaq 0x18f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x69f0
movq 0x70(%rsp), %rdx
leaq 0x1eab3(%rip), %rsi     # 0x7613d
leaq 0x190(%rsp), %rdi
callq 0x67c0
jmp 0x57699
movq 0x68(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x43430
movq %rax, 0x60(%rsp)
jmp 0x576b2
movq 0xf0(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x1b0(%rsp)
addq $0x600, %rdi            # imm = 0x600
callq 0x3b7e0
movq %rax, 0x180(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x43410
movb %al, 0x5f(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x6b50
leaq 0x18f(%rsp), %rdi
callq 0x65f0
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0x5771b
jmp 0x5783a
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x48(%rsp)
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x69f0
movq 0x50(%rsp), %rdx
leaq 0x1e9f1(%rip), %rsi     # 0x7613d
leaq 0x160(%rsp), %rdi
callq 0x67c0
jmp 0x5775b
movq 0x48(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x51bd0
movq %rax, 0x40(%rsp)
jmp 0x57774
movq 0xf0(%rsp), %rax
movq 0x40(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x638(%rax)
leaq 0x160(%rsp), %rdi
callq 0x6b50
leaq 0x15f(%rsp), %rdi
callq 0x65f0
jmp 0x5783a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x577df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x6b50
leaq 0x18f(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57828
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x6b50
leaq 0x15f(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x30(%rsp)
leaq 0x12f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x69f0
movq 0x38(%rsp), %rdx
leaq 0x1e250(%rip), %rsi     # 0x75abb
leaq 0x130(%rsp), %rdi
callq 0x67c0
jmp 0x5787a
movq 0x30(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x43430
movq %rax, 0x28(%rsp)
jmp 0x57893
movq 0xf0(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x150(%rsp)
addq $0x600, %rdi            # imm = 0x600
callq 0x3b7e0
movq %rax, 0x120(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x43410
movb %al, 0x27(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x6b50
leaq 0x12f(%rsp), %rdi
callq 0x65f0
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x578fc
jmp 0x57a15
movq 0xf0(%rsp), %rax
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x10(%rsp)
leaq 0xff(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x69f0
movq 0x18(%rsp), %rdx
leaq 0x1e18e(%rip), %rsi     # 0x75abb
leaq 0x100(%rsp), %rdi
callq 0x67c0
jmp 0x5793c
movq 0x10(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x51bd0
movq %rax, 0x8(%rsp)
jmp 0x57955
movq 0xf0(%rsp), %rax
movq 0x8(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x63c(%rax)
leaq 0x100(%rsp), %rdi
callq 0x6b50
leaq 0xff(%rsp), %rdi
callq 0x65f0
jmp 0x57a15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x579c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x6b50
leaq 0x12f(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
jmp 0x57a06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x6b50
leaq 0xff(%rsp), %rdi
callq 0x65f0
jmp 0x57a2c
movq 0xf0(%rsp), %rax
movb $0x1, 0x3dd(%rax)
addq $0x308, %rsp            # imm = 0x308
retq
movq 0x280(%rsp), %rdi
callq 0x69e0
nopl (%rax)