// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x9ce2
leaq 0x33a0(%rip), %rsi      # 0x16252
movl $0x2, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x6570
movq %rax, %r14
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x12ed1
callq 0x6350
leaq 0x20(%rsp), %r15
movq %r12, (%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9ce2
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x12ef9
callq 0x6350
cmpq $-0x1, %r14
je 0x12f12
leaq 0x2(%r14), %rax
cmpq $0x2000, %rax           # imm = 0x2000
jbe 0x12f55
xorl %ebp, %ebp
jmp 0x130e1
leaq 0x20(%rsp), %r14
movq %r12, (%r14)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x9ce2
movq (%r14), %rdi
movq 0x8(%r14), %rax
addq $0x2, %rax
cmpq $0x2001, %rax           # imm = 0x2001
setb %bpl
cmpq %r12, %rdi
je 0x130e1
callq 0x6350
jmp 0x130e1
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x32db(%rip), %rdx      # 0x16254
movq %rdx, %rsi
callq 0x8a36
testq %r14, %r14
je 0x1304b
leaq 0x50(%rsp), %r13
xorl %r15d, %r15d
leaq 0x40(%rsp), %r12
movq %r13, 0x40(%rsp)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x9ce2
movq 0x48(%rsp), %rdx
cmpq %r15, %rdx
jbe 0x130f2
movq 0x40(%rsp), %rdi
movb (%rdi,%r15), %bpl
cmpq %r13, %rdi
je 0x12fd0
callq 0x6350
cmpb $0x20, %bpl
jne 0x12ff6
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1366c
movq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
jmp 0x1303f
movq %r13, 0x40(%rsp)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x9ce2
movq 0x48(%rsp), %rdx
cmpq %r15, %rdx
jbe 0x13103
movq 0x40(%rsp), %rax
movsbl (%rax,%r15), %esi
leaq 0x20(%rsp), %rdi
callq 0x6310
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x1303f
callq 0x6350
incq %r15
cmpq %r15, %r14
jne 0x12f97
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x30(%rsp), %r14
callq 0x1366c
movq 0x60(%rsp), %r15
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
sete %bpl
jne 0x130ca
leaq 0x38(%rbx), %rdi
callq 0x6240
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jb 0x13114
addq $0x20, %rsi
leaq 0x58(%rbx), %rdi
callq 0x6240
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jbe 0x1311b
addq $0x40, %rsi
leaq 0x78(%rbx), %rdi
callq 0x6240
movq %r15, (%rbx)
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x130d9
callq 0x6350
movq %rsp, %rdi
callq 0x136aa
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3196(%rip), %rdi      # 0x1628f
movq %r15, %rsi
xorl %eax, %eax
callq 0x64e0
leaq 0x3185(%rip), %rdi      # 0x1628f
movq %r15, %rsi
xorl %eax, %eax
callq 0x64e0
movl $0x1, %esi
jmp 0x13120
movl $0x2, %esi
leaq 0x31c6(%rip), %rdi      # 0x162ed
xorl %eax, %eax
callq 0x64e0
movq %rax, %rbx
jmp 0x13168
jmp 0x1313d
jmp 0x1313d
jmp 0x13142
jmp 0x13142
jmp 0x1313d
movq %rax, %rbx
jmp 0x13154
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x13154
callq 0x6350
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x13168
callq 0x6350
movq %rsp, %rdi
callq 0x136aa
movq %rbx, %rdi
callq 0x6580