// File: /workspace/github_cpp_makefile_star2_O1/auton1[P]viterbi/header.cpp
// Function: header::add_FILTER_descriptor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
int header::add_FILTER_descriptor(const string &in, int index)
{
	size_t found_end=in.find_last_of(">");
	string details = in.substr(0, found_end);
	vector<string> tokens;
	tokenize(details, ',', tokens);
	if (tokens.size() < 2)
		LOG.error("Expected at least 2 parts in FILTER definition: " + in);

	string Description;
	Field_description I;
	I.Field = "FILTER";
	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] == "Description")
		{
			I.Description = 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 FILTER field description: " + in);
	if (I.Description == "") LOG.error("Description required in FILTER field description: " + in);
	if ((I.idx == -1) && (has_idx)) LOG.error("Missing index in FILTER field description: " + in);
	if (I.ID != "PASS") parsed_lines.push_back(I);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r15
movq %rdi, %r14
movl %edx, 0xc(%rsp)
leaq 0x251aa(%rip), %rsi     # 0x39bd6
movl $0x1, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0x5890
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x5480
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rbx, %rdi
movl $0x2c, %esi
callq 0x16a7e
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cmpq $0x20, %rax
ja 0x14ace
leaq 0x25471(%rip), %rsi     # 0x39f00
leaq 0xd8(%rsp), %rdi
movq %r15, %rdx
callq 0xb7dd
leaq 0x35a02(%rip), %rdi     # 0x4a4a8
leaq 0xd8(%rsp), %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14ace
callq 0x5410
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x118(%rsp), %rdi
callq 0x17532
movq %r15, 0x50(%rsp)
movq %r14, 0x48(%rsp)
leaq 0x118(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x2500b(%rip), %rcx     # 0x39b17
movl $0x6, %r8d
xorl %esi, %esi
callq 0x5690
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %rdi
cmpq %rdi, 0x18(%rsp)
je 0x14c4a
leaq 0x248(%rsp), %r14
movl $0x1, %r12d
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
leaq 0x24f24(%rip), %r13     # 0x39a7a
leaq 0x2512e(%rip), %rbp     # 0x39c8b
shlq $0x5, %rbx
addq %rbx, %rdi
movl $0x3d, %esi
movq %r15, %rdx
callq 0x16a7e
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x50e0
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0x14be8
movq %rsi, %rdi
movq %rbp, %rsi
callq 0x50e0
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0x14bf2
movq %rsi, %rdi
leaq 0x25101(%rip), %rsi     # 0x39ca6
callq 0x50e0
testl %eax, %eax
je 0x14c25
movq %r14, %rdi
leaq 0x26347(%rip), %rsi     # 0x3aeff
callq 0x50e0
testl %eax, %eax
je 0x14bd0
movq %r14, %rdi
leaq 0x250df(%rip), %rsi     # 0x39caa
callq 0x5870
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
movq %r14, %rdi
callq 0x50f0
jmp 0x14c03
leaq 0x138(%rsp), %rdi
jmp 0x14bfa
leaq 0x1a8(%rsp), %rdi
addq $0x20, %rsi
callq 0x51f0
movl %r12d, %ebx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
incl %r12d
cmpq %rbx, %rax
ja 0x14b5d
jmp 0x14c4a
movq 0x48(%rsp), %rax
movb $0x1, 0x8(%rax)
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x16b6e
movl %eax, 0x158(%rsp)
jmp 0x14c03
leaq 0x138(%rsp), %r14
leaq 0x262a6(%rip), %rsi     # 0x3aeff
movq %r14, %rdi
callq 0x50e0
testl %eax, %eax
movq 0x48(%rsp), %rbp
movq 0x50(%rsp), %rbx
jne 0x14cb5
leaq 0x252bb(%rip), %rsi     # 0x39f31
leaq 0xb8(%rsp), %rdi
movq %rbx, %rdx
callq 0xb7dd
leaq 0x3581b(%rip), %rdi     # 0x4a4a8
leaq 0xb8(%rsp), %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14cb5
callq 0x5410
leaq 0x1a8(%rsp), %r15
leaq 0x2623b(%rip), %rsi     # 0x3aeff
movq %r15, %rdi
callq 0x50e0
testl %eax, %eax
jne 0x14d16
leaq 0x25284(%rip), %rsi     # 0x39f5b
leaq 0x98(%rsp), %rdi
movq %rbx, %rdx
callq 0xb7dd
leaq 0x357ba(%rip), %rdi     # 0x4a4a8
leaq 0x98(%rsp), %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14d16
callq 0x5410
cmpl $-0x1, 0x158(%rsp)
jne 0x14d66
cmpb $0x1, 0x8(%rbp)
jne 0x14d66
leaq 0x25261(%rip), %rsi     # 0x39f8e
leaq 0x78(%rsp), %rdi
movq %rbx, %rdx
callq 0xb7dd
leaq 0x35767(%rip), %rdi     # 0x4a4a8
leaq 0x78(%rsp), %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14d66
callq 0x5410
leaq 0x2484c(%rip), %rsi     # 0x395b9
movq %r14, %rdi
callq 0x50e0
testl %eax, %eax
je 0x14d8a
leaq 0x40(%rbp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x177c8
cmpl $-0x1, 0x158(%rsp)
je 0x14e8c
leaq 0x158(%rsp), %rsi
leaq 0x90(%rbp), %rdi
callq 0x177f8
movq %rax, %rbx
leaq 0x118(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x51f0
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x51f0
leaq 0x160(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
callq 0x51f0
leaq 0x68(%rbx), %rdi
leaq 0x180(%rsp), %rsi
callq 0x51f0
movl 0x1a0(%rsp), %eax
movl %eax, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x51f0
movl $0xb0, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x51f0
movl $0xd0, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x51f0
movl $0xf0, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x51f0
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x51f0
movl $0x130, %eax            # imm = 0x130
addq %rax, %rbx
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x51f0
movl 0x158(%rsp), %ebx
addq $0x150, %rbp            # imm = 0x150
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1785c
jmp 0x150cb
leaq 0x180(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1818e
leaq 0x188(%rbp), %rcx
cmpq %rcx, %rax
je 0x14fae
movq %r12, %rdi
movq %r14, %rsi
callq 0x1785c
leaq 0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x177f8
movq %rax, %rbx
leaq 0x118(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x51f0
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x51f0
leaq 0x160(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
callq 0x51f0
leaq 0x68(%rbx), %rdi
leaq 0x180(%rsp), %rsi
callq 0x51f0
movl 0x1a0(%rsp), %eax
movl %eax, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x51f0
movl $0xb0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xd0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xf0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x130, %eax            # imm = 0x130
addq %rax, %rbx
addq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x51f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x1785c
movl (%rax), %ebx
addq $0x150, %rbp            # imm = 0x150
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1785c
jmp 0x150cb
leaq 0x1b0(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1818e
leaq 0x1b8(%rbp), %rcx
cmpq %rcx, %rax
je 0x1512e
movq %r12, %rdi
movq %r14, %rsi
callq 0x1785c
leaq 0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x177f8
movq %rax, %rbx
leaq 0x118(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x51f0
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x51f0
leaq 0x160(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
callq 0x51f0
leaq 0x68(%rbx), %rdi
leaq 0x180(%rsp), %rsi
callq 0x51f0
movl 0x1a0(%rsp), %eax
movl %eax, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x51f0
movl $0xb0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xd0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xf0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x130, %eax            # imm = 0x130
addq %rax, %rbx
addq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x51f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x1785c
movl (%rax), %ebx
addq $0x150, %rbp            # imm = 0x150
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1785c
movl %ebx, (%rax)
xorl %ebx, %ebx
leaq 0x30(%rsp), %rdi
callq 0xc4f0
leaq 0x118(%rsp), %rdi
callq 0xfb36
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x150fa
callq 0x5410
leaq 0x10(%rsp), %rdi
callq 0xc4f0
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1511a
callq 0x5410
movl %ebx, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x150(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1818e
leaq 0x158(%rbp), %rcx
xorl %ebx, %ebx
cmpq %rcx, %rax
jne 0x150cf
addq $0x90, %rbp
leaq 0xc(%rsp), %rsi
movq %rbp, %rdi
callq 0x177f8
movq %rax, %rbx
leaq 0x118(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x51f0
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x51f0
leaq 0x160(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
callq 0x51f0
leaq 0x68(%rbx), %rdi
leaq 0x180(%rsp), %rsi
callq 0x51f0
movl 0x1a0(%rsp), %eax
movl %eax, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x51f0
movl $0xb0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xd0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0xf0, %esi
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r13, %rsi
callq 0x51f0
movl $0x130, %eax            # imm = 0x130
addq %rax, %rbx
addq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x51f0
movl 0xc(%rsp), %ebx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1785c
movl %ebx, (%rax)
movl $0x1, %ebx
jmp 0x150cf
jmp 0x1529c
jmp 0x1529c
movq %rax, %rbx
leaq 0x88(%rsp), %rax
jmp 0x1526a
jmp 0x1529c
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
jmp 0x1526a
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1529f
callq 0x5410
jmp 0x1529f
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x152c0
movq %rax, %rbx
jmp 0x152a9
movq %rax, %rbx
jmp 0x152b6
movq %rax, %rbx
jmp 0x152ca
jmp 0x1529c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xc4f0
leaq 0x118(%rsp), %rdi
callq 0xfb36
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x152ca
callq 0x5410
leaq 0x10(%rsp), %rdi
callq 0xc4f0
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x152ea
callq 0x5410
movq %rbx, %rdi
callq 0x57d0