// File: auton1[P]viterbi/bcf_entry_setters.cpp
// Function: bcf_entry::set_INFO()
void bcf_entry::set_INFO()
{
	int key;
	unsigned int size, type, i = INFO_pos;
	string data_type;
	INFO.resize(N_info);
	bool miss = true;

	for (unsigned int ui=0; ui<N_info; ui++)
	{
		key = get_typed_int(&i, line, type, size);
		get_type(&i, line, type, size);

		pair<string, string> INFO_entry(entry_header.INFO_map[key].ID, ".");
		data_type = entry_header.INFO_map[key].Type_str;
		ostringstream ss(ostringstream::out);

		for (unsigned int uj=0; uj<size; uj++)
		{
			if (uj !=0 && type != 7)
				ss << ",";

			if ( check_missing(i, type, line) )
				ss << ".";

			else if(type==1)
			{
				int8_t tmp;
				memcpy(&tmp, &line[i], sizeof(tmp));
				i += sizeof(tmp);
				ss << (int)tmp;
				miss = false;
			}
			else if(type==2)
			{
				int16_t tmp;
				memcpy(&tmp, &line[i], sizeof(tmp));
				i += sizeof(tmp);
				ss << (int)tmp;
				miss = false;
			}
			else if(type==3)
			{
				int32_t tmp;
				memcpy(&tmp, &line[i], sizeof(tmp));
				i += sizeof(tmp);
				ss << (int)tmp;
				miss = false;
			}
			else if(type==5)
			{
				float tmp;
				memcpy(&tmp, &line[i], sizeof(tmp));
				i += sizeof(tmp);
				ss << tmp;
				miss = false;
			}
			else if(type==7)
			{
				char tmp;
				memcpy(&tmp, &line[i], sizeof(tmp));
				i += sizeof(tmp);
				ss << tmp;
				miss = false;
			}
			else
			{
				LOG.printLOG("Error: Unknown type: " + header::int2str(type) + "\n");
				parsed_INFO = false;
				return;
			}
		}

		string value = ss.str();
		if (miss)
			INFO_entry.second = ".";
		else if (data_type == "Flag")
			INFO_entry.second = "1";
		else if (value != "")
			INFO_entry.second = ss.str();
		else
			INFO_entry.second = ".";
		INFO[ui] = INFO_entry;
	}
	parsed_INFO = true;
}

// Assembly:
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0x2f0(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x6e8(%rax), %eax
movl %eax, 0x2e0(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x67e0
movq 0x28(%rsp), %rax
movq %rax, %rdi
addq $0x480, %rdi            # imm = 0x480
movl 0x6b8(%rax), %eax
movl %eax, %esi
callq 0x52070
jmp 0x567e4
movb $0x1, 0x2b3(%rsp)
movl $0x0, 0x2ac(%rsp)
movq 0x28(%rsp), %rcx
movl 0x2ac(%rsp), %eax
cmpl 0x6b8(%rcx), %eax
jae 0x56e9c
movq 0x28(%rsp), %rdi
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
leaq 0x2e0(%rsp), %rsi
leaq 0x2e4(%rsp), %rcx
leaq 0x2e8(%rsp), %r8
callq 0x48bf0
movl %eax, 0x24(%rsp)
jmp 0x56841
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x2ec(%rsp)
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
leaq 0x2e0(%rsp), %rsi
leaq 0x2e4(%rsp), %rcx
leaq 0x2e8(%rsp), %r8
callq 0x489f0
jmp 0x5687a
movq 0x28(%rsp), %rdi
addq $0x70, %rdi
leaq 0x2ec(%rsp), %rsi
callq 0x30ef0
movq %rax, 0x18(%rsp)
jmp 0x56897
movq 0x18(%rsp), %rsi
addq $0x20, %rsi
leaq 0x1e837(%rip), %rdx     # 0x750de
leaq 0x268(%rsp), %rdi
callq 0x52110
jmp 0x568b6
movq 0x28(%rsp), %rdi
addq $0x70, %rdi
leaq 0x2ec(%rsp), %rsi
callq 0x30ef0
movq %rax, 0x10(%rsp)
jmp 0x568d3
movq 0x10(%rsp), %rsi
addq $0x68, %rsi
leaq 0x2c0(%rsp), %rdi
callq 0x6060
jmp 0x568eb
leaq 0xf0(%rsp), %rdi
movl $0x10, %esi
callq 0x6460
jmp 0x568ff
movl $0x0, 0xec(%rsp)
movl 0xec(%rsp), %eax
cmpl 0x2e8(%rsp), %eax
jae 0x56cfb
cmpl $0x0, 0xec(%rsp)
je 0x56995
cmpl $0x7, 0x2e4(%rsp)
je 0x56995
leaq 0x1e2a1(%rip), %rsi     # 0x74bda
leaq 0xf0(%rsp), %rdi
callq 0x6540
jmp 0x56948
jmp 0x56995
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0x56ec5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0x56e8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0x56e80
movq 0x28(%rsp), %rdi
movl 0x2e0(%rsp), %esi
movl 0x2e4(%rsp), %edx
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
callq 0x49240
movb %al, 0xf(%rsp)
jmp 0x569bd
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x569c7
jmp 0x569e2
leaq 0x1e710(%rip), %rsi     # 0x750de
leaq 0xf0(%rsp), %rdi
callq 0x6540
jmp 0x569dd
jmp 0x56ce3
cmpl $0x1, 0x2e4(%rsp)
jne 0x56a43
movq 0x28(%rsp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x2e0(%rsp), %eax
movl %eax, %esi
callq 0x209b0
movb (%rax), %al
movb %al, 0xeb(%rsp)
movl 0x2e0(%rsp), %eax
incl %eax
movl %eax, 0x2e0(%rsp)
movsbl 0xeb(%rsp), %esi
leaq 0xf0(%rsp), %rdi
callq 0x69c0
jmp 0x56a36
movb $0x0, 0x2b3(%rsp)
jmp 0x56ce1
cmpl $0x2, 0x2e4(%rsp)
jne 0x56aa7
movq 0x28(%rsp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x2e0(%rsp), %eax
movl %eax, %esi
callq 0x209b0
movw (%rax), %ax
movw %ax, 0xe8(%rsp)
movl 0x2e0(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x2e0(%rsp)
movswl 0xe8(%rsp), %esi
leaq 0xf0(%rsp), %rdi
callq 0x69c0
jmp 0x56a9a
movb $0x0, 0x2b3(%rsp)
jmp 0x56cdf
cmpl $0x3, 0x2e4(%rsp)
jne 0x56b08
movq 0x28(%rsp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x2e0(%rsp), %eax
movl %eax, %esi
callq 0x209b0
movl (%rax), %eax
movl %eax, 0xe4(%rsp)
movl 0x2e0(%rsp), %eax
addl $0x4, %eax
movl %eax, 0x2e0(%rsp)
movl 0xe4(%rsp), %esi
leaq 0xf0(%rsp), %rdi
callq 0x69c0
jmp 0x56afb
movb $0x0, 0x2b3(%rsp)
jmp 0x56cdd
cmpl $0x5, 0x2e4(%rsp)
jne 0x56b6b
movq 0x28(%rsp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x2e0(%rsp), %eax
movl %eax, %esi
callq 0x209b0
movl (%rax), %eax
movl %eax, 0xe0(%rsp)
movl 0x2e0(%rsp), %eax
addl $0x4, %eax
movl %eax, 0x2e0(%rsp)
movss 0xe0(%rsp), %xmm0
leaq 0xf0(%rsp), %rdi
callq 0x63b0
jmp 0x56b5e
movb $0x0, 0x2b3(%rsp)
jmp 0x56cdb
cmpl $0x7, 0x2e4(%rsp)
jne 0x56bcc
movq 0x28(%rsp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x2e0(%rsp), %eax
movl %eax, %esi
callq 0x209b0
movb (%rax), %al
movb %al, 0xdf(%rsp)
movl 0x2e0(%rsp), %eax
incl %eax
movl %eax, 0x2e0(%rsp)
movsbl 0xdf(%rsp), %esi
leaq 0xf0(%rsp), %rdi
callq 0x6670
jmp 0x56bbf
movb $0x0, 0x2b3(%rsp)
jmp 0x56cd9
movl 0x2e4(%rsp), %esi
leaq 0x78(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x30500
jmp 0x56be4
leaq 0x1ef11(%rip), %rsi     # 0x75afc
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0xf4f0
jmp 0x56bff
leaq 0x1d4e5(%rip), %rdx     # 0x740eb
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xf4a0
jmp 0x56c1d
leaq 0x3c9dc(%rip), %rdi     # 0x93600
leaq 0xb8(%rsp), %rsi
callq 0x71280
jmp 0x56c33
leaq 0xb8(%rsp), %rdi
callq 0x6b50
leaq 0x98(%rsp), %rdi
callq 0x6b50
leaq 0x78(%rsp), %rdi
callq 0x6b50
movq 0x28(%rsp), %rax
movb $0x0, 0x3dc(%rax)
movl $0x1, 0x74(%rsp)
jmp 0x56e44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0x56cca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0x56cbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x6b50
leaq 0x98(%rsp), %rdi
callq 0x6b50
leaq 0x78(%rsp), %rdi
callq 0x6b50
jmp 0x56e80
jmp 0x56cdb
jmp 0x56cdd
jmp 0x56cdf
jmp 0x56ce1
jmp 0x56ce3
jmp 0x56ce5
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0x5690a
leaq 0x50(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6570
jmp 0x56d0f
testb $0x1, 0x2b3(%rsp)
je 0x56d57
leaq 0x288(%rsp), %rdi
leaq 0x1e3b6(%rip), %rsi     # 0x750de
callq 0x67b0
jmp 0x56d2f
jmp 0x56e06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6b50
jmp 0x56e80
leaq 0x1de10(%rip), %rsi     # 0x74b6e
leaq 0x2c0(%rsp), %rdi
callq 0xea20
movb %al, 0xe(%rsp)
jmp 0x56d71
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x56d7b
jmp 0x56d93
leaq 0x288(%rsp), %rdi
leaq 0x1d2c9(%rip), %rsi     # 0x74053
callq 0x67b0
jmp 0x56d91
jmp 0x56e04
leaq 0x1ef8f(%rip), %rsi     # 0x75d29
leaq 0x50(%rsp), %rdi
callq 0x30930
movb %al, 0xd(%rsp)
jmp 0x56daa
movb 0xd(%rsp), %al
testb $0x1, %al
jne 0x56db4
jmp 0x56dea
leaq 0x30(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6570
jmp 0x56dc8
leaq 0x268(%rsp), %rdi
addq $0x20, %rdi
leaq 0x30(%rsp), %rsi
callq 0x66c0
leaq 0x30(%rsp), %rdi
callq 0x6b50
jmp 0x56e02
leaq 0x288(%rsp), %rdi
leaq 0x1e2e5(%rip), %rsi     # 0x750de
callq 0x67b0
jmp 0x56e00
jmp 0x56e02
jmp 0x56e04
jmp 0x56e06
movq 0x28(%rsp), %rdi
addq $0x480, %rdi            # imm = 0x480
movl 0x2ac(%rsp), %eax
movl %eax, %esi
callq 0x39a40
movq %rax, %rdi
leaq 0x268(%rsp), %rsi
callq 0x59260
jmp 0x56e32
leaq 0x50(%rsp), %rdi
callq 0x6b50
movl $0x0, 0x74(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x6b30
leaq 0x268(%rsp), %rdi
callq 0x3a810
movl 0x74(%rsp), %eax
testl %eax, %eax
jne 0x56eb0
jmp 0x56e68
jmp 0x56e6a
movl 0x2ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2ac(%rsp)
jmp 0x567f7
leaq 0xf0(%rsp), %rdi
callq 0x6b30
leaq 0x268(%rsp), %rdi
callq 0x3a810
jmp 0x56ec5
movq 0x28(%rsp), %rax
movb $0x1, 0x3dc(%rax)
movl $0x0, 0x74(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x6b50
addq $0x2f8, %rsp            # imm = 0x2F8
retq
leaq 0x2c0(%rsp), %rdi
callq 0x6b50
movq 0x2b8(%rsp), %rdi
callq 0x69e0
nop