// File: /workspace/github_cpp_makefile_star2_O2/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::parse_match()
void File::parse_match() {
  DIR *dir;
  struct dirent *ent;

  std::string path = path_.substr(0, path_.find_last_of("/"));
  if (!matches_.empty())
    matches_.clear();
  if ((dir = opendir(path.c_str()))) {
    while ((ent = readdir(dir))) {
      std::string name(ent->d_name);
      if (file_name_full_ != name && !name.find(file_name_)
        && name.find(mime_ext_) != std::string::npos) {
        matches_.push_back(ent->d_name);
      }
    }
    closedir(dir);
  } else {
    Log.print(DEBUG, "opendir : " + std::string(strerror(errno)) + " of " + path_, RED, true);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x80(%rdi), %r12
leaq 0x496e(%rip), %rsi      # 0x1c57e
pushq $-0x1
popq %rdx
movq %r12, %rdi
callq 0x4430
leaq 0xb8(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x44a0
leaq 0x68(%rbx), %r13
movq 0x68(%rbx), %rax
movq %rbx, %r14
cmpq 0x70(%rbx), %rax
je 0x17c49
movq %r13, %rdi
callq 0x60b0
movq 0xb8(%rsp), %rdi
callq 0x4660
testq %rax, %rax
je 0x17d19
movq %rax, %r15
movq %r13, 0x8(%rsp)
leaq 0x28(%r14), %r12
leaq 0x8(%r14), %r13
addq $0x48, %r14
movq %r14, 0x10(%rsp)
leaq 0x38(%rsp), %rbp
leaq 0x18(%rsp), %r14
movq %r15, %rdi
callq 0x4670
movq %rax, %rbx
testq %rax, %rax
je 0x17d0c
addq $0x13, %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5328
movq %r12, %rdi
movq %rbp, %rsi
callq 0x128fa
testb %al, %al
je 0x17cff
movq %rbp, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4880
testq %rax, %rax
jne 0x17cff
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x4880
cmpq $-0x1, %rax
je 0x17cff
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x58(%rsp), %rdx
callq 0x5328
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6a06
movq %r14, %rdi
callq 0x4898
movq %rbp, %rdi
callq 0x4898
jmp 0x17c82
movq %r15, %rdi
callq 0x46c0
jmp 0x17de3
callq 0x4040
movl (%rax), %edi
callq 0x4130
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x5328
leaq 0x5193(%rip), %rsi      # 0x1ced1
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x8234
leaq 0x511a(%rip), %rdx      # 0x1ce6e
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x5292
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r12, %rdx
callq 0x5273
leaq 0x42a1(%rip), %rsi      # 0x1c020
leaq 0x78(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x5328
leaq 0x13753(%rip), %rdi     # 0x2b4e8
pushq $0x2
popq %rsi
leaq 0x98(%rsp), %rdx
leaq 0x78(%rsp), %rcx
pushq $0x1
popq %r8
callq 0x18e1e
leaq 0x78(%rsp), %rdi
callq 0x4898
leaq 0x98(%rsp), %rdi
callq 0x4898
leaq 0x38(%rsp), %rdi
callq 0x4898
leaq 0x18(%rsp), %rdi
callq 0x4898
leaq 0x58(%rsp), %rdi
callq 0x4898
leaq 0xb8(%rsp), %rdi
callq 0x4898
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4898
jmp 0x17e14
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x4898
jmp 0x17e26
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4898
jmp 0x17e35
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4898
jmp 0x17e44
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x17e64
jmp 0x17e6d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4898
jmp 0x17e5f
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4898
jmp 0x17e70
jmp 0x17e6d
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x4898
movq %rbx, %rdi
callq 0x4750
nop