// File: /workspace/github_cpp_makefile_star2_O3/mbourand[P]webserv/srcs/Request.cpp
// Function: operator<<(std::ostream&, Request const&)
std::ostream& operator<<(std::ostream& out, const Request& request)
{
	if (request._error_code < 400)
	{
		out <<	"Method: " << request._method->getType() << '\n' <<
				"Path: " << request._url._path << '\n' <<
				"Protocol Version: " << request._protocolVersion << '\n' <<
				"Headers: " << std::endl;
		for (Request::HeadersVector::const_iterator it = request._headers.begin(); it != request._headers.end(); it++)
			out << "  \"" << (*it)->getType() << "\" -> \"" << (*it)->getValue() << '"' << std::endl;
		if (request._body.size() < 100)
			out << "Body:\n\"" << request._body << "\"" << std::endl;
		else
			out << "Body:\n\"" << "<<<BODY TOO LONG>>>" << "\"" << std::endl;
	}
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0x18f, 0x188(%rsi)     # imm = 0x18F
jg 0x36040
movq %rsi, %r14
leaq 0x7b0f(%rip), %rsi      # 0x3d8a4
movl $0x8, %edx
movq %rbx, %rdi
callq 0x7510
movq 0x28(%r14), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq *0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x7510
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x7510
movq %rax, %r15
leaq 0x7acb(%rip), %rsi      # 0x3d8ad
movl $0x6, %edx
movq %rax, %rdi
callq 0x7510
movq 0xb8(%r14), %rsi
movq 0xc0(%r14), %rdx
movq %r15, %rdi
callq 0x7510
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x7510
movq %rax, %r15
leaq 0x7a90(%rip), %rsi      # 0x3d8b4
movl $0x12, %edx
movq %rax, %rdi
callq 0x7510
movq 0x120(%r14), %rsi
movq 0x128(%r14), %rdx
movq %r15, %rdi
callq 0x7510
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x7510
movq %rax, %r15
leaq 0x7a61(%rip), %rsi      # 0x3d8c7
movl $0x9, %edx
movq %rax, %rdi
callq 0x7510
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %r15, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35eb5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x140(%r14), %r12
cmpq 0x148(%r14), %r12
je 0x35fa1
leaq 0x7a05(%rip), %r13      # 0x3d8d5
leaq 0x7(%rsp), %rbp
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x79ed(%rip), %rsi      # 0x3d8d1
callq 0x7510
movq (%r12), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x7510
movq %rax, %r15
movl $0x6, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x7510
movq (%r12), %rdi
callq 0x8e50
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x7510
movb $0x22, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7510
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %r15, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x35f90
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
addq $0x8, %r12
cmpq 0x148(%r14), %r12
jne 0x35ed5
cmpq $0x64, 0x160(%r14)
jae 0x35fda
leaq 0x792a(%rip), %rsi      # 0x3d8dc
movl $0x7, %edx
movq %rbx, %rdi
callq 0x7510
movq 0x158(%r14), %rsi
movq 0x160(%r14), %rdx
movq %rbx, %rdi
callq 0x7510
movq %rax, %r14
jmp 0x36005
leaq 0x78fb(%rip), %rsi      # 0x3d8dc
movl $0x7, %edx
movq %rbx, %rdi
callq 0x7510
leaq 0x7736(%rip), %rsi      # 0x3d72b
movl $0x13, %edx
movq %rbx, %rdi
callq 0x7510
movq %rbx, %r14
leaq 0x78d6(%rip), %rsi      # 0x3d8e2
movl $0x1, %edx
movq %r14, %rdi
callq 0x7510
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %r14, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x3606d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3607f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rbx, %rdi
callq 0x7810
nop