LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::POST()
int Response::POST() {
  int status_code = 200;

  body_ = config_.getBody();

  pthread_mutex_lock(&g_write);

  if (!file_.exists()) {
    file_.create(body_);
    status_code = 201;
  }
  else {
    file_.append(body_);
    status_code = 200;
  }

  pthread_mutex_unlock(&g_write);

  headers_["Content-Length"] = ft::to_string(body_.length());
  return status_code;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x9f50
leaq 0xe0(%r14), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4230
leaq 0x1f457(%rip), %rdi     # 0x324a8
callq 0x4610
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x1d8e2
movq %r15, %rdi
movq %rbx, %rsi
testb %al, %al
je 0x13078
callq 0x1d2d2
movl $0xc8, %ebx
jmp 0x13082
callq 0x1cdb6
movl $0xc9, %ebx
leaq 0x1f41f(%rip), %rdi     # 0x324a8
callq 0x4350
movq 0xe8(%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x10646
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12522(%rip), %rsi     # 0x255d1
leaq 0x12529(%rip), %rdx     # 0x255df
movq %rsp, %rdi
callq 0x579e
addq $0x190, %r14            # imm = 0x190
movq %rsp, %rsi
movq %r14, %rdi
callq 0x105ca
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x130f3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1310e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x13138
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x13138
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13153
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::PUT()
int Response::PUT() {
  int status_code = 204;

  pthread_mutex_lock(&g_write);

  if (!file_.exists()) {
    file_.create(config_.getBody());
    headers_["Content-Length"] = "0";
    status_code = 201;
  }
  else
    file_.create(config_.getBody());

  pthread_mutex_unlock(&g_write);

  return status_code;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x1f338(%rip), %rdi     # 0x324a8
callq 0x4610
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x1d8e2
movl %eax, %r15d
movq (%rbx), %rdi
callq 0x9f50
movq %r14, %rdi
movq %rax, %rsi
callq 0x1cdb6
movl $0xcc, %ebp
testb %r15b, %r15b
jne 0x1320e
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12420(%rip), %rsi     # 0x255d1
leaq 0x12427(%rip), %rdx     # 0x255df
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x579e
addq $0x190, %rbx            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rsi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0x12164(%rip), %rcx     # 0x25346
movl $0x1, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x13209
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movl $0xc9, %ebp
leaq 0x1f293(%rip), %rdi     # 0x324a8
callq 0x4350
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x13241
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::DELETE()
int Response::DELETE() {
  if (!file_.exists())
    return 404;

  file_.unlink();

  body_ += "<!DOCTYPE html>\n\
            <html>\n\
            <body>\n\
              <h1>File deleted</h1>\n\
            </body>\n\
            </html>";
  headers_["Content-Type"] = g_mimes.getType(".html");
  headers_["Content-Length"] = ft::to_string(body_.length());
  return 200;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x1d8e2
movl %eax, %ecx
movl $0x194, %eax            # imm = 0x194
testb %cl, %cl
je 0x133c2
movq %r14, %rdi
callq 0x1d5e4
leaq 0xe0(%rbx), %rdi
leaq 0x12666(%rip), %rsi     # 0x258f1
callq 0x4840
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12587(%rip), %rsi     # 0x25827
leaq 0x12585(%rip), %rdx     # 0x2582c
leaq 0x40(%rsp), %rdi
callq 0x579e
leaq 0x1f2b0(%rip), %rsi     # 0x32568
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x23764
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12308(%rip), %rsi     # 0x255e0
leaq 0x1230d(%rip), %rdx     # 0x255ec
movq %rsp, %rdi
callq 0x579e
leaq 0x190(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x105ca
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1331c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x30(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x13337
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x1334e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0xe8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x10646
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x12265(%rip), %rsi     # 0x255d1
leaq 0x1226c(%rip), %rdx     # 0x255df
callq 0x579e
movq %rsp, %rsi
movq %r14, %rdi
callq 0x105ca
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x133a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x133bd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movl $0xc8, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x133ee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x133ee
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x13459
movq 0x30(%rsp), %rsi
jmp 0x1344c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1341d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1341d
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1343d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1343d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x13459
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x13459
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::isCGI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Response::isCGI(std::string extension) {
  std::map<std::string, std::string> &cgi = config_.getCGI();

  for (std::map<std::string, std::string>::iterator it = cgi.begin(); it != cgi.end(); it++) {
    if (it->first == extension)
      return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rdi
callq 0x9efe
movq %rax, %r14
movq 0x18(%rax), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x134ba
movq 0x8(%rbx), %r12
cmpq %r12, 0x28(%r15)
jne 0x134aa
movb $0x1, %bpl
testq %r12, %r12
je 0x134bc
movq (%rbx), %rsi
movq 0x20(%r15), %rdi
movq %r12, %rdx
callq 0x4480
testl %eax, %eax
je 0x134bc
movq %r15, %rdi
callq 0x42e0
movq %rax, %r15
cmpq %r14, %rax
jne 0x13489
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::checkAuth()
bool Response::checkAuth() {
  if (config_.getHeader("Authorization").empty())
    return false;
  std::string auth_cred = config_.getHeader("Authorization");
  std::string token = ft::b64decode(auth_cred.substr(auth_cred.find(' ') + 1));
  return (token == config_.getAuth());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x122bb(%rip), %rsi     # 0x257ab
leaq 0x122c1(%rip), %rdx     # 0x257b8
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x579e
movq %r14, %rdi
movq %r15, %rsi
callq 0x9f62
movq 0x8(%rax), %r14
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x13533
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4470
testq %r14, %r14
je 0x13627
movq (%rbx), %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1225b(%rip), %rsi     # 0x257ab
leaq 0x12261(%rip), %rdx     # 0x257b8
leaq 0x28(%rsp), %rdi
callq 0x579e
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x9f62
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x6c2a
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x135a2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x4590
leaq 0x1(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x4490
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1c57d
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x135f8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4470
movq (%rbx), %rdi
callq 0x9eea
movq 0x10(%rsp), %rdx
cmpq 0x8(%rax), %rdx
jne 0x1362b
movq 0x8(%rsp), %r14
testq %rdx, %rdx
je 0x13634
movq (%rax), %rsi
movq %r14, %rdi
callq 0x4480
testl %eax, %eax
sete %bl
jmp 0x13636
xorl %ebx, %ebx
jmp 0x13667
movq 0x8(%rsp), %r14
xorl %ebx, %ebx
jmp 0x13636
movb $0x1, %bl
leaq 0x18(%rsp), %rax
cmpq %rax, %r14
je 0x13650
movq 0x18(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x4470
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x13667
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x136b3
movq 0x18(%rsp), %rsi
jmp 0x136a6
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x136b3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x136b3
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x136fd
movq 0x58(%rsp), %rsi
jmp 0x136f5
movq %rax, %rbx
jmp 0x136fd
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x136fd
movq 0x98(%rsp), %rsi
jmp 0x136f5
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x136fd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::buildMethodList[abi:cxx11]()
std::string Response::buildMethodList() {
  std::vector<std::string> methods = config_.getMethods();
  std::string list;

  std::vector<std::string>::iterator it = methods.begin();

  while (it != methods.end()) {
    list += *it;
    it++;
    if (it != methods.end())
      list += ", ";
  }
  return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x9f46
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x7a00
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq (%r14), %r12
cmpq 0x8(%r14), %r12
je 0x143e1
leaq 0x114d3(%rip), %r14     # 0x25886
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x4100
addq $0x20, %r12
cmpq 0x8(%rsp), %r12
je 0x143e1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4840
cmpq 0x8(%rsp), %r12
jne 0x143b3
movq %rsp, %rdi
callq 0x6a2c
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1440e
movq (%r15), %rsi
incq %rsi
callq 0x4470
movq %rsp, %rdi
callq 0x6a2c
movq %r14, %rdi
callq 0x4790
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::send(int)
int Response::send(int fd) {
  int ret = ::send(fd, response_.c_str() + total_sent_, response_.length() - total_sent_, 0);

  if (ret <= 0) {
    std::cout << "send : " << strerror(errno) << std::endl;
    return -1;
  }
  total_sent_ += ret;
  if (total_sent_ >= response_.length())
    return 0;
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movq %rdi, %rbx
movq 0xb0(%rdi), %rcx
movq 0xc8(%rdi), %rdx
movq 0xc0(%rdi), %rsi
addq %rcx, %rsi
subq %rcx, %rdx
movl %eax, %edi
xorl %ecx, %ecx
callq 0x41e0
testl %eax, %eax
jle 0x17097
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq 0xb0(%rbx), %rax
movq %rax, 0xb0(%rbx)
xorl %ecx, %ecx
cmpq 0xc8(%rbx), %rax
setb %cl
jmp 0x17125
movq 0x1af1a(%rip), %rbx     # 0x31fb8
leaq 0xe903(%rip), %rsi      # 0x259a8
movl $0x7, %edx
movq %rbx, %rdi
callq 0x44e0
callq 0x4050
movl (%rax), %edi
callq 0x4140
testq %rax, %rax
je 0x170e2
movq %rax, %r14
movq %rax, %rdi
callq 0x4190
movq 0x1aee3(%rip), %rdi     # 0x31fb8
movq %r14, %rsi
movq %rax, %rdx
callq 0x44e0
jmp 0x170f9
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x4740
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4430
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x42c0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::operator=(Server const&)
Server	&Server::operator=(const Server &copy) {
  servers_ = copy.servers_;
  options_ = copy.options_;
  running_server_ = copy.running_server_;
  clients_ = copy.clients_;
  master_fds_ = copy.master_fds_;
  fd_set_ = copy.fd_set_;
  max_fd_ = copy.max_fd_;
  return (*this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq 0x8(%rdi), %rdi
callq 0x1a97c
movq 0x10(%r14), %r15
movq 0x10(%rbx), %r12
movups (%r15), %xmm0
movups %xmm0, (%r12)
leaq 0x10(%r12), %rdi
leaq 0x10(%r15), %rsi
callq 0x4230
movl 0x30(%r15), %eax
movl %eax, 0x30(%r12)
addq $0x38, %r12
addq $0x38, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x1b0bc
leaq 0x18(%r14), %rsi
leaq 0x18(%rbx), %rdi
callq 0x1b3ea
leaq 0x48(%r14), %rsi
leaq 0x48(%rbx), %rdi
callq 0x1b71e
leaq 0x78(%r14), %rsi
leaq 0x78(%rbx), %rdi
movl $0x10, %ecx
rep  movsq (%rsi), %es:(%rdi)
cmpq %r14, %rbx
je 0x184f5
movl $0x1f8, %edi            # imm = 0x1F8
leaq (%r14,%rdi), %rdx
addq %rbx, %rdi
movq 0x1f8(%r14), %rsi
callq 0x1baa0
movl 0x210(%r14), %eax
movl %eax, 0x210(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::add_to_fd_set(int)
void Server::add_to_fd_set(int fd) {
  fd_set_.push_back(fd);
  fd_set_.sort();

  FD_SET(fd, &master_fds_);

  if (fd > max_fd_)
    max_fd_ = fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x1f8(%rdi), %r15
movl $0x18, %edi
callq 0x4440
movl %ebx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x4060
incq 0x208(%r14)
movq %r15, %rdi
callq 0x1ad6c
leal 0x3f(%rbx), %eax
testl %ebx, %ebx
cmovnsl %ebx, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %ebx, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x78(%r14,%rax,8)
cmpl %ebx, 0x210(%r14)
jge 0x19301
movl %ebx, 0x210(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::clientDisconnect(int)
void Server::clientDisconnect(int fd) {
  remove_from_fd_set(fd);
  if (clients_.find(fd) != clients_.end()) {
    Log.print(INFO, head_ + "connection closed", GREEN);
    delete clients_[fd];
    clients_.erase(fd);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl %esi, 0x4(%rsp)
callq 0x19ab0
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x19a64
leaq 0x48(%r14), %rbx
leaq 0x50(%r14), %rdx
movq %rdx, %rcx
xorl %esi, %esi
cmpl %ebp, 0x20(%rax)
setl %sil
cmovgeq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x19956
cmpq %rdx, %rcx
je 0x19a64
cmpl %ebp, 0x20(%rcx)
jg 0x19a64
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x218(%r14), %rsi
movq 0x220(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6c2a
leaq 0xc07b(%rip), %rsi      # 0x25a28
movq %r14, %rdi
callq 0x4840
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xc04a(%rip), %rsi      # 0x25a0f
leaq 0xc048(%rip), %rdx      # 0x25a14
leaq 0x28(%rsp), %rdi
callq 0x579e
leaq 0x18b0b(%rip), %rdi     # 0x324e8
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x20f32
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19a0b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x19a22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ad06
movq (%rax), %r14
testq %r14, %r14
je 0x19a3f
movq %r14, %rdi
callq 0x10940
movl $0x50, %esi
movq %r14, %rdi
callq 0x4470
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c25c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c2da
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19a90
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x19a90
jmp 0x19a8d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x19aa7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::remove_from_fd_set(int)
void Server::remove_from_fd_set(int fd) {
  for (std::list<int>::iterator it = fd_set_.begin(); it != fd_set_.end(); it++) {
    if (*it == fd) {
      fd_set_.erase(it);
      break ;
    }
  }

  FD_CLR(fd, &master_fds_);

  if (fd == max_fd_)
    max_fd_ = *fd_set_.rbegin();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1f8(%rdi), %rax
movq %rax, %r15
movq (%r15), %r15
cmpq %rax, %r15
je 0x19aef
cmpl %r14d, 0x10(%r15)
jne 0x19ac5
decq 0x208(%rbx)
movq %r15, %rdi
callq 0x4710
movl $0x18, %esi
movq %r15, %rdi
callq 0x4470
movq $-0x2, %rax
movl %r14d, %ecx
rolq %cl, %rax
leal 0x3f(%r14), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
andq %rax, 0x78(%rbx,%rcx,8)
cmpl %r14d, 0x210(%rbx)
jne 0x19b2b
movq 0x200(%rbx), %rax
movl 0x10(%rax), %eax
movl %eax, 0x210(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Server.cpp
// Function: Server::check_timeout_disconnect(Client*)
void Server::check_timeout_disconnect(Client *client) {
  if (client->timeout()) {
    client->setupResponse(servers_, options_, 408);
  }

  if (client->disconnect()) {
    client->setupResponse(servers_, options_, 503);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x10e14
testb %al, %al
je 0x1a217
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
movl $0x198, %ecx            # imm = 0x198
callq 0x10a14
movq %rbx, %rdi
callq 0x10e76
testb %al, %al
je 0x1a23f
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
movl $0x1f7, %ecx            # imm = 0x1F7
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a14
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/Base64.cpp
// Function: ft::b64decode[abi:cxx11](void const*, unsigned long const&)
const std::string b64decode(const void *data, const size_t &len) {
    if (len == 0) return "";

    unsigned char *p = (unsigned char*)data;
    size_t j = 0,
      pad1 = len % 4 || p[len - 1] == '=',
      pad2 = pad1 && (len % 4 > 2 || p[len - 2] != '=');
    const size_t last = (len - pad1) / 4 << 2;
    std::string result(last / 4 * 3 + pad1 + pad2, '\0');
    unsigned char *str = (unsigned char*) &result[0];

    for (size_t i = 0; i < last; i += 4) {
      int n = ft::B64index[p[i]] << 18 | ft::B64index[p[i + 1]] << 12 | ft::B64index[p[i + 2]] << 6 | ft::B64index[p[i + 3]];
      str[j++] = n >> 16;
      str[j++] = n >> 8 & 0xFF;
      str[j++] = n & 0xFF;
    }
    if (pad1) {
      int n = ft::B64index[p[last]] << 18 | ft::B64index[p[last + 1]] << 12;
      str[j++] = n >> 16;
      if (pad2) {
        n |= ft::B64index[p[last + 2]] << 6;
        str[j++] = n >> 8 & 0xFF;
      }
    }
    return result;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r13
movq (%rdx), %r15
testq %r15, %r15
je 0x1c461
movq %rsi, %r14
movl %r15d, %ecx
andl $0x3, %ecx
movl $0x1, %eax
cmpq $0x3, %rcx
je 0x1c480
testq %rcx, %rcx
jne 0x1c44f
cmpb $0x3d, -0x1(%r14,%r15)
jne 0x1c48b
movb $0x1, %cl
movq %rcx, (%rsp)
cmpb $0x3d, -0x2(%r14,%r15)
setne %r12b
jmp 0x1c498
leaq 0x10(%r13), %rax
movq %rax, (%r13)
leaq 0x9608(%rip), %rdx      # 0x25a78
movq %r13, %rdi
movq %rdx, %rsi
callq 0x579e
jmp 0x1c56b
movb $0x1, %cl
movq %rcx, (%rsp)
movb $0x1, %r12b
jmp 0x1c498
xorl %eax, %eax
movq $0x0, (%rsp)
xorl %r12d, %r12d
movzbl %r12b, %esi
subq %rax, %r15
movq %r15, %rcx
shrq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rsi
addq %rcx, %rsi
leaq 0x10(%r13), %rax
movq %rax, (%r13)
xorl %ebp, %ebp
movq %r13, %rdi
xorl %edx, %edx
callq 0x4510
movq (%r13), %rax
andq $-0x4, %r15
je 0x1c527
xorl %ecx, %ecx
leaq 0x95a9(%rip), %rdx      # 0x25a80
xorl %ebp, %ebp
movzbl (%r14,%rcx), %esi
movl (%rdx,%rsi,4), %esi
shll $0x12, %esi
movzbl 0x1(%r14,%rcx), %edi
movl (%rdx,%rdi,4), %edi
shll $0xc, %edi
orl %esi, %edi
movzbl 0x2(%r14,%rcx), %esi
movl (%rdx,%rsi,4), %ebx
shll $0x6, %ebx
orl %edi, %ebx
movzbl 0x3(%r14,%rcx), %esi
orl (%rdx,%rsi,4), %ebx
movl %ebx, %esi
shrl $0x10, %esi
movb %sil, (%rax,%rbp)
movb %bh, 0x1(%rax,%rbp)
movb %bl, 0x2(%rax,%rbp)
addq $0x3, %rbp
addq $0x4, %rcx
cmpq %r15, %rcx
jb 0x1c4d9
cmpb $0x0, (%rsp)
je 0x1c56b
movzbl (%r14,%r15), %edx
leaq 0x9547(%rip), %rcx      # 0x25a80
movl (%rcx,%rdx,4), %esi
shll $0x12, %esi
movzbl 0x1(%r14,%r15), %edx
movl (%rcx,%rdx,4), %edx
shll $0xc, %edx
orl %edx, %esi
shrl $0x10, %esi
movb %sil, (%rax,%rbp)
testb %r12b, %r12b
je 0x1c56b
movzbl 0x2(%r14,%r15), %esi
movl (%rcx,%rsi,4), %ecx
shll $0x6, %ecx
orl %edx, %ecx
movb %ch, 0x1(%rax,%rbp)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::set_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void File::set_path(std::string path, bool negociation) {
  path_ = ft::unique_char(path);

  if (negociation)
    parseExtensionsNegociation();
  else
    parseExtensions();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x6c2a
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x243cc
leaq 0x80(%rbx), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x4570
movq (%r14), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1c7bf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c7d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
testb %bpl, %bpl
je 0x1c7e5
callq 0x1c8c0
jmp 0x1c7ea
callq 0x1cbbe
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c80f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::close()
void File::close() {
  if (fd_ <= 0)
    return ;

  ::close(fd_);
  fd_ = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
jle 0x1c8bd
callq 0x4850
movl $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::parseExtensions()
void File::parseExtensions() {
  std::string file = path_.substr(path_.find_last_of("/") + 1);

  if (file.empty())
    return;

  file_name_full_ = file;

  file_name_ = file.substr(0, file.find("."));
  file.erase(0, file.find("."));
  if (file.find_last_of(".") != std::string::npos) {
    int last = file.find_last_of(".");
    mime_ext_ = file.substr(last);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
leaq 0x89bc(%rip), %rsi      # 0x25594
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x4870
leaq 0x1(%rax), %rdx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x4490
cmpq $0x0, 0x8(%r15)
je 0x1cd17
leaq 0x28(%rbx), %rdi
movq %rsp, %rsi
callq 0x4230
leaq 0x8da4(%rip), %rsi      # 0x259c7
movq %rsp, %r14
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x4780
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4490
leaq 0x8(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x4570
movq (%r14), %rdi
leaq 0x30(%rsp), %r15
cmpq %r15, %rdi
je 0x1cc72
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8d4e(%rip), %rsi      # 0x259c7
movq %rsp, %r14
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x4780
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x40b0
leaq 0x8d28(%rip), %rsi      # 0x259c7
movq %rsp, %rdi
movl $0x1, %ecx
movq $-0x1, %rdx
callq 0x4870
cmpq $-0x1, %rax
je 0x1cd17
leaq 0x8d07(%rip), %rsi      # 0x259c7
movq %rsp, %r14
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x4870
movslq %eax, %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x4490
addq $0x48, %rbx
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4570
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x1cd17
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd32
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1cd40
jmp 0x1cd40
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cd5e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::open(bool)
bool File::open(bool create) {
  close();

  if (create)
    fd_ = ::open(path_.c_str(), O_CREAT | O_RDWR | O_TRUNC, 00755);
  else
    fd_ = ::open(path_.c_str(), O_RDONLY);
  return fd_ > 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
jle 0x1cd7f
callq 0x4850
movl $0x0, (%rbx)
movq 0x80(%rbx), %rdi
testb %bpl, %bpl
je 0x1cd9e
movl $0x242, %esi            # imm = 0x242
movl $0x1ed, %edx            # imm = 0x1ED
xorl %eax, %eax
callq 0x4320
jmp 0x1cda7
xorl %esi, %esi
xorl %eax, %eax
callq 0x4320
movl %eax, (%rbx)
testl %eax, %eax
setg %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: set_width(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string set_width(size_t width, std::string str) {
  size_t len = str.length();
  std::string w;

  if (len > width)
    width = 0;

  for (size_t i = 0; i < width - len; i++) {
    w += " ";
  }
  w += str;
  return w;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdx), %rdx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq %rsi, %rdx
cmovaq %rax, %r15
subq %rdx, %r15
je 0x1d955
leaq 0x7f46(%rip), %r12      # 0x25887
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4840
decq %r15
jne 0x1d941
movq 0x8(%r14), %rdx
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4100
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x1d96f
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x1d986
movq (%r13), %rsi
incq %rsi
callq 0x4470
movq %r14, %rdi
callq 0x4790
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: sort_auto_listing(auto_listing, auto_listing)
bool sort_auto_listing(auto_listing i, auto_listing j) {
  if (i.is_dir_ && j.is_dir_) {
    return (i.name_ < j.name_);
  } else if (!i.is_dir_ && !j.is_dir_)
    return (i.name_ < j.name_);
  return (i.is_dir_ > j.is_dir_);
}

// Assembly:
pushq %rax
movb 0x20(%rdi), %al
movb 0x20(%rsi), %cl
cmpb $0x1, %al
jne 0x1d9a4
testb %cl, %cl
je 0x1d9a8
callq 0x4040
jmp 0x1d9b4
testb %cl, %cl
je 0x1d9af
cmpb %cl, %al
seta %al
jmp 0x1d9b7
callq 0x4040
shrl $0x1f, %eax
popq %rcx
retq
jmp 0x1d9bb
movq %rax, %rdi
callq 0x5793
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::last_modified[abi:cxx11]()
std::string File::last_modified() {
  struct stat statbuf;
  struct tm	*tm;
  char buf[32];

  stat(path_.c_str(), &statbuf);
  tm = gmtime(&statbuf.st_mtime);
  int ret = strftime(buf, 32, "%a, %d %b %Y %T GMT", tm);
  return std::string(buf, ret);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movq 0x80(%rsi), %rdi
leaq 0x28(%rsp), %rsi
callq 0x43e0
leaq 0x80(%rsp), %rdi
callq 0x43a0
leaq 0x7651(%rip), %rdx      # 0x25f0d
movq %rsp, %r14
movl $0x20, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x4380
cltq
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq (%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x579e
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/get_next_line.cpp
// Function: ft_strjoin(char const*, char const*)
char	*ft_strjoin(char const *s1, char const *s2)
{
	char	*str;

	if (!(str = (char*)ft_calloc(strlen(s1) + strlen(s2)
		+ 1, sizeof(char))))
		return (NULL);
	strcpy(str, s1);
	strcat(str, s2);
	return (str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
movq %rbx, %rdi
callq 0x4190
leaq (%r15,%rax), %rsi
incq %rsi
movl $0x1, %edi
callq 0x42a0
movq %rax, %r15
testq %rax, %rax
je 0x20cc9
movq %r15, %rdi
movq %r14, %rsi
callq 0x4410
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x47a0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/get_next_line.cpp
// Function: ft_substr(char const*, unsigned int, unsigned long)
char	*ft_substr(char const *s, unsigned int start, size_t len)
{
	char	*str;
	int		i;

	i = 0;
	if (!s)
		return (NULL);
	if (start > strlen(s))
		return (NULL);
	if (!(str = (char*)ft_calloc(len + 1, sizeof(char))))
		return (NULL);
	while (s[start] && len)
	{
		str[i] = s[start];
		i++;
		start++;
		len--;
	}
	str[i] = '\0';
	return (str);
}

// Assembly:
testq %rdi, %rdi
je 0x20d60
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %r12d
callq 0x4190
cmpq %r12, %rax
jb 0x20d5c
leaq 0x1(%rbx), %rsi
movl $0x1, %edi
callq 0x42a0
testq %rax, %rax
je 0x20d5c
movb (%r15,%r12), %cl
testb %cl, %cl
sete %dl
testq %rbx, %rbx
sete %sil
orb %dl, %sil
jne 0x20d63
decq %rbx
incl %r14d
xorl %edx, %edx
movb %cl, (%rax,%rdx)
leaq 0x1(%rdx), %rsi
leal (%r14,%rdx), %ecx
movb (%r15,%rcx), %cl
testb %cl, %cl
je 0x20d58
cmpq %rdx, %rbx
movq %rsi, %rdx
jne 0x20d3d
movl %esi, %ecx
jmp 0x20d65
xorl %eax, %eax
jmp 0x20d69
xorl %eax, %eax
retq
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/get_next_line.cpp
// Function: ft_is_in_stri(char, char*)
int		ft_is_in_stri(char c, char *str)
{
	int		i;

	i = 0;
	while (str[i])
	{
		if (str[i] == c)
			return (i);
		i++;
	}
	return (-1);
}

// Assembly:
movb (%rsi), %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %dl, %dl
je 0x20d92
xorl %ecx, %ecx
cmpb %dil, %dl
je 0x20d93
movb 0x1(%rsi,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x20d82
retq
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/get_next_line.cpp
// Function: get_next_line(int, char**)
int				get_next_line(int fd, char **line)
{
	static char		*s[10240];
	char			buf[BUFFER_SIZE + 1];
	int				ret;
	char			*tmp;

	if (fd < 0 || !line || BUFFER_SIZE < 1 || read(fd, buf, 0) < 0)
		return (-1);
	if (!s[fd] && !(s[fd] = (char*)ft_calloc(1, sizeof(char *))))
		return (-1);
	while ((ft_is_in_stri('\n', s[fd])) < 0 && (ret = read(fd, buf, BUFFER_SIZE)) > 0)
	{
		buf[ret] = '\0';
		tmp = s[fd];
		s[fd] = ft_strjoin(s[fd], buf);
		free(tmp);
	}
	if (s[fd])
		*line = ft_substr(s[fd], 0, ft_strlen_c(s[fd], '\n'));
	if (!handle_line(s, fd))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
testl %edi, %edi
sets %al
testq %rsi, %rsi
sete %cl
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x20f10
movq %rsi, %rbx
movl %edi, %ebp
movq %rsp, %rsi
xorl %edx, %edx
callq 0x45e0
testq %rax, %rax
js 0x20f10
movl %ebp, %r13d
leaq 0x117be(%rip), %r12     # 0x325a0
movq (%r12,%r13,8), %r14
testq %r14, %r14
jne 0x20e0a
movl $0x1, %edi
movl $0x8, %esi
callq 0x42a0
movq %rax, %r14
movq %rax, (%r12,%r13,8)
testq %rax, %rax
je 0x20f10
movb (%r14), %al
testb %al, %al
je 0x20e22
leaq 0x1(%r14), %rcx
cmpb $0xa, %al
je 0x20e65
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x20e15
movl $0x80, %edx
movl %ebp, %edi
movq %rsp, %r14
movq %r14, %rsi
callq 0x45e0
testl %eax, %eax
jle 0x20e61
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, (%rsp,%rax)
movq (%r12,%r13,8), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x20c7a
movq %rax, %r14
movq %rax, (%r12,%r13,8)
movq %r15, %rdi
callq 0x4550
jmp 0x20e0a
movq (%r12,%r13,8), %r14
movq $-0x1, %rdx
movzbl 0x1(%r14,%rdx), %eax
incq %rdx
cmpl $0xa, %eax
je 0x20e7e
testl %eax, %eax
jne 0x20e6c
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x20cea
movq %rax, (%rbx)
movq (%r12,%r13,8), %rbx
movb (%rbx), %al
testb %al, %al
je 0x20ebe
leaq 0x1(%rbx), %rcx
movl %eax, %edx
cmpb $0xa, %dl
je 0x20ed0
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x20e9e
movq %rbx, %rdi
callq 0x4550
movq $0x0, (%r12,%r13,8)
jmp 0x20f0a
movq %rbx, %rdi
callq 0x4550
movq $0x0, (%r12,%r13,8)
jmp 0x20f10
movl $0x1, %r14d
cmpb $0xa, %al
je 0x20ee8
movb (%rbx,%r14), %al
incq %r14
testb %al, %al
jne 0x20ed6
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x4190
movq %rbx, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq 0x20cea
movq %rax, (%r12,%r13,8)
movq %rbx, %rdi
callq 0x4550
movl $0x1, %r15d
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/Logger.cpp
// Function: Logger::print(LogLevel, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void Logger::print(LogLevel level, std::string str, std::string color, bool error) {
  (void)error;
  if (level <= level_) {
    struct tm	*tm;
    time_t rawtime;
    char buf[32];

    time(&rawtime);
    tm = localtime (&rawtime);
    int ret = strftime(buf, 32, "%T", tm);
    buf[ret] = '\0';

    pthread_mutex_lock(&g_write);

    if (error) {
      std::cerr << CYAN << "[" << buf << "] " << RESET;
      std::cerr << color << str << RESET;
      std::cerr << "\n";
    } else {
      std::cout << CYAN << "[" << buf << "] " << RESET;
      std::cout << color << str << RESET;
      std::cout << "\n";
    }
    pthread_mutex_unlock(&g_write);
  }
}

// Assembly:
cmpl %esi, (%rdi)
jl 0x2106e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x43f0
movq %r14, %rdi
callq 0x4340
leaq 0x4fe0(%rip), %rdx      # 0x25f4d
leaq 0x10(%rsp), %r13
movl $0x20, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0x4380
cltq
movb $0x0, 0x10(%rsp,%rax)
leaq 0x11518(%rip), %r14     # 0x324a8
movq %r14, %rdi
callq 0x4610
testb %bpl, %bpl
je 0x20fa6
movq 0x11044(%rip), %r12     # 0x31fe8
jmp 0x20fad
movq 0x1100b(%rip), %r12     # 0x31fb8
leaq 0x4f9c(%rip), %rsi      # 0x25f50
movl $0x5, %edx
movq %r12, %rdi
callq 0x44e0
leaq 0x45ea(%rip), %rsi      # 0x255b2
movl $0x1, %edx
movq %r12, %rdi
callq 0x44e0
movq %r13, %rdi
callq 0x4190
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x44e0
leaq 0x4f64(%rip), %rsi      # 0x25f56
movl $0x2, %edx
movq %r12, %rdi
callq 0x44e0
leaq 0x4f53(%rip), %r13      # 0x25f59
movl $0x4, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x44e0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x44e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x44e0
movl $0x4, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x44e0
leaq 0x41c2(%rip), %rsi      # 0x2520d
movl $0x1, %edx
movq %r12, %rdi
callq 0x44e0
movq %r14, %rdi
callq 0x4350
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/MimeTypes.cpp
// Function: MimeTypes::getType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string MimeTypes::getType(std::string extension) {
  if (!extension.length())
    return "application/octet-stream";
  if (mimes_.count(extension))
    return mimes_[extension];
  return "application/octet-stream";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdx)
je 0x237b3
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x12402
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x237b3
movq %r15, %rdi
movq %r14, %rsi
callq 0xa8c4
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6c2a
jmp 0x237d0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2773(%rip), %rsi      # 0x25f34
leaq 0x2784(%rip), %rdx      # 0x25f4c
movq %rbx, %rdi
callq 0x579e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/StringUtils.cpp
// Function: ft::trim_left(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::string trim_left(std::string str, char c) {
    size_t startpos = str.find_first_not_of(c);
    if (startpos != std::string::npos)
      str.erase(0, startpos);
    return str;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x43d0
cmpq $-0x1, %rax
je 0x24213
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x40b0
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x24232
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x24238
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/StringUtils.cpp
// Function: ft::trim_right(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::string trim_right(std::string str, char c) {
    size_t lastpos = str.find_last_not_of(c);
    if (lastpos == std::string::npos)
      return "";
    str.erase(lastpos + 1, str.length());
    return str;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
movq $-0x1, %rdx
callq 0x42d0
cmpq $-0x1, %rax
je 0x242ac
incq %rax
movq 0x8(%r14), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x40b0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x242c7
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x242cd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x17be(%rip), %rdx      # 0x25a78
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x579e
jmp 0x242e5
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/StringUtils.cpp
// Function: ft::to_hex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
size_t to_hex(std::string &str) {
    std::stringstream ss;
    size_t hex;

    ss << std::hex << str;
    ss >> hex;

    return hex;
  }

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x42f0
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x30(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x30(%rsp,%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x44e0
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x4240
movq (%rsp), %rbx
movq 0xdc45(%rip), %rsi      # 0x31f88
leaq 0x8(%rsp), %rdi
callq 0x4330
leaq 0x88(%rsp), %rdi
callq 0x4130
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
movq %rax, %rbx
movq 0xdc18(%rip), %rsi      # 0x31f88
leaq 0x8(%rsp), %rdi
callq 0x4330
leaq 0x88(%rsp), %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x4790
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/StringUtils.cpp
// Function: ft::strdup(char const*)
char *strdup(const char *str) {
    if (!str)
      return NULL;
    char *newstr = (char*)malloc(sizeof(char) * (strlen(str) + 1));

    if (!newstr)
      return NULL;

    size_t i = 0;

    while (str[i]) {
      newstr[i] = str[i];
      i++;
    }

    newstr[i] = '\0';
    return newstr;
  }

// Assembly:
testq %rdi, %rdi
je 0x243c5
pushq %rbx
movq %rdi, %rbx
callq 0x4190
leaq 0x1(%rax), %rdi
callq 0x45a0
testq %rax, %rax
je 0x243c8
movb (%rbx), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x243bf
movb %dl, (%rax,%rcx)
movb 0x1(%rbx,%rcx), %dl
incq %rcx
jmp 0x243af
movb $0x0, (%rax,%rcx)
jmp 0x243ca
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/StringUtils.cpp
// Function: ft::unique_char(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string unique_char(std::string str) {
    std::string::iterator it = str.begin();

    while (it != str.end()) {
      if (*it == '/') {
        it++;
        while (it != str.end() && *it == '/') {
          it = str.erase(it);
        }
      }
      else
        it++;
    }
    return str;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x24431
movq %rax, %rdx
cmpb $0x2f, (%rdx)
leaq 0x1(%rdx), %rdx
jne 0x24426
leaq (%rax,%rcx), %rsi
cmpq %rsi, %rdx
je 0x24426
cmpb $0x2f, (%rdx)
jne 0x24426
movq %rdx, %r15
subq %rax, %r15
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4530
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq (%rax,%r15), %rdx
cmpq %rcx, %r15
jne 0x243f8
movq %r15, %rcx
leaq (%rax,%rcx), %rsi
cmpq %rsi, %rdx
jne 0x243e6
jmp 0x24433
xorl %ecx, %ecx
leaq 0x10(%r14), %rsi
movq %rsi, (%r14)
leaq 0x10(%rbx), %rdx
cmpq %rdx, %rax
je 0x2444f
movq %rax, (%r14)
movq (%rdx), %rax
movq %rax, 0x10(%r14)
jmp 0x24455
movups (%rdx), %xmm0
movups %xmm0, (%rsi)
movq %rcx, 0x8(%r14)
movq %rdx, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/Utils.cpp
// Function: isValidMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isValidMethod(std::string const &str) {
  return (str == "GET" ||
          str == "POST" ||
          str == "HEAD" ||
          str == "PUT" ||
          str == "DELETE");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x10fd(%rip), %rsi      # 0x2579b
callq 0x40f0
movb $0x1, %bl
testl %eax, %eax
je 0x246f6
leaq 0xedf(%rip), %rsi       # 0x2558f
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x246f6
leaq 0x10dc(%rip), %rsi      # 0x2579f
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x246f6
leaq 0x10c1(%rip), %rsi      # 0x25797
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x246f6
leaq 0x10bb(%rip), %rsi      # 0x257a4
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/Utils/Utils.cpp
// Function: isValidDirective(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isValidDirective(std::string const &str) {
  return (str == "listen" ||
          str == "server_name" ||
          str == "root" ||
          str == "auth" ||
          str == "error_page" ||
          str == "upload" ||
          str == "autoindex" ||
          str == "index" ||
          str == "cgi" ||
          str == "cgi_bin");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xc6b(%rip), %rsi       # 0x25379
callq 0x40f0
movb $0x1, %bl
testl %eax, %eax
je 0x247d1
leaq 0xc5c(%rip), %rsi       # 0x25380
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc61(%rip), %rsi       # 0x2539c
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc45(%rip), %rsi       # 0x25397
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc27(%rip), %rsi       # 0x2538c
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc40(%rip), %rsi       # 0x253b8
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc23(%rip), %rsi       # 0x253ae
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc14(%rip), %rsi       # 0x253b2
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xc0e(%rip), %rsi       # 0x253bf
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
je 0x247d1
leaq 0xbff(%rip), %rsi       # 0x253c3
movq %r14, %rdi
callq 0x40f0
testl %eax, %eax
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq