// File: /workspace/github_cpp_makefile_star2_O2/tylerkaraszewski[P]Argyle/FilenameResolver.cpp
// Function: FilenameResolver::getContentType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string FilenameResolver::getContentType(const string& filename)
{
  string contentType = "text/plain";
  size_t offset = filename.find_last_of('.');
  string ext = filename.substr(offset + 1);
  HttpRequest::toLower(ext);
  if (ext == "html")
    contentType = "text/html";
  else if (ext == "gz")
    contentType = "application/x-compressed";
  else if (ext == "avi")
    contentType = "video/avi";
  else if (ext == "mp4")
    contentType = "video/mp4";
  else if (ext == "zip")
    contentType = "application/zip";
  else if (ext == "js")
    contentType = "application/x-javascript";
  else if (ext == "css")
    contentType = "text/css";
  else if (ext == "png")
    contentType = "image/png";
  else if (ext == "jpg")
    contentType = "image/jpeg";
  else if (ext == "xml")
    contentType = "application/xml";
  else if (ext == "pdf")
    contentType = "application/pdf";
  else if (ext == "ico")
    contentType = "image/png"; // hack for favicons.

  return contentType;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2206(%rip), %rsi      # 0x9320
movq %rsp, %rdx
callq 0x438c
pushq $0x2e
popq %rsi
pushq $-0x1
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x35b0
leaq 0x1(%rax), %rdx
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x32e0
movq %rsp, %rdi
callq 0x5e68
leaq 0x21c6(%rip), %rsi      # 0x931b
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x716d
leaq 0x21c3(%rip), %r14      # 0x932b
jmp 0x72a8
leaq 0x21c1(%rip), %rsi      # 0x9335
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x718c
leaq 0x21b1(%rip), %r14      # 0x9338
jmp 0x72a8
leaq 0x21c4(%rip), %rsi      # 0x9357
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x71ab
leaq 0x21ab(%rip), %r14      # 0x9351
jmp 0x72a8
leaq 0x21af(%rip), %rsi      # 0x9361
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x71ca
leaq 0x2196(%rip), %r14      # 0x935b
jmp 0x72a8
leaq 0x21a0(%rip), %rsi      # 0x9371
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x71e9
leaq 0x2181(%rip), %r14      # 0x9365
jmp 0x72a8
leaq 0x2185(%rip), %rsi      # 0x9375
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x7208
leaq 0x2175(%rip), %r14      # 0x9378
jmp 0x72a8
leaq 0x2187(%rip), %rsi      # 0x9396
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x7227
leaq 0x216f(%rip), %r14      # 0x9391
jmp 0x72a8
leaq 0x2172(%rip), %rsi      # 0x93a0
movq %rsp, %rdi
callq 0x5f4f
leaq 0x215d(%rip), %r14      # 0x939a
testb %al, %al
jne 0x72a8
leaq 0x215c(%rip), %rsi      # 0x93a4
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x725d
leaq 0x214d(%rip), %r14      # 0x93a8
jmp 0x72a8
leaq 0x20a0(%rip), %rsi      # 0x9304
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x7279
leaq 0x213c(%rip), %r14      # 0x93b3
jmp 0x72a8
leaq 0x214f(%rip), %rsi      # 0x93cf
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x7295
leaq 0x2130(%rip), %r14      # 0x93c3
jmp 0x72a8
leaq 0x2137(%rip), %rsi      # 0x93d3
movq %rsp, %rdi
callq 0x5f4f
testb %al, %al
je 0x72b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3570
movq %rsp, %rdi
callq 0x35d8
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x72d8
movq %rax, %r14
movq %rsp, %rdi
callq 0x35d8
movq %rbx, %rdi
callq 0x35d8
movq %r14, %rdi
callq 0x3510