// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/entry_filters.cpp
// Function: entry::filter_sites_by_filter_status(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&, bool)
void entry::filter_sites_by_filter_status(const set<string> &filter_flags_to_remove, const set<string> &filter_flags_to_keep, bool remove_all)
{
	// Filter sites by entries in the FILTER field.
	if (passed_filters == false)
		return;

	if ((remove_all == false) && (filter_flags_to_remove.empty()) && (filter_flags_to_keep.empty()))
		return;

	vector<string> FILTERs;
	unsigned int N_to_remove = filter_flags_to_remove.size();
	unsigned int N_to_keep = filter_flags_to_keep.size();
	parse_basic_entry(false, true);
	get_FILTER_vector(FILTERs);

	if (N_to_keep > 0)
	{
		bool keep = false;
		for (unsigned int ui=0; ui<FILTERs.size(); ui++)
			if (filter_flags_to_keep.find(FILTERs[ui]) != filter_flags_to_keep.end())
			{
				keep = true; break;
			}

		passed_filters = keep;
	}
	if (passed_filters==false)
		return;

	if ( (FILTERs.size() >= 1) && (FILTERs[0] == "PASS") )
		return;
	else if ((remove_all == true) && (!FILTERs.empty()))
		passed_filters = false;
	else if (N_to_remove > 0)
	{
		for (unsigned int ui=0; ui<FILTERs.size(); ui++)
			if (filter_flags_to_remove.find(FILTERs[ui]) != filter_flags_to_remove.end())
				passed_filters = false;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, 0xc(%rdi)
je 0x28f4d
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movl %ebp, %eax
notb %al
movq 0x28(%rsi), %r13
testq %r13, %r13
sete %cl
andb %al, %cl
movq 0x28(%rdx), %r12
testq %r12, %r12
sete %al
testb %al, %cl
jne 0x28f4d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq *0x10(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x222d2
testl %r12d, %r12d
je 0x28eba
movq (%rsp), %rcx
cmpq %rcx, 0x8(%rsp)
je 0x28ebf
movq %r13, 0x20(%rsp)
leaq 0x8(%r15), %r13
movl $0x1, %r12d
xorl %esi, %esi
shlq $0x5, %rsi
addq %rcx, %rsi
movq %r15, %rdi
callq 0x1b8cc
cmpq %r13, %rax
jne 0x28ead
movl %r12d, %esi
movq (%rsp), %rcx
movq 0x8(%rsp), %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
incl %r12d
cmpq %rsi, %rdx
ja 0x28e7e
cmpq %r13, %rax
setne %al
movq 0x20(%rsp), %r13
jmp 0x28ec1
movb 0xc(%rbx), %al
jmp 0x28ec4
xorl %eax, %eax
movb %al, 0xc(%rbx)
testb %al, %al
je 0x28f45
movq (%rsp), %rdi
cmpq %rdi, 0x8(%rsp)
je 0x28ee3
leaq 0xf6df(%rip), %rsi      # 0x385b9
callq 0x50e0
testl %eax, %eax
je 0x28f45
testb %bpl, %bpl
je 0x28ef9
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x28ef9
movb $0x0, 0xc(%rbx)
jmp 0x28f45
testl %r13d, %r13d
je 0x28f45
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x28f45
leaq 0x8(%r14), %r15
movl $0x1, %ebp
xorl %esi, %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %r14, %rdi
callq 0x1b8cc
cmpq %r15, %rax
je 0x28f2c
movb $0x0, 0xc(%rbx)
movl %ebp, %esi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %ebp
cmpq %rsi, %rcx
ja 0x28f14
movq %rsp, %rdi
callq 0xc4da
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28f60
jmp 0x28f60
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc4da
movq %rbx, %rdi
callq 0x57d0
nop