// File: /workspace/github_cpp_makefile_star2_O2/OpenFodder[P]SOS_Unpacker/stdafx.cpp
// Function: local_DirectoryList(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&)
std::vector<std::string> local_DirectoryList(const std::string& pPath, const std::string& pExtension) {
    struct dirent		**directFiles;
    std::vector<std::string>		  results;

    // Build the file path

    std::string finalPath;

    finalPath += pPath;
    finalPath += "/";

    findType = pExtension;

    transform(findType.begin(), findType.end(), findType.begin(), ::toupper);

    int count = scandir(finalPath.c_str(), (dirent***)&directFiles, file_select, 0);

    for (int i = 0; i < count; ++i) {

        results.push_back(std::string(directFiles[i]->d_name));
    }

    transform(findType.begin(), findType.end(), findType.begin(), ::tolower);

    count = scandir(finalPath.c_str(), (dirent***)&directFiles, file_select, 0);

    for (int i = 0; i < count; ++i) {

        results.push_back(std::string(directFiles[i]->d_name));
    }

    return results;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x33d0
leaq 0xbb5(%rip), %rsi       # 0xf4c0
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0xad54(%rip), %rdi      # 0x19670
movq %r14, %rsi
callq 0x3100
movq 0xad45(%rip), %r14      # 0x19670
movq 0xad46(%rip), %r15      # 0x19678
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xe94d
movsbl (%r14,%r12), %edi
callq 0x33a0
movb %al, (%r14,%r12)
incq %r12
jmp 0xe935
movq 0x10(%rsp), %rdi
leaq -0x105(%rip), %rdx      # 0xe854
xorl %r13d, %r13d
leaq 0x8(%rsp), %rsi
xorl %ecx, %ecx
callq 0x3060
movl %eax, %r14d
testl %eax, %eax
cmovlel %r13d, %r14d
leaq 0x30(%rsp), %r15
leaq 0x7(%rsp), %r12
cmpq %r13, %r14
je 0xe9b0
movq 0x8(%rsp), %rax
movq (%rax,%r13,8), %rsi
addq $0x13, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x30a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xeaee
movq %r15, %rdi
callq 0x33f8
incq %r13
jmp 0xe97b
movq 0xacb9(%rip), %r14      # 0x19670
movq 0xacba(%rip), %r15      # 0x19678
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xe9d9
movsbl (%r14,%r12), %edi
callq 0x32b0
movb %al, (%r14,%r12)
incq %r12
jmp 0xe9c1
movq 0x10(%rsp), %rdi
leaq -0x191(%rip), %rdx      # 0xe854
xorl %r13d, %r13d
leaq 0x8(%rsp), %rsi
xorl %ecx, %ecx
callq 0x3060
movl %eax, %r14d
testl %eax, %eax
cmovlel %r13d, %r14d
leaq 0x30(%rsp), %r15
leaq 0x7(%rsp), %r12
cmpq %r13, %r14
je 0xea3c
movq 0x8(%rsp), %rax
movq (%rax,%r13,8), %rsi
addq $0x13, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x30a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xeaee
movq %r15, %rdi
callq 0x33f8
incq %r13
jmp 0xea07
leaq 0x10(%rsp), %rdi
callq 0x33f8
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xea5f
jmp 0xea5f
jmp 0xea5f
jmp 0xea64
movq %rax, %r14
jmp 0xea71
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x33f8
leaq 0x10(%rsp), %rdi
callq 0x33f8
movq %rbx, %rdi
callq 0xe1d4
movq %r14, %rdi
callq 0x3380