// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/Response.cpp
// Function: Response::createResponse()
void Response::createResponse() {
  headers_["Server"] = "webserv/1.0";

  if (config_.getMethod() == "HEAD")
    body_.clear();

  if (status_code_ < 400 && redirect_code_)
    status_code_ = redirect_code_;

  std::string status_code;

  if (headers_.count("Status")) {
    status_code = headers_["Status"];
    headers_.erase("Status");
  }
  else
    status_code = ft::to_string(status_code_) + " " + g_status[status_code_];

  response_ = response_ + config_.getProtocol() + " " + status_code + "\r\n";

  headers_["Date"] = ft::get_http_date();

  for (std::map<std::string, std::string>::iterator it = headers_.begin(); it != headers_.end(); it++)
    response_ += it->first + ": " + it->second + "\r\n";

  response_ += "\r\n";

  header_size_ = response_.size();

  if (!body_.empty()) {
    body_size_ = body_.size();
    response_ += body_;
    body_.clear();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r12
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xfd04(%rip), %rsi      # 0x25816
leaq 0xfd03(%rip), %rdx      # 0x2581c
leaq 0x68(%rsp), %rdi
callq 0x579e
leaq 0x190(%r12), %r14
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0xfd8b(%rip), %rcx      # 0x258ce
movl $0xb, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x15b6a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4470
movq (%r12), %rdi
callq 0x9f5a
leaq 0xfc25(%rip), %rsi      # 0x2579f
movq %rax, %rdi
callq 0x40f0
testl %eax, %eax
jne 0x15b9d
movq $0x0, 0xe8(%r12)
movq 0xe0(%r12), %rax
movb $0x0, (%rax)
cmpl $0x18f, 0xb8(%r12) # imm = 0x18F
jg 0x15bbf
movl 0x128(%r12), %eax
testl %eax, %eax
je 0x15bbf
movl %eax, 0xb8(%r12)
movq %r15, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movb $0x0, 0x78(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xfcf8(%rip), %rsi      # 0x258da
leaq 0xfcf7(%rip), %rdx      # 0x258e0
movq %rsp, %rdi
callq 0x579e
movq %rsp, %rsi
movq %r14, %rdi
callq 0x10748
movq %rax, %rbx
leaq 0x198(%r12), %rax
movq %rax, 0x88(%rsp)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15c2a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
cmpq 0x88(%rsp), %rbx
je 0x15cd9
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0xfc90(%rip), %rsi      # 0x258da
leaq 0xfc8f(%rip), %rdx      # 0x258e0
callq 0x579e
movq %rsp, %rsi
movq %r14, %rdi
callq 0x105ca
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x4230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15c89
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0xfc3f(%rip), %rsi      # 0x258da
leaq 0xfc3e(%rip), %rdx      # 0x258e0
callq 0x579e
movq %rsp, %rsi
movq %r14, %rdi
callq 0x181a0
movq %r14, %rdi
movq %rax, %rsi
callq 0x18254
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15e03
movq 0x10(%rsp), %rsi
jmp 0x15dfb
movl 0xb8(%r12), %esi
leaq 0x40(%rsp), %rdi
callq 0x6a8a
leaq 0xfb95(%rip), %rsi      # 0x25887
leaq 0x40(%rsp), %rdi
callq 0x4840
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15d23
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x15d2a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0xb8(%r12), %esi
leaq 0x1c7e7(%rip), %rdi     # 0x32538
callq 0x23fc6
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
callq 0x4100
leaq 0x10(%rsp), %r13
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15d8d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x15d95
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rsp, %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x4570
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x15dd1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x15de8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15e03
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
movq (%r12), %rdi
callq 0x9f7c
leaq 0xc0(%r12), %rsi
leaq 0x98(%rsp), %rdi
movq %rsi, 0x60(%rsp)
movq %rax, %rdx
callq 0x17c68
leaq 0xfa57(%rip), %rsi      # 0x25887
leaq 0x98(%rsp), %rdi
callq 0x4840
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15e64
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x15e6b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x4100
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15ebd
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x15ec4
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xf8f8(%rip), %rsi      # 0x257df
callq 0x4840
leaq 0x10(%rsp), %r13
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15f12
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x15f1a
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rsp, %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x4570
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x15f56
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x15f6d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x15f84
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15fa5
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rsp, %rdi
callq 0x24a6b
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xf925(%rip), %rsi      # 0x258e1
leaq 0xf922(%rip), %rdx      # 0x258e5
callq 0x579e
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x105ca
movq %rsp, %rsi
movq %rax, %rdi
callq 0x4570
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x15ff7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbp, %r13
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16015
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r12, 0x90(%rsp)
movq 0x1a8(%r12), %r14
cmpq 0x88(%rsp), %r14
je 0x16181
leaq 0x40(%rsp), %r12
leaq 0xf7a0(%rip), %rbp      # 0x257df
leaq 0x20(%rsp), %rbx
movq %r13, 0x40(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6c2a
movq %r12, %rdi
leaq 0xf9e8(%rip), %rsi      # 0x25a4e
callq 0x4840
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %r12, %rdi
callq 0x4100
movq %r15, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1609e
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x160a5
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4840
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x160ee
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x160f4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x60(%rsp), %rdi
callq 0x4100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1613a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x16151
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x16168
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r14, %rdi
callq 0x42e0
movq %rax, %r14
cmpq 0x88(%rsp), %rax
jne 0x16044
leaq 0xf657(%rip), %rsi      # 0x257df
movq 0x60(%rsp), %rdi
leaq 0x78(%rsp), %rbx
callq 0x4840
movq 0x90(%rsp), %r14
movq 0xc8(%r14), %rax
movq 0xe8(%r14), %rdx
movq %rax, 0x130(%r14)
testq %rdx, %rdx
je 0x161e6
movq %rdx, 0x138(%r14)
movq 0xe0(%r14), %rsi
movq 0x60(%rsp), %rdi
callq 0x4100
movq $0x0, 0xe8(%r14)
movq 0xe0(%r14), %rax
movb $0x0, (%rax)
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x161fd
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4470
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1623d
jmp 0x16311
jmp 0x16311
jmp 0x16311
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1623d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x16361
jmp 0x1636e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x162e9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x162e9
jmp 0x162e6
jmp 0x16311
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1629a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1629a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x162b6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x162b6
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1636e
movq 0xa8(%rsp), %rsi
jmp 0x16366
jmp 0x162e6
jmp 0x16311
movq %rax, %rbx
jmp 0x1638a
jmp 0x162e6
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1636e
movq 0x10(%rsp), %rsi
jmp 0x16366
jmp 0x16311
jmp 0x16311
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1637d
jmp 0x1638a
movq %rax, %rbx
jmp 0x1636e
jmp 0x16318
movq %rax, %rbx
jmp 0x16357
movq %rax, %rbx
jmp 0x16340
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16340
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x16357
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x1636e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x1638a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4790