// File: /workspace/github_cpp_makefile_star2_O3/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 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x31e4(%rip), %rsi      # 0xc319
leaq 0x31e7(%rip), %rdx      # 0xc323
callq 0x513a
movq %r14, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x3590
leaq 0x1(%rax), %rdx
movq %rsp, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x32b0
movq %rsp, %rdi
callq 0x74f0
leaq 0x319a(%rip), %rsi      # 0xc314
movq %rsp, %rdi
callq 0x30d0
movl $0x9, %r14d
testl %eax, %eax
je 0x9295
leaq 0x3197(%rip), %rsi      # 0xc32e
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x929e
leaq 0x31a2(%rip), %rsi      # 0xc350
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x92ad
leaq 0x3195(%rip), %rsi      # 0xc35a
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x92b6
leaq 0x318e(%rip), %rsi      # 0xc36a
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x92bf
leaq 0x317b(%rip), %rsi      # 0xc36e
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x9305
leaq 0x3185(%rip), %rsi      # 0xc38f
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x930e
leaq 0x3178(%rip), %rsi      # 0xc399
movq %rsp, %rdi
callq 0x30d0
leaq 0x3163(%rip), %r14      # 0xc393
testl %eax, %eax
je 0x9330
leaq 0x315e(%rip), %rsi      # 0xc39d
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x9317
leaq 0x30a7(%rip), %rsi      # 0xc2fd
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x9320
leaq 0x315b(%rip), %rsi      # 0xc3c8
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
je 0x9329
leaq 0x3148(%rip), %rsi      # 0xc3cc
movq %rsp, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x92dd
jmp 0x9330
leaq 0x3088(%rip), %rcx      # 0xc324
jmp 0x92cc
movl $0x18, %r14d
leaq 0x3086(%rip), %rcx      # 0xc331
jmp 0x92cc
leaq 0x3096(%rip), %rcx      # 0xc34a
jmp 0x92cc
leaq 0x3097(%rip), %rcx      # 0xc354
jmp 0x92cc
movl $0xf, %r14d
leaq 0x3092(%rip), %rcx      # 0xc35e
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %r8
callq 0x3440
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92f8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3065(%rip), %r14      # 0xc371
jmp 0x9330
leaq 0x3075(%rip), %r14      # 0xc38a
jmp 0x9330
leaq 0x3083(%rip), %r14      # 0xc3a1
jmp 0x9330
leaq 0x3085(%rip), %r14      # 0xc3ac
jmp 0x9330
leaq 0x308c(%rip), %r14      # 0xc3bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3390
jmp 0x92dd
movq %rax, %r14
jmp 0x9360
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9360
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9373
movq (%r15), %rsi
incq %rsi
callq 0x3290
movq %r14, %rdi
callq 0x3520