// File: /workspace/github_cpp_makefile_star2_O1/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 0x4630
testq %rax, %rax
je 0x1e945
movq %rax, %r14
movq %rax, %rdi
callq 0x4660
testq %rax, %rax
je 0x1e938
movq %rax, %r15
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x1e928
addq $0x13, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x40f0
testl %eax, %eax
je 0x1e9ab
addq $0x20, %r13
cmpq 0x8(%r12), %r13
jne 0x1e90a
movq %r14, %rdi
callq 0x4660
movq %rax, %r15
testq %rax, %rax
jne 0x1e8fb
movq %r14, %rdi
callq 0x46b0
jmp 0x1ebab
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x5702
leaq 0x75b4(%rip), %rcx      # 0x25f21
leaq 0x90(%rsp), %rdi
movl $0xa, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c0
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ea12
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1ea19
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 0x578e
leaq 0x6bbf(%rip), %rcx      # 0x25594
leaq 0x10(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1ebc6
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1ebcc
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 0x7482(%rip), %rsi      # 0x25ebe
callq 0x4830
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ea69
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1ea71
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 0x1eac7
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x1eace
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 0x6527(%rip), %rsi      # 0x25020
leaq 0x6525(%rip), %rdx      # 0x25025
leaq 0x70(%rsp), %rdi
callq 0x578e
leaq 0x139c7(%rip), %rdi     # 0x324d8
leaq 0x30(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movl $0x2, %esi
movl $0x1, %r8d
callq 0x20fae
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x1eb45
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1eb5c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1eb73
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1eb8a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ebab
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4460
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6ebf(%rip), %rdx      # 0x25a78
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x578e
jmp 0x1ec02
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 0x1ebfa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
movq %r14, %rdi
callq 0x46b0
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 0x1ecd2
movq 0x20(%rsp), %rsi
jmp 0x1ecc5
jmp 0x1eccf
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ec58
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x1ec58
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ec74
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x1ec74
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ec90
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x1ec90
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ecac
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x1ecac
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ecd2
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4460
jmp 0x1ecd2
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4780