// File: auton1[P]viterbi/variant_file_filters.cpp
// Function: variant_file::filter_individuals_by_keep_list(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 variant_file::filter_individuals_by_keep_list(const set<string> &indv_to_keep, const string &indv_to_keep_filename)
{
	// Filter individuals by user provided list
	if ((indv_to_keep_filename == "") && (indv_to_keep.size() == 0))
		return;

	LOG.printLOG("Keeping individuals in 'keep' list\n");
	set<string> indv_to_keep_copy = indv_to_keep;
	if (indv_to_keep_filename != "")
	{
		ifstream infile(indv_to_keep_filename.c_str());
		if (!infile.is_open())
			LOG.error("Could not open Individual file:" + indv_to_keep_filename, 1);
		string line;
		string tmp_indv;
		stringstream ss;
		while (!infile.eof())
		{
			getline(infile, line);
			ss.str(line);
			ss >> tmp_indv;
			indv_to_keep_copy.insert(tmp_indv);
			ss.clear();
		}
		infile.close();
	}
	for (unsigned int ui=0; ui<include_indv.size(); ui++)
	{
		if (include_indv[ui] == false)
			continue;
		if (indv_to_keep_copy.find(meta_data.indv[ui]) == indv_to_keep_copy.end())
			include_indv[ui] = false;
	}
}

// Assembly:
subq $0x518, %rsp            # imm = 0x518
movq %rdi, 0x510(%rsp)
movq %rsi, 0x508(%rsp)
movq %rdx, 0x500(%rsp)
movq 0x510(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x500(%rsp), %rdi
leaq 0xfdfe(%rip), %rsi      # 0x75d29
callq 0xea20
testb $0x1, %al
jne 0x65f36
jmp 0x65f4e
movq 0x508(%rsp), %rdi
callq 0x10b30
cmpq $0x0, %rax
jne 0x65f4e
jmp 0x6641c
leaq 0x4df(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x69f0
movq 0x50(%rsp), %rdx
leaq 0xff31(%rip), %rsi      # 0x75e9d
leaq 0x4e0(%rsp), %rdi
callq 0x67c0
jmp 0x65f7b
leaq 0x2d67e(%rip), %rdi     # 0x93600
leaq 0x4e0(%rsp), %rsi
callq 0x71280
jmp 0x65f91
leaq 0x4e0(%rsp), %rdi
callq 0x6b50
leaq 0x4df(%rsp), %rdi
callq 0x65f0
movq 0x508(%rsp), %rsi
leaq 0x498(%rsp), %rdi
callq 0x66990
movq 0x500(%rsp), %rdi
leaq 0xfd5a(%rip), %rsi      # 0x75d29
callq 0x30930
movb %al, 0x4f(%rsp)
jmp 0x65fda
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x65fe7
jmp 0x662ba
movq 0x500(%rsp), %rdi
callq 0x61a0
movq %rax, %rsi
leaq 0x290(%rsp), %rdi
movl $0x8, %edx
callq 0x6a60
jmp 0x6600b
leaq 0x290(%rsp), %rdi
callq 0x68d0
movb %al, 0x4e(%rsp)
jmp 0x6601e
movb 0x4e(%rsp), %al
testb $0x1, %al
jne 0x66118
jmp 0x6602c
movq 0x500(%rsp), %rdx
leaq 0xfe86(%rip), %rsi      # 0x75ec1
leaq 0x270(%rsp), %rdi
callq 0xe8d0
jmp 0x6604a
leaq 0x2d5af(%rip), %rdi     # 0x93600
leaq 0x270(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x66065
leaq 0x270(%rsp), %rdi
callq 0x6b50
jmp 0x66118
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x660ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x6b50
leaq 0x4df(%rsp), %rdi
callq 0x65f0
jmp 0x66431
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x66424
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x662a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x6b50
jmp 0x662a8
leaq 0x250(%rsp), %rdi
callq 0x67e0
leaq 0x230(%rsp), %rdi
callq 0x67e0
leaq 0xa8(%rsp), %rdi
callq 0x6360
jmp 0x66141
jmp 0x66143
movq 0x290(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x290(%rsp,%rax), %rdi
callq 0x6a70
movb %al, 0x4d(%rsp)
jmp 0x66162
movb 0x4d(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x66171
jmp 0x66249
leaq 0x290(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x60c0
jmp 0x66188
leaq 0xa8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x6650
jmp 0x6619f
leaq 0xa8(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x6720
jmp 0x661b6
leaq 0x498(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x5ed80
movb %dl, 0x3f(%rsp)
movq %rax, 0x40(%rsp)
jmp 0x661d6
movb 0x3f(%rsp), %al
movq 0x40(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movb %al, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0xa8(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x6950
jmp 0x6620b
jmp 0x66143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x6628e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x63c0
jmp 0x6628e
leaq 0x290(%rsp), %rdi
callq 0x60d0
jmp 0x66258
leaq 0xa8(%rsp), %rdi
callq 0x63c0
leaq 0x230(%rsp), %rdi
callq 0x6b50
leaq 0x250(%rsp), %rdi
callq 0x6b50
leaq 0x290(%rsp), %rdi
callq 0x6b38
jmp 0x662ba
leaq 0x230(%rsp), %rdi
callq 0x6b50
leaq 0x250(%rsp), %rdi
callq 0x6b50
leaq 0x290(%rsp), %rdi
callq 0x6b38
jmp 0x66424
movl $0x0, 0x94(%rsp)
movq 0x58(%rsp), %rdi
movl 0x94(%rsp), %eax
movq %rax, 0x30(%rsp)
addq $0x430, %rdi            # imm = 0x430
callq 0xf1d0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x6640f
movq 0x58(%rsp), %rdi
addq $0x430, %rdi            # imm = 0x430
movl 0x94(%rsp), %eax
movl %eax, %esi
callq 0x102b0
movq %rdx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x66319
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x10310
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x6634f
jmp 0x663f9
movq 0x58(%rsp), %rdi
addq $0x260, %rdi            # imm = 0x260
movl 0x94(%rsp), %eax
movl %eax, %esi
callq 0x10290
movq %rax, %rsi
leaq 0x498(%rsp), %rdi
callq 0x10b60
movq %rax, 0x18(%rsp)
jmp 0x66380
movq 0x18(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x498(%rsp), %rdi
callq 0x10ba0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x10b40
testb $0x1, %al
jne 0x663b1
jmp 0x663f7
movq 0x58(%rsp), %rdi
addq $0x430, %rdi            # imm = 0x430
movl 0x94(%rsp), %eax
movl %eax, %esi
callq 0x102b0
movq %rdx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x663d7
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x1bd30
jmp 0x663f9
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x662c5
leaq 0x498(%rsp), %rdi
callq 0x112f0
addq $0x518, %rsp            # imm = 0x518
retq
leaq 0x498(%rsp), %rdi
callq 0x112f0
movq 0x4d0(%rsp), %rdi
callq 0x69e0
nop