// File: /workspace/github_cpp_makefile_star2_O1/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 0x68c5(%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 0x97ba
testb %al, %al
je 0x96cd
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x9180
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3360
movq (%r12), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
je 0x94f0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x8(%rbx), %rsi
leaq 0x58(%rsp), %rdi
callq 0xac34
leaq 0x2ecb(%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 0x9541
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x9549
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 0x2cc8(%rip), %rsi      # 0xc234
callq 0x3560
movq %r13, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9594
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x959c
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 0x95dd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x95f4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x960f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x2dcb(%rip), %rsi      # 0xc3e1
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x89eb
leaq 0x2c0a(%rip), %rsi      # 0xc234
leaq 0x30(%rsp), %rdi
callq 0x3560
movq %r13, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9657
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x965f
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 0x96a0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x96b7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x2b76(%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 0x96ff
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x96ff
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x9779
movq 0x40(%rsp), %rsi
jmp 0x9766
jmp 0x9774
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9735
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x9735
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x9753
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x9753
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9779
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x9779
jmp 0x9774
jmp 0x9774
movq %rax, 0x8(%rsp)
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x978d
movq (%rbp), %rsi
incq %rsi
callq 0x3290
movq (%r14), %rdi
cmpq 0x50(%rsp), %rdi
je 0x97a7
movq 0x50(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x8a86
movq 0x8(%rsp), %rdi
callq 0x3520
nop