// File: /workspace/github_cpp_makefile_star2_O2/jixinqi[P]lazurite/./src/lazurite_core/http_request.cpp
// Function: lazurite::http::request_parser::parser_first_line()
bool lazurite::http::request_parser::parser_first_line()
{
    const std::size_t index = _request.raw_msg().find("\r\n");
    if (index == _request.raw_msg().npos)
    {
        return (_request.raw_msg().length() + 2 <= http_msg_first_line_max_length);
    }
    else if(index + 2 > http_msg_first_line_max_length)
    {
        return false;
    }

    std::vector<std::string> items;
    std::string temp = "";
    for (std::size_t i = 0; i != index; i++)
    {
        if (_request.raw_msg().at(i) != ' ')
        {
            temp.push_back(_request.raw_msg().at(i));
        }
        else
        {
            items.push_back(temp);
            temp.clear();
        }
    }
    items.push_back(temp);

    if (items.size() != 3)
    {
        return false;
    }

    _request.request_method(items.at(0));
    _request.request_uri(items.at(1));
    _request.request_version(items.at(2));
    _request.first_line_end_index(index + 2);

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x18(%rdi), %r14
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6460
leaq 0x2a03(%rip), %rsi      # 0x1223b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6650
movq %rax, %r15
movq %rbx, %rdi
callq 0x6668
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6460
movq %rbx, %rdi
callq 0x6668
cmpq $-0x1, %r15
je 0xf87e
leaq 0x2(%r15), %rax
cmpq $0x2000, %rax           # imm = 0x2000
jbe 0xf8ad
xorl %ebp, %ebp
jmp 0xf9f7
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6460
movq 0x8(%rbx), %rax
addq $0x2, %rax
cmpq $0x2001, %rax           # imm = 0x2001
setb %bpl
movq %rbx, %rdi
callq 0x6668
jmp 0xf9f7
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x2976(%rip), %rsi      # 0x1223d
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x61a0
xorl %r12d, %r12d
leaq 0x58(%rsp), %r13
leaq 0x30(%rsp), %rbx
cmpq %r12, %r15
je 0xf95a
movq %r13, %rdi
movq %r14, %rsi
callq 0x6460
movq %r13, %rdi
movq %r12, %rsi
callq 0x6610
movb (%rax), %bpl
movq %r13, %rdi
callq 0x6668
cmpb $0x20, %bpl
jne 0xf92c
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xfdf6
andq $0x0, 0x38(%rsp)
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
jmp 0xf955
movq %r13, %rdi
movq %r14, %rsi
callq 0x6460
movq %r13, %rdi
movq %r12, %rsi
callq 0x6610
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x62e0
movq %r13, %rdi
callq 0x6668
incq %r12
jmp 0xf8e3
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfdf6
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cmpq $0x60, %rax
sete %bpl
jne 0xf9e3
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xfe22
movq 0x8(%rsp), %rcx
leaq 0x38(%rcx), %rdi
movq %rax, %rsi
callq 0x6220
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xfe22
movq 0x8(%rsp), %rcx
leaq 0x58(%rcx), %rdi
movq %rax, %rsi
callq 0x6220
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0xfe22
movq 0x8(%rsp), %rcx
leaq 0x78(%rcx), %rdi
movq %rax, %rsi
callq 0x6220
movq 0x8(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x30(%rsp), %rdi
callq 0x6668
leaq 0x10(%rsp), %rdi
callq 0xfe44
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xfa31
jmp 0xfa13
jmp 0xfa13
jmp 0xfa13
movq %rax, %rbx
jmp 0xfa27
jmp 0xfa1a
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x6668
leaq 0x30(%rsp), %rdi
callq 0x6668
leaq 0x10(%rsp), %rdi
callq 0xfe44
movq %rbx, %rdi
callq 0x6550
nop