// File: ChnMasterOG[P]KmerGO2/kmergo/KmerGO_io.h
// Function: getFiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<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>>>>&, bool)
inline void getFiles(std::string path, std::vector<std::string>& files, bool absolute_path)
{
	char path_str[1024];
	strcpy(path_str, path.c_str());
	files.clear();

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
	char path_buf[1024] = "";	// absolute path

	/* get real path */
	_fullpath(path_buf, path_str, 1024);
	if (path_buf[strlen(path_buf) - 1] != '\\')
	{
		path_buf[strlen(path_buf)] = '\\';
		path_buf[strlen(path_buf) + 1] = '\0';
	}
	/* get files */
	std::string p;
	int64 hFile = 0;
	struct _finddata_t fileinfo;
	if ((hFile = _findfirst(p.assign(std::string(path_buf)).append("*").c_str(), &fileinfo)) != -1) {
		do
		{
			if (fileinfo.name[0] == '.') continue;
			if (absolute_path == true) files.push_back(p.assign(std::string(path_buf)).append(fileinfo.name));
			else files.push_back(fileinfo.name);
		} while (_findnext(hFile, &fileinfo) == 0);
		_findclose(hFile);
	}
#elif defined(__linux__) || defined(linux)
	/* get files */
	DIR* dp;
	struct dirent* dirp;
	if ((dp = opendir(path_str)) != NULL)
	{
		while ((dirp = readdir(dp)) != NULL) {
			if (dirp->d_name[0] == '.') continue;
			if (absolute_path == true) files.push_back(joinPath(path_str, dirp->d_name));
			else files.push_back(dirp->d_name);
		}
	}
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp            # imm = 0x520
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
leaq -0x420(%rbp), %rax
movq %rax, -0x4e0(%rbp)
callq 0x4a0a10
movq -0x4e0(%rbp), %rdi
movq %rax, %rsi
callq 0x4010a0
movq -0x10(%rbp), %rdi
callq 0x4078f0
leaq -0x420(%rbp), %rdi
callq 0x561b60
movq %rax, -0x428(%rbp)
cmpq $0x0, %rax
je 0x4072a2
jmp 0x407024
movq -0x428(%rbp), %rdi
callq 0x561dc0
movq %rax, -0x430(%rbp)
cmpq $0x0, %rax
je 0x4072a0
movq -0x430(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x407053
jmp 0x407024
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x4071e0
movq -0x10(%rbp), %rax
movq %rax, -0x4f0(%rbp)
leaq -0x471(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x42ffd0
movq -0x4e8(%rbp), %rdx
leaq -0x470(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x406db0
jmp 0x40709e
movq -0x430(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x500(%rbp)
leaq -0x4a9(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x42ffd0
movq -0x500(%rbp), %rsi
movq -0x4f8(%rbp), %rdx
leaq -0x4a8(%rbp), %rdi
callq 0x406db0
jmp 0x4070df
leaq -0x450(%rbp), %rdi
leaq -0x470(%rbp), %rsi
leaq -0x4a8(%rbp), %rdx
callq 0x407470
jmp 0x4070fb
movq -0x4f0(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x407910
jmp 0x407110
leaq -0x450(%rbp), %rdi
callq 0x49efd0
leaq -0x4a8(%rbp), %rdi
callq 0x49efd0
leaq -0x4a9(%rbp), %rdi
callq 0x42fff0
leaq -0x470(%rbp), %rdi
callq 0x49efd0
leaq -0x471(%rbp), %rdi
callq 0x42fff0
jmp 0x40729b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
jmp 0x4071cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
jmp 0x4071b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
jmp 0x4071ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x49efd0
leaq -0x4a8(%rbp), %rdi
callq 0x49efd0
leaq -0x4a9(%rbp), %rdi
callq 0x42fff0
leaq -0x470(%rbp), %rdi
callq 0x49efd0
leaq -0x471(%rbp), %rdi
callq 0x42fff0
jmp 0x4072ab
movq -0x10(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x430(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x510(%rbp)
leaq -0x4d1(%rbp), %rdi
movq %rdi, -0x508(%rbp)
callq 0x42ffd0
movq -0x510(%rbp), %rsi
movq -0x508(%rbp), %rdx
leaq -0x4d0(%rbp), %rdi
callq 0x406db0
jmp 0x40722c
movq -0x518(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
callq 0x407910
jmp 0x407241
leaq -0x4d0(%rbp), %rdi
callq 0x49efd0
leaq -0x4d1(%rbp), %rdi
callq 0x42fff0
jmp 0x40729b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
jmp 0x40728d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x480(%rbp)
movl %eax, -0x484(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x49efd0
leaq -0x4d1(%rbp), %rdi
callq 0x42fff0
jmp 0x4072ab
jmp 0x407024
jmp 0x4072a2
addq $0x520, %rsp            # imm = 0x520
popq %rbp
retq
movq -0x480(%rbp), %rdi
callq 0x4d3c10
nopw (%rax,%rax)