// File: /workspace/github_cpp_makefile_star2_O1/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 0x2916d
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testb %bpl, %bpl
jne 0x29040
cmpq $0x0, 0x28(%r14)
jne 0x29040
cmpq $0x0, 0x28(%r15)
je 0x2916d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl 0x28(%r14), %r13d
movl 0x28(%r15), %r12d
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq *0x10(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x224d0
testq %r12, %r12
je 0x290e2
movq %r13, 0x20(%rsp)
movl %ebp, 0x1c(%rsp)
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
setne %bpl
je 0x290d1
leaq 0x8(%r15), %r13
movl $0x1, %r12d
xorl %esi, %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %r15, %rdi
callq 0x1b9c2
cmpq %r13, %rax
jne 0x290d1
movl %r12d, %esi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r12d
cmpq %rsi, %rcx
seta %bpl
ja 0x2909e
andb $0x1, %bpl
movb %bpl, 0xc(%rbx)
movl 0x1c(%rsp), %ebp
movq 0x20(%rsp), %r13
cmpb $0x0, 0xc(%rbx)
je 0x29165
movq (%rsp), %rdi
cmpq %rdi, 0x8(%rsp)
je 0x29103
leaq 0x104bf(%rip), %rsi     # 0x395b9
callq 0x50e0
testl %eax, %eax
je 0x29165
testb %bpl, %bpl
je 0x29119
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x29119
movb $0x0, 0xc(%rbx)
jmp 0x29165
testq %r13, %r13
je 0x29165
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x29165
leaq 0x8(%r14), %r15
movl $0x1, %ebp
xorl %esi, %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %r14, %rdi
callq 0x1b9c2
cmpq %r15, %rax
je 0x2914c
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 0x29134
movq %rsp, %rdi
callq 0xc4f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29180
jmp 0x29180
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc4f0
movq %rbx, %rdi
callq 0x57d0
nop