// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::find_index(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::string File::find_index(std::vector<std::string> &indexes) {
  DIR *dir;
  struct dirent *ent;

  if ((dir = opendir(path_.c_str()))) {
    while ((ent = readdir(dir))) {
      for (std::vector<std::string>::iterator it = indexes.begin(); it != indexes.end(); it++) {
        if (*it == ent->d_name) {
          std::string ret = "/" + std::string(ent->d_name);
          closedir(dir);
          return ret;
        }
      }
    }
    closedir(dir);
  } else {
    Log.print(DEBUG, "opendir : " + std::string(strerror(errno)) + " of " + path_, RED, true);
    return "";
  }
  return "";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x80(%rsi), %rdi
callq 0x4640
testq %rax, %rax
je 0x1e97d
movq %rax, %r14
movq %rax, %rdi
callq 0x4670
testq %rax, %rax
je 0x1e970
movq %rax, %r15
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x1e960
addq $0x13, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x40f0
testl %eax, %eax
je 0x1e9e3
addq $0x20, %r13
cmpq 0x8(%r12), %r13
jne 0x1e942
movq %r14, %rdi
callq 0x4670
movq %rax, %r15
testq %rax, %rax
jne 0x1e933
movq %r14, %rdi
callq 0x46c0
jmp 0x1ebe3
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x5712
leaq 0x757c(%rip), %rcx      # 0x25f21
leaq 0x90(%rsp), %rdi
movl $0xa, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x44d0
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ea4a
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1ea51
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x4190
leaq (%rax,%r15), %rdx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x579e
leaq 0x6b87(%rip), %rcx      # 0x25594
leaq 0x10(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x44d0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1ebfe
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1ec04
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x744a(%rip), %rsi      # 0x25ebe
callq 0x4840
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1eaa1
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1eaa9
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x80(%r15), %rsi
movq 0x88(%r15), %rdx
callq 0x4100
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1eaff
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x1eb06
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x64ef(%rip), %rsi      # 0x25020
leaq 0x64ed(%rip), %rdx      # 0x25025
leaq 0x70(%rsp), %rdi
callq 0x579e
leaq 0x1399f(%rip), %rdi     # 0x324e8
leaq 0x30(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movl $0x2, %esi
movl $0x1, %r8d
callq 0x20f32
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x1eb7d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1eb94
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ebab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ebc2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ebe3
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6e87(%rip), %rdx      # 0x25a78
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x579e
jmp 0x1ec3a
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ec32
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r14, %rdi
callq 0x46c0
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ed0a
movq 0x20(%rsp), %rsi
jmp 0x1ecfd
jmp 0x1ed07
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ec90
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1ec90
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ecac
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1ecac
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ecc8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1ecc8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ece4
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1ece4
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ed0a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1ed0a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4790