// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/FileReader.cpp
// Function: FileReader::FileReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Logger&)
FileReader::FileReader(const string& path, Logger& logger) :
m_file(NULL),
m_fileBytesRead(0),
m_logger(logger)
{
  m_lengthKnown = false;
  m_done = false;
  m_httpCode = 0;
  m_contentLength = 0;
  m_bytesRead = 0;

  if (openFile(path))
  {
    m_contentType = FilenameResolver::getContentType(path);
    m_headerBuffer += "Content-Length: " + Utils::llToString(m_contentLength) + "\r\n";
    m_headerBuffer += "Content-Type: " + m_contentType + "\r\n";
    m_headerBuffer += "\r\n";
    m_httpCode = 200;
  }

  // If openFile failed, it will have set an appropriate error code.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x692d(%rip), %rax      # 0xfd20
movq %rax, (%rdi)
leaq 0x30(%rdi), %r14
leaq 0x40(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movq %rax, 0x50(%rsp)
movq %rax, 0x30(%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movb %al, 0x40(%rdi)
leaq 0x50(%rdi), %r15
leaq 0x60(%rdi), %rbp
movq %rbp, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movb %al, 0x60(%rdi)
movq %rdx, 0x70(%rdi)
movw $0x0, 0x10(%rdi)
movl $0x0, 0x14(%rdi)
movq %rax, 0x8(%rdi)
movq %rax, 0x18(%rdi)
callq 0x974a
testb %al, %al
je 0x965e
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x9118
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3360
movq (%r12), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
je 0x9488
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x8(%rbx), %rsi
leaq 0x58(%rsp), %rdi
callq 0xabbc
leaq 0x2f33(%rip), %rcx      # 0xc3d0
leaq 0x58(%rsp), %rdi
movl $0x10, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x32e0
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x94d9
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x94e1
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2d30(%rip), %rsi      # 0xc234
callq 0x3560
movq %r13, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x952c
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x9534
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x30f0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9575
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x958c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95a7
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x2e33(%rip), %rsi      # 0xc3e1
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x8993
leaq 0x2c72(%rip), %rsi      # 0xc234
leaq 0x30(%rsp), %rdi
callq 0x3560
movq %r13, 0x10(%rsp)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x95ef
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x95fa
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %r13, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
callq 0x30f0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9631
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x9648
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x2be5(%rip), %rsi      # 0xc234
movq %r15, %rdi
callq 0x3560
movl $0xc8, 0x14(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9690
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x9690
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x970a
movq 0x40(%rsp), %rsi
jmp 0x96f7
jmp 0x9705
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x96c6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x96c6
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x96e4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x96e4
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x970a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x970a
jmp 0x9705
jmp 0x9705
movq %rax, 0x8(%rsp)
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x971e
movq (%rbp), %rsi
incq %rsi
callq 0x3290
movq (%r14), %rdi
cmpq 0x50(%rsp), %rdi
je 0x9738
movq 0x50(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x8a2e
movq 0x8(%rsp), %rdi
callq 0x3520