// File: /workspace/github_cpp_makefile_star2_O2/auton1[P]viterbi/header.cpp
// Function: header::add_INFO_descriptor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
int header::add_INFO_descriptor(const string &in, int index)
{
	size_t found_end=in.find_last_of(">");
	string details = in.substr(0, found_end);

	Field_description I;
	I.Field = "INFO";
	vector<string> tokens;
	tokenize(details, ',', tokens);

	if (tokens.size() < 4)
		LOG.error("Expected at least 4 parts in INFO definition: " + in);

	vector<string> entry;
	for (unsigned int ui=0; ui<tokens.size(); ui++)
	{
		tokenize(tokens[ui], '=', entry);

		if (entry[0] == "ID") I.ID = entry[1];
		else if (entry[0] == "Number")
		{
			if ((entry[1] == "A") || (entry[1] == "G"))
				I.N_entries = -1;
			else
				I.N_entries =  str2int(entry[1]);
			I.N_entries_str = entry[1];
		}
		else if (entry[0] == "Type")
		{
			if (entry[1] == "Integer") { I.Type_str = "Integer"; I.Type = Integer; }
			else if ((entry[1] == "Float") || (entry[1] == "Numeric")) {I.Type_str = "Float"; I.Type = Float;}
			else if (entry[1] == "Character") {I.Type_str = "Character"; I.Type = Character;}
			else if (entry[1] == "String") {I.Type_str = "String"; I.Type = String;}
			else if (entry[1] == "Flag")
			{
				I.Type = Flag;
				I.Type_str = "Flag";
				if (I.N_entries != 0) LOG.error("Flag Type must have 0 entries: " + in);
			}
			else LOG.error("Unknown Type in INFO meta-information: " + in);
		}
		else if (entry[0] == "Description") I.Description = entry[1];
		else if (entry[0] == "Source") I.Source = entry[1];
		else if (entry[0] == "Version") I.Version = entry[1];
		else if (entry[0] == "IDX")
		{
			has_idx = true;
			I.idx = str2int(entry[1]);
		}
		else
		{
			if (I.Other != "")
				I.Other += ",";
			I.Other += tokens[ui];
		}
	}

	if (I.ID == "") LOG.error("ID required in INFO field description: " + in);
	if (I.N_entries_str == "") LOG.error("Number required in INFO field description: " + in);
	if (I.Type_str == "") LOG.error("Type required in INFO field description: " + in);
	if (I.Description == "") LOG.error("Description required in INFO field description: " + in);
	if ((I.idx == -1) && (has_idx)) LOG.error("Missing index in INFO field description: " + in);
	parsed_lines.push_back(I);

	if (I.idx != -1)
	{
		INFO_map[I.idx] = I;
		INFO_reverse_map[I.ID] = I.idx;
		return 0;
	}
	else
	{
		if ( FORMAT_reverse_map.find( I.ID ) != FORMAT_reverse_map.end() )
		{
			INFO_map[ FORMAT_reverse_map[ I.ID ] ] = I;
			INFO_reverse_map[I.ID] = FORMAT_reverse_map[I.ID];
			return 0;
		}
		else if ( FILTER_reverse_map.find( I.ID ) != FILTER_reverse_map.end() )
		{
			INFO_map[ FILTER_reverse_map[ I.ID ] ] = I;
			INFO_reverse_map[I.ID] = FILTER_reverse_map[ I.ID ];
			return 0;
		}
		else if ( INFO_reverse_map.find( I.ID ) != INFO_reverse_map.end() )
			return 0;
		else
		{
			INFO_map[index] = I;
			INFO_reverse_map[I.ID] = index;
			return 1;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x1c(%rsp)
leaq 0x1d276(%rip), %rsi     # 0x2daf8
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x5450
leaq 0x258(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x54c0
leaq 0x48(%rsp), %rdi
callq 0x12f22
leaq 0x1eab1(%rip), %rsi     # 0x2f364
leaq 0x48(%rsp), %rdi
callq 0x58b0
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x258(%rsp), %rdi
pushq $0x2c
popq %rsi
callq 0x126cc
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq $0x7f, %rax
ja 0x10928
leaq 0x1d206(%rip), %rsi     # 0x2dafa
leaq 0x238(%rsp), %rdi
movq %r14, %rdx
callq 0x967d
leaq 0x30bc5(%rip), %rdi     # 0x414d0
leaq 0x238(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x238(%rsp), %rdi
callq 0x5908
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %rsp, %r13
andq $0x0, 0x10(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
xorl %r12d, %r12d
pushq $0x3d
popq %rbp
leaq 0x1d06b(%rip), %r15     # 0x2d9ba
leaq 0x1d1d3(%rip), %rbx     # 0x2db29
movl %r12d, %r12d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x10ccf
movq %r12, %r14
shlq $0x5, %r14
addq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x126cc
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x96f3
movq (%rsp), %rsi
testb %al, %al
je 0x109a2
leaq 0x68(%rsp), %rdi
jmp 0x10a12
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x96f3
movq (%rsp), %rdi
testb %al, %al
je 0x10a23
addq $0x20, %rdi
leaq 0x1d170(%rip), %rsi     # 0x2db30
callq 0x96f3
movl %eax, %ecx
pushq $-0x1
popq %r14
movl %r14d, %eax
testb %cl, %cl
jne 0x109ff
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1d151(%rip), %rsi     # 0x2db32
callq 0x96f3
movl %eax, %ecx
movl %r14d, %eax
testb %cl, %cl
jne 0x109ff
movq (%rsp), %rdi
addq $0x20, %rdi
movl %r14d, %esi
callq 0x12782
movl %eax, 0x8c(%rsp)
movq (%rsp), %rsi
leaq 0x90(%rsp), %rdi
addq $0x20, %rsi
callq 0x5210
incl %r12d
jmp 0x10956
leaq 0x1d10a(%rip), %rsi     # 0x2db34
callq 0x96f3
movq (%rsp), %rdi
testb %al, %al
je 0x10a68
addq $0x20, %rdi
leaq 0x1d0f7(%rip), %r14     # 0x2db39
movq %r14, %rsi
callq 0x96f3
testb %al, %al
je 0x10a86
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x58b0
andl $0x0, 0xd0(%rsp)
jmp 0x10a1b
leaq 0x1d13e(%rip), %rsi     # 0x2dbad
callq 0x96f3
movq (%rsp), %rsi
testb %al, %al
je 0x10ada
leaq 0xd8(%rsp), %rdi
jmp 0x10a12
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1d0ac(%rip), %rsi     # 0x2db41
callq 0x96f3
testb %al, %al
jne 0x10ab6
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1d09a(%rip), %rsi     # 0x2db47
callq 0x96f3
testb %al, %al
je 0x10b22
leaq 0xb0(%rsp), %rdi
leaq 0x1d07c(%rip), %rsi     # 0x2db41
callq 0x58b0
movl $0x1, 0xd0(%rsp)
jmp 0x10a1b
movq %rsi, %rdi
leaq 0x1d0d5(%rip), %rsi     # 0x2dbb9
callq 0x96f3
movq (%rsp), %rsi
testb %al, %al
je 0x10afe
leaq 0x138(%rsp), %rdi
jmp 0x10a12
movq %rsi, %rdi
leaq 0x1d0b8(%rip), %rsi     # 0x2dbc0
callq 0x96f3
movq (%rsp), %rsi
testb %al, %al
je 0x10b5d
leaq 0x158(%rsp), %rdi
jmp 0x10a12
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1d01e(%rip), %r14     # 0x2db4f
movq %r14, %rsi
callq 0x96f3
testb %al, %al
je 0x10b95
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x58b0
movl $0x2, 0xd0(%rsp)
jmp 0x10a1b
movq %rsi, %rdi
leaq 0x1d061(%rip), %rsi     # 0x2dbc8
callq 0x96f3
testb %al, %al
je 0x10bd0
movq 0x28(%rsp), %rax
movb $0x1, 0x8(%rax)
movq (%rsp), %rdi
addq $0x20, %rdi
pushq $-0x1
popq %rsi
callq 0x12782
movl %eax, 0x88(%rsp)
jmp 0x10a1b
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1cfb5(%rip), %r14     # 0x2db59
movq %r14, %rsi
callq 0x96f3
testb %al, %al
je 0x10c16
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x58b0
movl $0x3, 0xd0(%rsp)
jmp 0x10a1b
leaq 0x178(%rsp), %rdi
leaq 0x1e258(%rip), %rsi     # 0x2ee37
callq 0x12f17
testb %al, %al
je 0x10bfc
leaq 0x178(%rsp), %rdi
leaq 0x1cfd5(%rip), %rsi     # 0x2dbcc
callq 0x58a0
addq 0x30(%rsp), %r14
leaq 0x178(%rsp), %rdi
movq %r14, %rsi
callq 0x58d0
jmp 0x10a1b
movq (%rsp), %rdi
addq $0x20, %rdi
leaq 0x1cf3b(%rip), %r14     # 0x2db60
movq %r14, %rsi
callq 0x96f3
testb %al, %al
je 0x10c8f
movl $0x4, 0xd0(%rsp)
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x58b0
cmpl $0x0, 0x8c(%rsp)
je 0x10a1b
leaq 0x298(%rsp), %rdi
leaq 0x1cefc(%rip), %rsi     # 0x2db65
movq 0x20(%rsp), %rdx
callq 0x967d
leaq 0x30856(%rip), %rdi     # 0x414d0
leaq 0x298(%rsp), %r14
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
jmp 0x10cc2
leaq 0x278(%rsp), %rdi
leaq 0x1cee7(%rip), %rsi     # 0x2db85
movq 0x20(%rsp), %rdx
callq 0x967d
leaq 0x30821(%rip), %rdi     # 0x414d0
leaq 0x278(%rsp), %r14
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
movq %r14, %rdi
callq 0x5908
jmp 0x10a1b
leaq 0x1e161(%rip), %rsi     # 0x2ee37
leaq 0x68(%rsp), %rdi
callq 0x96f3
testb %al, %al
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %rbx
je 0x10d29
leaq 0x1ced9(%rip), %rsi     # 0x2dbce
leaq 0x218(%rsp), %rdi
movq %rbx, %rdx
callq 0x967d
leaq 0x307c4(%rip), %rdi     # 0x414d0
leaq 0x218(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x218(%rsp), %rdi
callq 0x5908
leaq 0x1e107(%rip), %rsi     # 0x2ee37
leaq 0x90(%rsp), %rdi
callq 0x96f3
testb %al, %al
je 0x10d7c
leaq 0x1ceae(%rip), %rsi     # 0x2dbf6
leaq 0x1f8(%rsp), %rdi
movq %rbx, %rdx
callq 0x967d
leaq 0x30771(%rip), %rdi     # 0x414d0
leaq 0x1f8(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x1f8(%rsp), %rdi
callq 0x5908
leaq 0x1e0b4(%rip), %rsi     # 0x2ee37
leaq 0xb0(%rsp), %rdi
callq 0x96f3
testb %al, %al
je 0x10dcf
leaq 0x1ce87(%rip), %rsi     # 0x2dc22
leaq 0x1d8(%rsp), %rdi
movq %rbx, %rdx
callq 0x967d
leaq 0x3071e(%rip), %rdi     # 0x414d0
leaq 0x1d8(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x1d8(%rsp), %rdi
callq 0x5908
leaq 0x1e061(%rip), %rsi     # 0x2ee37
leaq 0xd8(%rsp), %rdi
callq 0x96f3
testb %al, %al
je 0x10e22
leaq 0x1ce5e(%rip), %rsi     # 0x2dc4c
leaq 0x1b8(%rsp), %rdi
movq %rbx, %rdx
callq 0x967d
leaq 0x306cb(%rip), %rdi     # 0x414d0
leaq 0x1b8(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x1b8(%rsp), %rdi
callq 0x5908
cmpl $-0x1, 0x88(%rsp)
jne 0x10e6e
cmpb $0x1, 0x8(%r14)
jne 0x10e6e
leaq 0x1ce43(%rip), %rsi     # 0x2dc7d
leaq 0x198(%rsp), %rdi
movq %rbx, %rdx
callq 0x967d
leaq 0x3067f(%rip), %rdi     # 0x414d0
leaq 0x198(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2bf18
leaq 0x198(%rsp), %rdi
callq 0x5908
leaq 0x40(%r14), %rdi
leaq 0x48(%rsp), %rsi
callq 0x130ee
cmpl $-0x1, 0x88(%rsp)
je 0x10ec4
leaq 0x60(%r14), %rdi
leaq 0x88(%rsp), %rsi
callq 0x1311e
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0xd3f2
movl 0x88(%rsp), %ebx
addq $0x180, %r14            # imm = 0x180
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
jmp 0x10f9c
leaq 0x1b0(%r14), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x13a1a
leaq 0x1b8(%r14), %rcx
cmpq %rcx, %rax
je 0x10f2f
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
leaq 0x60(%r14), %rdi
movq %rax, %rsi
callq 0x1311e
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0xd3f2
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
movl (%rax), %ebx
addq $0x180, %r14            # imm = 0x180
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
jmp 0x10f9c
leaq 0x150(%r14), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x13a1a
leaq 0x158(%r14), %rcx
cmpq %rcx, %rax
je 0x10fdd
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
leaq 0x60(%r14), %rdi
movq %rax, %rsi
callq 0x1311e
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0xd3f2
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
movl (%rax), %ebx
addq $0x180, %r14            # imm = 0x180
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
movl %ebx, (%rax)
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x9f1c
leaq 0x30(%rsp), %rdi
callq 0x9f1c
leaq 0x48(%rsp), %rdi
callq 0xd306
leaq 0x258(%rsp), %rdi
callq 0x5908
movl %ebp, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x180(%r14), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x13a1a
leaq 0x188(%r14), %rcx
xorl %ebp, %ebp
cmpq %rcx, %rax
jne 0x10fa0
addq $0x60, %r14
leaq 0x1c(%rsp), %rsi
movq %r14, %rdi
callq 0x1311e
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0xd3f2
movl 0x1c(%rsp), %ebp
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0x1316c
movl %ebp, (%rax)
pushq $0x1
popq %rbp
jmp 0x10fa0
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
jmp 0x11097
jmp 0x110c1
movq %rax, %rbx
leaq 0x278(%rsp), %rdi
jmp 0x11097
jmp 0x110c1
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
jmp 0x11097
jmp 0x110c1
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
jmp 0x11097
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
jmp 0x11097
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
jmp 0x11097
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x5908
jmp 0x110c4
movq %rax, %rbx
leaq 0x238(%rsp), %rdi
callq 0x5908
jmp 0x110cc
movq %rax, %rbx
jmp 0x110d6
movq %rax, %rbx
jmp 0x110e0
movq %rax, %rbx
jmp 0x110cc
jmp 0x110c1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9f1c
leaq 0x30(%rsp), %rdi
callq 0x9f1c
leaq 0x48(%rsp), %rdi
callq 0xd306
leaq 0x258(%rsp), %rdi
callq 0x5908
movq %rbx, %rdi
callq 0x5800
nop