// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/entry_filters.cpp
// Function: entry::filter_sites_by_INFO(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void entry::filter_sites_by_INFO(const set<string> &flags_to_remove, const set<string> &flags_to_keep)
{
	// Filter sites by entries in the INFO field.
	if (passed_filters == false)
		return;

	if ((flags_to_remove.empty()) && (flags_to_keep.empty()))
		return;

	string value;
	unsigned int N_to_remove = flags_to_remove.size();
	unsigned int N_to_keep = flags_to_keep.size();

	parse_basic_entry(false, false, true);

	if (N_to_keep > 0)
	{
		bool keep = false;
		for (set<string>::iterator it=flags_to_keep.begin(); it != flags_to_keep.end(); ++it)
		{
			if (entry_header.INFO_map[ entry_header.INFO_reverse_map[*it] ].Type != Flag)
				LOG.error("Using INFO flag filtering on non flag type "+*it+" will not work correctly.");
			else
			{
				value = get_INFO_value(*it);
				if (value == "1")
					keep = true;
			}
		}
		passed_filters = keep;
	}

	if (passed_filters==false)
		return;

	if (N_to_remove > 0)
	{
		for (set<string>::iterator it=flags_to_remove.begin(); it != flags_to_remove.end(); ++it)
		{
			if (entry_header.INFO_map[ entry_header.INFO_reverse_map[*it] ].Type != Flag)
				LOG.error("Using INFO flag filtering on non flag type "+*it+" will not work correctly.");
			else
			{
				value = get_INFO_value(*it);
				if (value == "1")
				{
					passed_filters = false;
					continue;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, 0x8(%rsp)
cmpb $0x0, 0xc(%rdi)
je 0x2af70
movq %rdx, %r15
movq %rsi, %r14
movq 0x28(%rsi), %rbp
movq 0x28(%rdx), %rbx
movq %rbp, %rax
orq %rbx, %rax
je 0x2af70
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq *0x10(%rax)
testl %ebx, %ebx
movq %r14, 0x98(%rsp)
je 0x2adcc
movq 0x18(%r15), %r12
addq $0x8, %r15
cmpq %r15, %r12
je 0x2add7
movq %rbp, 0x90(%rsp)
movq 0x8(%rsp), %rax
leaq 0x190(%rax), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x70(%rax), %rbp
xorl %r13d, %r13d
leaq 0x10(%rsp), %rbx
leaq 0x20(%r12), %r14
movq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x177e8
movq %rbp, %rdi
movq %rax, %rsi
callq 0x17782
cmpl $0x4, 0x88(%rax)
jne 0x2ad05
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x22776
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x5550
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2ace0
callq 0x5410
leaq 0x70(%rsp), %rdi
leaq 0xdcbd(%rip), %rsi      # 0x389a9
callq 0x50e0
testl %eax, %eax
movzbl %r13b, %r13d
movl $0x1, %eax
cmovel %eax, %r13d
jmp 0x2adaa
movq %rbx, %rdi
leaq 0xf2c5(%rip), %rsi      # 0x39fd4
movq %r14, %rdx
callq 0xb777
movq %rbx, %rdi
leaq 0xf2df(%rip), %rsi      # 0x3a000
callq 0x5870
leaq 0x60(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2ad4e
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x2ad54
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e735(%rip), %rdi     # 0x494a8
leaq 0x50(%rsp), %rsi
movl $0x1, %edx
callq 0x36ec8
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2ad96
callq 0x5410
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2adaa
callq 0x5410
movq %r12, %rdi
callq 0x5500
movq %rax, %r12
cmpq %r15, %rax
jne 0x2ac86
andb $0x1, %r13b
movq 0x90(%rsp), %rbp
jmp 0x2adda
movq 0x8(%rsp), %rax
movb 0xc(%rax), %r13b
jmp 0x2ade3
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movb %r13b, 0xc(%rax)
testl %ebp, %ebp
je 0x2af59
testb %r13b, %r13b
je 0x2af59
movq 0x98(%rsp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
cmpq %rax, %r15
je 0x2af59
movq %rax, %rbp
movq 0x8(%rsp), %rax
leaq 0x190(%rax), %rbx
leaq 0x70(%rax), %r12
leaq 0x10(%rsp), %r13
leaq 0x20(%r15), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x177e8
movq %r12, %rdi
movq %rax, %rsi
callq 0x17782
cmpl $0x4, 0x88(%rax)
jne 0x2aea0
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x22776
leaq 0x70(%rsp), %rdi
movq %r13, %rsi
callq 0x5550
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2ae79
callq 0x5410
leaq 0x70(%rsp), %rdi
leaq 0xdb24(%rip), %rsi      # 0x389a9
callq 0x50e0
testl %eax, %eax
jne 0x2af45
movq 0x8(%rsp), %rax
movb $0x0, 0xc(%rax)
jmp 0x2af45
movq %r13, %rdi
leaq 0xf12a(%rip), %rsi      # 0x39fd4
movq %r14, %rdx
callq 0xb777
movq %r13, %rdi
leaq 0xf144(%rip), %rsi      # 0x3a000
callq 0x5870
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2aee9
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x2aeef
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e59a(%rip), %rdi     # 0x494a8
leaq 0x30(%rsp), %rsi
movl $0x1, %edx
callq 0x36ec8
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2af31
callq 0x5410
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2af45
callq 0x5410
movq %r15, %rdi
callq 0x5500
movq %rax, %r15
cmpq %rbp, %rax
jne 0x2ae25
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2af70
callq 0x5410
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2afd1
jmp 0x2afd1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
jmp 0x2afa8
jmp 0x2afb4
jmp 0x2afd1
jmp 0x2afd1
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2afb7
callq 0x5410
jmp 0x2afb7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2afd4
callq 0x5410
jmp 0x2afd4
jmp 0x2afd1
jmp 0x2afd1
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2afeb
callq 0x5410
movq %rbx, %rdi
callq 0x57d0
nop