// File: ChnMasterOG[P]KmerGO2/kmergo/kmer_filtering.cpp
// Function: kmer_filtering(KmerGO_parameters&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
short kmer_filtering(KmerGO_parameters& p, std::string& loginfo)
{
	uint64 Allfilesize = 0;
	std::vector<std::string> files_vec;

	getFiles(p.matrixes_path, files_vec, true);
	for (auto f : files_vec)
	{
		Allfilesize += getFileSize(f);
	}

	//start threads
	std::vector<std::thread> sub_thread;
	for (unsigned int i = 0; i < files_vec.size(); i++)
	{
		if (p.mode == 0)
		{
			sub_thread.push_back(std::thread(categorical_feature_filtering, i, files_vec, p));
		}
		else
		{
			sub_thread.push_back(std::thread(continuous_feature_filtering, i, files_vec, p));
		}
	}
	sub_thread.push_back(std::thread(show_Progress, Allfilesize));
	for (unsigned int i = 0; i < files_vec.size(); i++)
	{
		sub_thread[i].join();
	}
	sub_thread[files_vec.size()].join();

	switch (filtering_err_number)
	{
	default:
		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x406f20
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x50(%rbp), %rdi
callq 0x4a15e0
jmp 0x415c67
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x406fc0
jmp 0x415c7b
leaq -0x50(%rbp), %rdi
callq 0x49efd0
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x407e90
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0x407cd0
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x40d3f0
testb $0x1, %al
jne 0x415cbc
jmp 0x415d97
leaq -0x70(%rbp), %rdi
callq 0x408400
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x4a15e0
jmp 0x415cd6
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4a15e0
jmp 0x415ceb
leaq -0xb8(%rbp), %rdi
callq 0x416910
movq %rax, -0x100(%rbp)
jmp 0x415d00
movq -0x100(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x49efd0
leaq -0x98(%rbp), %rdi
callq 0x49efd0
leaq -0x70(%rbp), %rdi
callq 0x40d430
jmp 0x415ca6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x415fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x49efd0
jmp 0x415fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x415d86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x49efd0
leaq -0x98(%rbp), %rdi
callq 0x49efd0
jmp 0x415fe0
leaq -0xd0(%rbp), %rdi
callq 0x40c010
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movq %rax, -0x108(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4072c0
movq %rax, %rcx
movq -0x108(%rbp), %rax
cmpq %rcx, %rax
jae 0x415ed5
movq -0x8(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0x0, %eax
jne 0x415e5b
movq -0x8(%rbp), %r8
leaq -0x283e(%rip), %rsi     # 0x4135b0
leaq -0xe0(%rbp), %rdi
leaq -0xd4(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x4169f0
jmp 0x415e07
leaq -0xd0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x40c030
jmp 0x415e1c
leaq -0xe0(%rbp), %rdi
callq 0x40c140
jmp 0x415ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x415fd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x40c140
jmp 0x415fd4
movq -0x8(%rbp), %r8
leaq -0x1266(%rip), %rsi     # 0x414c00
leaq -0xe8(%rbp), %rdi
leaq -0xd4(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x4169f0
jmp 0x415e7f
leaq -0xd0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x40c030
jmp 0x415e94
leaq -0xe8(%rbp), %rdi
callq 0x40c140
jmp 0x415ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x40c140
jmp 0x415fd4
jmp 0x415ec1
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x415dad
leaq 0x124(%rip), %rsi       # 0x416000
leaq -0xf0(%rbp), %rdi
leaq -0x18(%rbp), %rdx
callq 0x40c170
jmp 0x415eee
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x40c030
jmp 0x415f03
leaq -0xf0(%rbp), %rdi
callq 0x40c140
movl $0x0, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movq %rax, -0x110(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4072c0
movq %rax, %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
jae 0x415f89
movl -0xf4(%rbp), %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
callq 0x40c230
movq %rax, %rdi
callq 0x4a1e00
jmp 0x415f5c
jmp 0x415f5e
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0x415f19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x40c140
jmp 0x415fd4
leaq -0x30(%rbp), %rdi
callq 0x4072c0
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x40c230
movq %rax, %rdi
callq 0x4a1e00
jmp 0x415fab
movw 0x22470e(%rip), %ax     # 0x63a6c0
jmp 0x415fb4
leaq -0xd0(%rbp), %rdi
callq 0x40c250
leaq -0x30(%rbp), %rdi
callq 0x407800
xorl %eax, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
callq 0x40c250
leaq -0x30(%rbp), %rdi
callq 0x407800
movq -0x58(%rbp), %rdi
callq 0x4d3c10
nopw %cs:(%rax,%rax)