// File: /workspace/github_cpp_makefile_star2_O3/DMLfor[P]TinyWebServer/./ServerBase.hpp
// Function: WebServer::ServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0>>, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0>>>>>>::parse_request(std::istream&) const
WebServer::Request WebServer::ServerBase<socket_type>::parse_request(std::istream &stream) const
{
	Request request;
	// 使用正则表达式对请求报头进行解析
	// 可以解析出请求方法(GET/POST),请求路径以及 HTTP 版本
	std::regex e("^([^ ]*) ([^ ]*) HTTP/([^ ]*)$");

	std::smatch sub_match;
	// 从第一行中解析请求的方法, 路径和 HTTP 版本
	std::string line;
	getline(stream, line);
	line.pop_back();
	if(std::regex_match(line, sub_match, e))
	{
		request.method        = sub_match[1];
		request.path		  = sub_match[2];
		request.http_version  = sub_match[3];
		// 解析头部的其他信息
		bool matched = false;
		e = "^([^:]*): ?(.*)$";
		do
		{
			getline(stream, line);
			line.pop_back();
			matched = std::regex_match(line, sub_match, e);
			if(matched)
			{
				request.header[sub_match[1]] = sub_match[2];
			}
		} while(matched);
	}
	return request;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rdi, 0x28(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
leaq 0xa0(%rdi), %rax
movq %rax, 0x70(%rdi)
movq $0x1, 0x78(%rdi)
movups %xmm0, 0x80(%rdi)
movl $0x3f800000, 0x90(%rdi) # imm = 0x3F800000
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
movups %xmm0, 0xb8(%rdi)
leaq 0x165e2(%rip), %rsi     # 0x32b0e
leaq 0x98(%rsp), %rdi
movl $0x10, %edx
callq 0x1cf3c
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xa5f0
movsbl %al, %edx
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0xab10
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0xa7b0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
leaq 0x30(%rsp), %rdx
leaq 0x98(%rsp), %rcx
xorl %r8d, %r8d
callq 0x2815a
testb %al, %al
je 0x1c8f6
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
subq %rax, %rcx
je 0x1c5eb
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
addq $-0x5, %rdx
cmpq $-0x3, %rdx
ja 0x1c5eb
addq $0x18, %rax
jmp 0x1c5f2
addq %rcx, %rax
addq $-0x48, %rax
movq 0x28(%rsp), %r15
cmpb $0x1, 0x10(%rax)
leaq 0x18(%rsp), %r12
jne 0x1c618
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
callq 0x29ffe
jmp 0x1c62b
movq %r12, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa7c0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1c648
callq 0xa5d0
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x1c672
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
addq $-0x6, %rdx
cmpq $-0x4, %rdx
ja 0x1c672
addq $0x30, %rax
jmp 0x1c679
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1c695
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
callq 0x29ffe
jmp 0x1c6a8
movq %r12, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x20(%r15), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0xa7c0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1c6c6
callq 0xa5d0
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x1c6f0
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
addq $-0x7, %rdx
cmpq $-0x5, %rdx
ja 0x1c6f0
addq $0x48, %rax
jmp 0x1c6f7
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1c713
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
callq 0x29ffe
jmp 0x1c726
movq %r12, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x40(%r15), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0xa7c0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1c744
callq 0xa5d0
movq %r12, %rbx
leaq 0x163df(%rip), %rsi     # 0x32b2d
leaq 0x163e8(%rip), %rdx     # 0x32b3d
leaq 0x98(%rsp), %rdi
movl $0x10, %ecx
callq 0x1cfc4
addq $0x70, %r15
leaq 0x88(%rsp), %rbp
leaq 0x58(%rsp), %r12
leaq 0x78(%rsp), %r13
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xa5f0
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0xab10
movq %r12, %rdi
callq 0xa7b0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq %rdi, %rsi
leaq 0x30(%rsp), %rdx
leaq 0x98(%rsp), %rcx
xorl %r8d, %r8d
callq 0x2815a
testb %al, %al
je 0x1c8f6
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x1c808
movq %rcx, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %rsi
addq $-0x6, %rsi
cmpq $-0x4, %rsi
ja 0x1c808
leaq 0x30(%rax), %rdi
jmp 0x1c810
leaq (%rax,%rcx), %rdi
addq $-0x48, %rdi
cmpb $0x1, 0x10(%rdi)
jne 0x1c83e
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x29ffe
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
jmp 0x1c851
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
cmpq %rdx, %rax
je 0x1c87b
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x5, %rdx
cmpq $-0x3, %rdx
ja 0x1c87b
addq $0x18, %rax
jmp 0x1c882
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1c89e
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbp, 0x78(%rsp)
movq %r13, %rdi
callq 0x29ffe
jmp 0x1c8b7
movq %rbp, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movb $0x0, 0x88(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x2ca20
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0xa7c0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1c8de
callq 0xa5d0
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1c77d
callq 0xa5d0
jmp 0x1c77d
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1c90a
callq 0xa5d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
movq 0x28(%rsp), %rbx
je 0x1c91e
callq 0xa5d0
leaq 0x98(%rsp), %rdi
callq 0x1cfa4
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1c979
jmp 0x1c979
jmp 0x1c979
jmp 0x1c979
movq %rax, %r14
jmp 0x1c9ac
jmp 0x1c979
jmp 0x1c979
movq %rax, %r14
jmp 0x1c968
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1c968
callq 0xa5d0
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1c97c
callq 0xa5d0
jmp 0x1c97c
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1c990
callq 0xa5d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1c99f
callq 0xa5d0
leaq 0x98(%rsp), %rdi
callq 0x1cfa4
movq 0x28(%rsp), %rdi
callq 0x1c9be
movq %r14, %rdi
callq 0xaa80