// File: /workspace/github_c_makefile_star2_O0/stonezwr[P]SpiKL-IP/util.C
// Function: file_finder(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void file_finder(const std::string& path, std::vector<std::string>& filenames, const std::string& suffix){
    DIR *dir;
    struct dirent *ent; 
    struct stat st;

    dir = opendir(path.c_str());
    while((ent = readdir(dir)) != NULL){
        std::string file_name = ent->d_name;
        std::string full_file_name = path + "/" + file_name;
        if(file_name[0] == '.') continue;
    
        if(stat(full_file_name.c_str(), &st) == -1) continue;

        bool is_directory = (st.st_mode & S_IFDIR) != 0;

        if(is_directory)    file_finder(full_file_name, filenames, suffix);
    
        if(file_name.length() >= suffix.length() && file_name.substr(file_name.length() - suffix.length()) == suffix)
            filenames.push_back(file_name);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4160
movq %rax, %rdi
callq 0x4590
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x45a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x2e61b
movq -0x28(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x170(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x46f0
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x12880
jmp 0x2e381
leaq -0xd9(%rbp), %rdi
callq 0x43d0
movq -0x8(%rbp), %rsi
leaq 0x5f82(%rip), %rdx      # 0x3431a
leaq -0x130(%rbp), %rdi
callq 0x2f150
jmp 0x2e3a6
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x2f100
jmp 0x2e3c2
leaq -0x130(%rbp), %rdi
callq 0x4200
xorl %eax, %eax
movl %eax, %esi
leaq -0xd8(%rbp), %rdi
callq 0x47c0
movq %rax, -0x178(%rbp)
jmp 0x2e3e7
movq -0x178(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2e489
movl $0x2, -0x134(%rbp)
jmp 0x2e5df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0xd9(%rbp), %rdi
callq 0x43d0
jmp 0x2e624
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x2e60d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x4200
jmp 0x2e60d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4200
jmp 0x2e60d
leaq -0x110(%rbp), %rdi
callq 0x4160
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x4320
cmpl $-0x1, %eax
jne 0x2e4b8
movl $0x2, -0x134(%rbp)
jmp 0x2e5df
movl -0xa0(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x135(%rbp)
testb $0x1, -0x135(%rbp)
je 0x2e4f2
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x2e300
jmp 0x2e4f0
jmp 0x2e4f2
leaq -0xd8(%rbp), %rdi
callq 0x4580
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4580
movq -0x188(%rbp), %rcx
movq %rax, %rdx
movb $0x0, -0x159(%rbp)
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x179(%rbp)
jb 0x2e592
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4580
movq %rax, -0x198(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4580
movq -0x198(%rbp), %rdx
movq -0x190(%rbp), %rsi
subq %rax, %rdx
leaq -0x158(%rbp), %rdi
movq $-0x1, %rcx
callq 0x43a0
jmp 0x2e575
movb $0x1, -0x159(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x15d20
movb %al, -0x179(%rbp)
movb -0x179(%rbp), %al
movb %al, -0x199(%rbp)
testb $0x1, -0x159(%rbp)
jne 0x2e5a9
jmp 0x2e5b5
leaq -0x158(%rbp), %rdi
callq 0x4200
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x2e5c1
jmp 0x2e5d5
movq -0x10(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x24000
jmp 0x2e5d3
jmp 0x2e5d5
movl $0x0, -0x134(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4200
leaq -0xd8(%rbp), %rdi
callq 0x4200
movl -0x134(%rbp), %eax
testl %eax, %eax
je 0x2e608
jmp 0x2e603
jmp 0x2e32c
jmp 0x2e32c
leaq -0xd8(%rbp), %rdi
callq 0x4200
jmp 0x2e624
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0xe8(%rbp), %rdi
callq 0x46d0