// File: /workspace/github_cpp_makefile_star2_O2/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 0x21b97
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movl %ebp, %eax
notb %al
movq 0x28(%rsi), %r12
testq %r12, %r12
sete %cl
andb %al, %cl
movq 0x28(%rdx), %r13
testq %r13, %r13
sete %al
testb %al, %cl
jne 0x21b97
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movq (%rdi), %rax
pushq $0x1
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq *0x10(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1c302
testl %r13d, %r13d
je 0x21b13
movq %r12, 0x20(%rsp)
movl %ebp, 0x1c(%rsp)
leaq 0x8(%r15), %r13
xorl %ecx, %ecx
movl %ecx, %r12d
movq (%rsp), %rsi
movq 0x8(%rsp), %rbp
subq %rsi, %rbp
sarq $0x5, %rbp
cmpq %r12, %rbp
jbe 0x21afe
movq %r12, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0x16988
leal 0x1(%r12), %ecx
cmpq %r13, %rax
je 0x21aca
cmpq %r12, %rbp
seta %al
seta 0xc(%rbx)
movl 0x1c(%rsp), %ebp
movq 0x20(%rsp), %r12
jmp 0x21b16
movb 0xc(%rbx), %al
testb %al, %al
je 0x21b8f
movq (%rsp), %rdi
cmpq %rdi, 0x8(%rsp)
je 0x21b35
leaq 0xba18(%rip), %rsi      # 0x2d544
callq 0x96f3
testb %al, %al
jne 0x21b8f
testb %bpl, %bpl
je 0x21b4b
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x21b4b
movb $0x0, 0xc(%rbx)
jmp 0x21b8f
testl %r12d, %r12d
je 0x21b8f
leaq 0x8(%r14), %r15
xorl %r12d, %r12d
movl %r12d, %r12d
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x21b8f
movq %r12, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %r14, %rdi
callq 0x16988
cmpq %r15, %rax
je 0x21b8a
movb $0x0, 0xc(%rbx)
incl %r12d
jmp 0x21b57
movq %rsp, %rdi
callq 0x9f1c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21baa
jmp 0x21baa
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9f1c
movq %rbx, %rdi
callq 0x5800
nop