// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
movl %edx, 0xc(%rsp)
movq %rsi, %r14
movq (%rdi), %rsi
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x4010a8
movq (%r14), %rsi
movq %r14, %rdi
callq 0x407cee
movq %r15, %rdi
callq 0x54e320
testq %rax, %rax
je 0x407aa1
movq %rax, %r15
movq %rax, %rdi
callq 0x54e580
testq %rax, %rax
je 0x407aa1
movq %rax, %r13
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r12
cmpb $0x2e, 0x13(%r13)
je 0x407a8d
addq $0x13, %r13
cmpb $0x0, 0xc(%rsp)
je 0x407a4f
movq %rbp, %rbx
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
callq 0x401140
leaq (%rsp,%rax), %rdx
addq $0x70, %rdx
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x4080ee
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r13, %rdi
callq 0x401140
leaq (%rax,%r13), %rdx
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4080ee
movq %r12, %rdi
leaq 0x30(%rsp), %rsi
movq %rbp, %rdx
callq 0x407b32
movq %rbx, %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x407d8a
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x407a1d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x407a39
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x407a8d
movq 0x40(%rsp), %rsi
jmp 0x407a85
movq %rbp, 0x10(%rsp)
movq %r13, %rdi
callq 0x401140
leaq (%rax,%r13), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x4080ee
movq %r14, %rdi
movq %r12, %rsi
callq 0x407d8a
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x407a8d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq %r15, %rdi
callq 0x54e580
movq %rax, %r13
testq %rax, %rax
jne 0x407979
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x407b2a
movq 0x20(%rsp), %rsi
jmp 0x407b1d
jmp 0x407b27
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x407ae8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x407ae8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x407b09
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x407b09
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x407b2a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x407b2a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4c0230