// File: auton1[P]viterbi/entry_filters.cpp
// Function: entry::filter_sites_to_keep(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void entry::filter_sites_to_keep(const set<string> &snps_to_keep, const string &snps_to_keep_file)
{
	// Filter sites by user provided list
	if(passed_filters == false)
		return;

	if ((snps_to_keep.empty()) && (snps_to_keep_file == ""))
		return;

	if (snps_to_keep_file != "" && local_snps_to_keep.empty())
	{
		ifstream in(snps_to_keep_file.c_str());
		string tmp;
		local_snps_to_keep = snps_to_keep;

		if (!in.is_open())
		{
			LOG.error("Could not open SNPs to Keep file" + snps_to_keep_file, 0);
		}
		while (!in.eof())
		{
			in >> tmp;
			local_snps_to_keep.insert(tmp);
			in.ignore(numeric_limits<streamsize>::max(), '\n');
		}

		in.close();
	}
	parse_basic_entry();

	if ( (local_snps_to_keep.find(ID) == local_snps_to_keep.end()) && (snps_to_keep.find(ID) == snps_to_keep.end()) )
		passed_filters = false;
}

// Assembly:
subq $0x2c8, %rsp            # imm = 0x2C8
movq %rdi, 0x2c0(%rsp)
movq %rsi, 0x2b8(%rsp)
movq %rdx, 0x2b0(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x20(%rsp)
movb 0xc(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x5e6ee
jmp 0x5e9b9
movq 0x2b8(%rsp), %rdi
callq 0x4d120
testb $0x1, %al
jne 0x5e701
jmp 0x5e720
movq 0x2b0(%rsp), %rdi
leaq 0x17619(%rip), %rsi     # 0x75d29
callq 0xea20
testb $0x1, %al
jne 0x5e71b
jmp 0x5e720
jmp 0x5e9b9
movq 0x2b0(%rsp), %rdi
leaq 0x175fa(%rip), %rsi     # 0x75d29
callq 0x30930
testb $0x1, %al
jne 0x5e73d
jmp 0x5e906
leaq 0x35cdc(%rip), %rdi     # 0x94420
callq 0x4d120
testb $0x1, %al
jne 0x5e752
jmp 0x5e906
movq 0x2b0(%rsp), %rdi
callq 0x61a0
movq %rax, %rsi
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
callq 0x6a60
leaq 0x88(%rsp), %rdi
callq 0x67e0
movq 0x2b8(%rsp), %rsi
leaq 0x35c90(%rip), %rdi     # 0x94420
callq 0x5ed50
jmp 0x5e797
leaq 0xa8(%rsp), %rdi
callq 0x68d0
movb %al, 0x1f(%rsp)
jmp 0x5e7aa
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x5e826
jmp 0x5e7b4
movq 0x2b0(%rsp), %rdx
leaq 0x1746a(%rip), %rsi     # 0x75c2d
leaq 0x58(%rsp), %rdi
callq 0xe8d0
jmp 0x5e7cf
leaq 0x34e2a(%rip), %rdi     # 0x93600
leaq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x712f0
jmp 0x5e7e4
leaq 0x58(%rsp), %rdi
callq 0x6b50
jmp 0x5e826
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x5e8e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6b50
jmp 0x5e8e7
jmp 0x5e828
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0xa8(%rsp,%rax), %rdi
callq 0x6a70
movb %al, 0x1e(%rsp)
jmp 0x5e847
movb 0x1e(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5e853
jmp 0x5e8bc
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6720
jmp 0x5e86a
leaq 0x35baf(%rip), %rdi     # 0x94420
leaq 0x88(%rsp), %rsi
callq 0x5ed80
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x5e889
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movb %al, 0x50(%rsp)
callq 0x5ede0
movq %rax, %rsi
leaq 0xa8(%rsp), %rdi
movl $0xa, %edx
callq 0x62e0
jmp 0x5e8b7
jmp 0x5e828
leaq 0xa8(%rsp), %rdi
callq 0x60d0
jmp 0x5e8cb
leaq 0x88(%rsp), %rdi
callq 0x6b50
leaq 0xa8(%rsp), %rdi
callq 0x6b38
jmp 0x5e906
leaq 0x88(%rsp), %rdi
callq 0x6b50
leaq 0xa8(%rsp), %rdi
callq 0x6b38
jmp 0x5e9c1
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq *0x10(%rax)
movq 0x20(%rsp), %rsi
addq $0x408, %rsi            # imm = 0x408
leaq 0x35af6(%rip), %rdi     # 0x94420
callq 0x10b60
movq %rax, 0x40(%rsp)
leaq 0x35ae5(%rip), %rdi     # 0x94420
callq 0x10ba0
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x10b40
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x5e963
jmp 0x5e9a6
movq 0x20(%rsp), %rsi
movq 0x2b8(%rsp), %rdi
addq $0x408, %rsi            # imm = 0x408
callq 0x39780
movq %rax, 0x30(%rsp)
movq 0x2b8(%rsp), %rdi
callq 0x10ba0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x10b40
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x5e9b0
jmp 0x5e9b9
movq 0x20(%rsp), %rax
movb $0x0, 0xc(%rax)
addq $0x2c8, %rsp            # imm = 0x2C8
retq
movq 0x80(%rsp), %rdi
callq 0x69e0
nop