// File: /workspace/github_cpp_makefile_star2_O3/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 0x9cd8
leaq 0x3760(%rip), %rsi      # 0x16252
movl $0x2, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x6570
movq %rax, %r14
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x12b11
callq 0x6350
leaq 0x20(%rsp), %r15
movq %r12, (%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9cd8
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x12b39
callq 0x6350
cmpq $-0x1, %r14
je 0x12b52
leaq 0x2(%r14), %rax
cmpq $0x2000, %rax           # imm = 0x2000
jbe 0x12b95
xorl %ebp, %ebp
jmp 0x12d21
leaq 0x20(%rsp), %r14
movq %r12, (%r14)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x9cd8
movq (%r14), %rdi
movq 0x8(%r14), %rax
addq $0x2, %rax
cmpq $0x2001, %rax           # imm = 0x2001
setb %bpl
cmpq %r12, %rdi
je 0x12d21
callq 0x6350
jmp 0x12d21
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x369b(%rip), %rdx      # 0x16254
movq %rdx, %rsi
callq 0x8a2c
testq %r14, %r14
je 0x12c8b
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 0x9cd8
movq 0x48(%rsp), %rdx
cmpq %r15, %rdx
jbe 0x12d32
movq 0x40(%rsp), %rdi
movb (%rdi,%r15), %bpl
cmpq %r13, %rdi
je 0x12c10
callq 0x6350
cmpb $0x20, %bpl
jne 0x12c36
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x132ac
movq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
jmp 0x12c7f
movq %r13, 0x40(%rsp)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x9cd8
movq 0x48(%rsp), %rdx
cmpq %r15, %rdx
jbe 0x12d43
movq 0x40(%rsp), %rax
movsbl (%rax,%r15), %esi
leaq 0x20(%rsp), %rdi
callq 0x6310
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x12c7f
callq 0x6350
incq %r15
cmpq %r15, %r14
jne 0x12bd7
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x30(%rsp), %r14
callq 0x132ac
movq 0x60(%rsp), %r15
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
sete %bpl
jne 0x12d0a
leaq 0x38(%rbx), %rdi
callq 0x6240
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jb 0x12d54
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 0x12d5b
addq $0x40, %rsi
leaq 0x78(%rbx), %rdi
callq 0x6240
movq %r15, (%rbx)
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x12d19
callq 0x6350
movq %rsp, %rdi
callq 0x132ea
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3556(%rip), %rdi      # 0x1628f
movq %r15, %rsi
xorl %eax, %eax
callq 0x64e0
leaq 0x3545(%rip), %rdi      # 0x1628f
movq %r15, %rsi
xorl %eax, %eax
callq 0x64e0
movl $0x1, %esi
jmp 0x12d60
movl $0x2, %esi
leaq 0x3586(%rip), %rdi      # 0x162ed
xorl %eax, %eax
callq 0x64e0
movq %rax, %rbx
jmp 0x12da8
jmp 0x12d7d
jmp 0x12d7d
jmp 0x12d82
jmp 0x12d82
jmp 0x12d7d
movq %rax, %rbx
jmp 0x12d94
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x12d94
callq 0x6350
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12da8
callq 0x6350
movq %rsp, %rdi
callq 0x132ea
movq %rbx, %rdi
callq 0x6580