// File: /workspace/github_cpp_makefile_star2_O1/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 0x1631c(%rip), %rsi     # 0x32b0e
leaq 0x98(%rsp), %rdi
movl $0x10, %edx
callq 0x1d37c
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), %r15
movq %r15, %rdi
callq 0xa7b0
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
leaq 0x30(%rsp), %rdx
leaq 0x98(%rsp), %rcx
xorl %r8d, %r8d
callq 0x28561
testb %al, %al
je 0x1cbf3
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rax, %rcx
je 0x1c8b1
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $-0x5, %rdx
cmpq $-0x2, %rdx
setb %dl
jmp 0x1c8b3
xorl %edx, %edx
movq 0x28(%rsp), %rbx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
leaq 0x18(%rsp), %r13
jne 0x1c8e7
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
callq 0x2a3f2
jmp 0x1c8fa
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa7c0
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1c917
callq 0xa5d0
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x1c941
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $-0x6, %rdx
cmpq $-0x3, %rdx
setb %dl
jmp 0x1c943
xorl %edx, %edx
addq $0x30, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1c96d
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
callq 0x2a3f2
jmp 0x1c980
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x20(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xa7c0
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1c99e
callq 0xa5d0
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x1c9c8
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $-0x7, %rdx
cmpq $-0x4, %rdx
setb %dl
jmp 0x1c9ca
xorl %edx, %edx
addq $0x48, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1c9f4
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
callq 0x2a3f2
jmp 0x1ca07
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xa7c0
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1ca25
callq 0xa5d0
leaq 0x16101(%rip), %rsi     # 0x32b2d
leaq 0x1610a(%rip), %rdx     # 0x32b3d
leaq 0x98(%rsp), %rdi
movl $0x10, %ecx
callq 0x1d404
leaq 0x70(%rbx), %r15
leaq 0x88(%rsp), %rbx
leaq 0x58(%rsp), %r12
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 0x28561
movl %eax, %r13d
testb %al, %al
je 0x1cbf3
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x1cae1
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x6, %rdx
cmpq $-0x3, %rdx
setb %dl
jmp 0x1cae3
xorl %edx, %edx
addq $0x30, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1cb14
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2a3f2
jmp 0x1cb2c
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x1cb60
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x5, %rdx
cmpq $-0x2, %rdx
setb %dl
jmp 0x1cb62
xorl %edx, %edx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x1cb94
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, 0x78(%rsp)
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
callq 0x2a3f2
movq %rbp, %rsi
jmp 0x1cbb2
movq %rbx, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movb $0x0, 0x88(%rsp)
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x2ce64
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0xa7c0
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1cbd6
callq 0xa5d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1cbea
callq 0xa5d0
testb %r13b, %r13b
jne 0x1ca56
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1cc07
callq 0xa5d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
movq 0x28(%rsp), %rbx
je 0x1cc1b
callq 0xa5d0
leaq 0x98(%rsp), %rdi
callq 0x1d3e4
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1cc7b
jmp 0x1cc7b
jmp 0x1cc7b
jmp 0x1cc7b
movq %rax, %r14
jmp 0x1ccae
jmp 0x1cc7b
movq %rax, %r14
jmp 0x1cc65
jmp 0x1cc7b
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1cc65
callq 0xa5d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1cc7e
callq 0xa5d0
jmp 0x1cc7e
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1cc92
callq 0xa5d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1cca1
callq 0xa5d0
leaq 0x98(%rsp), %rdi
callq 0x1d3e4
movq 0x28(%rsp), %rdi
callq 0x1ccc0
movq %r14, %rdi
callq 0xaa80