// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/ErrorReader.cpp
// Function: ErrorReader::ErrorReader(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ErrorReader::ErrorReader(int httpErrorCode, const std::string& extraMsg, const std::string& extraHeaders)
{
  m_lengthKnown = true;
  m_done = false;
  m_httpCode = httpErrorCode;
  m_bytesRead = 0;
  
  string num = Utils::llToString(httpErrorCode);
  string msg = getErrorMessage(httpErrorCode);
  string extMsg = msg;
  if (!extraMsg.empty())
  {
    extMsg += "\n" + extraMsg;
  }
  extMsg += "\n";
  m_contentLength = extMsg.size();
  m_dataBuffer += "Content-Length: " + Utils::llToString(m_contentLength) + "\r\n";
  m_dataBuffer += "Content-Type: text/plain\r\n";
  m_dataBuffer += extraHeaders;
  m_dataBuffer += "\r\n";
  m_dataBuffer += extMsg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5d15(%rip), %rax      # 0xfd78
movq %rax, (%rdi)
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %r13
movq %r13, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
movw $0x1, 0x10(%rdi)
movl %esi, 0x14(%rdi)
movq %rax, 0x18(%rdi)
movslq %esi, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xabbc
leaq 0x68(%rsp), %rdi
movl %ebp, %esi
callq 0xa406
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x76da
cmpq $0x0, 0x8(%r12)
je 0xa110
leaq 0x2161(%rip), %rsi      # 0xc235
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0x8993
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x30f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa110
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x211e(%rip), %rsi      # 0xc235
leaq 0x28(%rsp), %rdi
callq 0x3560
movq 0x30(%rsp), %rsi
movq %rsi, 0x8(%rbx)
leaq 0x88(%rsp), %rdi
callq 0xabbc
leaq 0x2292(%rip), %rcx      # 0xc3d0
leaq 0x88(%rsp), %rdi
movl $0x10, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x32e0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa17d
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0xa185
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x208c(%rip), %rsi      # 0xc234
callq 0x3560
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa1d4
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xa1db
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x30f0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa21c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xa233
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa254
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x227b(%rip), %rsi      # 0xc4d6
movq %r14, %rdi
callq 0x3560
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x30f0
leaq 0x1fbb(%rip), %rsi      # 0xc234
movq %r14, %rdi
callq 0x3560
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x30f0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa2af
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa2ca
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa2eb
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa389
movq 0x18(%rsp), %rsi
jmp 0xa36b
jmp 0xa386
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa336
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0xa336
movq %rax, %r15
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xa352
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0xa352
movq %rax, %r15
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa389
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0xa389
jmp 0xa386
movq %rax, %r15
jmp 0xa3a5
movq %rax, %r15
jmp 0xa3c0
movq %rax, %r15
jmp 0xa3e1
movq %rax, %r15
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa3a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3c0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3e1
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%r14), %rdi
cmpq %r13, %rdi
je 0xa3f5
movq (%r13), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x8a2e
movq %r15, %rdi
callq 0x3520
nop