// File: mbourand[P]webserv/srcs/Methods/TraceMethod.cpp
// Function: TraceMethod::process(Request const&, ConfigContext const&, ServerSocket const&)
Response TraceMethod::process(const Request& request, const ConfigContext&, const ServerSocket&)
{
	const URL& url = request._url;
	Response response(200, url._path);
	response.addHeader("Content-Type", "message/http; charset=UTF-8");
	response.addHeader("Server", "Webserv");
	response.addDateHeader();
	response.setBody(request._raw);
	return response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
movl $0xc8, %esi
callq 0x636c0
leaq -0x59(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x9b10
movq -0xf0(%rbp), %rdx
leaq 0x4f2cf(%rip), %rsi     # 0x6a152
leaq -0x58(%rbp), %rdi
callq 0xa780
jmp 0x1ae8e
leaq -0x91(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x9b10
movq -0x108(%rbp), %rdx
leaq 0x4f999(%rip), %rsi     # 0x6a848
leaq -0x90(%rbp), %rdi
callq 0xa780
jmp 0x1aebd
movq -0x100(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x63770
jmp 0x1aed6
leaq -0x90(%rbp), %rdi
callq 0x9c98
leaq -0x91(%rbp), %rdi
callq 0x9700
leaq -0x58(%rbp), %rdi
callq 0x9c98
leaq -0x59(%rbp), %rdi
callq 0x9700
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x9b10
movq -0x110(%rbp), %rdx
leaq 0x4f32b(%rip), %rsi     # 0x6a24c
leaq -0xb8(%rbp), %rdi
callq 0xa780
jmp 0x1af2f
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x9b10
movq -0x118(%rbp), %rdx
leaq 0x4fc61(%rip), %rsi     # 0x6abb1
leaq -0xe0(%rbp), %rdi
callq 0xa780
jmp 0x1af5e
movq -0x100(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x63770
jmp 0x1af7a
leaq -0xe0(%rbp), %rdi
callq 0x9c98
leaq -0xe1(%rbp), %rdi
callq 0x9700
leaq -0xb8(%rbp), %rdi
callq 0x9c98
leaq -0xb9(%rbp), %rdi
callq 0x9700
movq -0x100(%rbp), %rdi
callq 0x63a60
jmp 0x1afb8
movq -0x100(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x645d0
jmp 0x1afce
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x1b0ac
jmp 0x1b0a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1b02a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1b015
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9c98
leaq -0x91(%rbp), %rdi
callq 0x9700
leaq -0x58(%rbp), %rdi
callq 0x9c98
leaq -0x59(%rbp), %rdi
callq 0x9700
jmp 0x1b0bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1b084
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1b06c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x9c98
leaq -0xe1(%rbp), %rdi
callq 0x9700
leaq -0xb8(%rbp), %rdi
callq 0x9c98
leaq -0xb9(%rbp), %rdi
callq 0x9700
jmp 0x1b0bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1b0bc
movq -0x100(%rbp), %rdi
callq 0x634e0
movq -0xf8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x100(%rbp), %rdi
callq 0x634e0
movq -0x68(%rbp), %rdi
callq 0x9af0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)