// File: cybozu[P]yrmcds/src/memcache/memcache.cpp
// Function: yrmcds::memcache::text_request::parse_verbosity(char const*, char const*)
inline void
text_request::parse_verbosity(const char* b, const char* e) noexcept {
    while( *b == SP ) ++b;
    if( b == e ) return;
    const char* vb_end = cfind(b, SP, e-b);
    if( vb_end == nullptr ) vb_end = e;
    std::size_t len = vb_end - b;
    if( len == 0 ) return; // invalid

    if( len == 5 ) {
        if( std::memcmp("error", b, 5) == 0 ) {
            m_verbosity = cybozu::severity::error;
        } else if( std::memcmp("debug", b, 5) == 0 ) {
            m_verbosity = cybozu::severity::debug;
        }
    }
    if( len == 7 && std::memcmp("warning", b, 7) == 0 )
        m_verbosity = cybozu::severity::warning;
    if( len == 4 && std::memcmp("info", b, 4) == 0 )
        m_verbosity = cybozu::severity::info;

    b = vb_end;

    while( *b == SP ) ++b;
    if( b != e ) {
        // noreply ?
        const char* we = cfind(b, SP, e-b);
        std::size_t noreply_len = (we != nullptr) ? (we - b) : (e - b);
        if( noreply_len != 7 ) return;
        if( std::memcmp(b, "noreply", 7) != 0 ) return;
        m_no_reply = true;
        b = (we != nullptr) ? we : e;
    }

    while( *b == SP ) ++b;
    if( b != e ) return; // garbage left

    m_valid = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x75596
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7557c
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x755a5
jmp 0x75791
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x63090
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x755d1
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x755ec
jmp 0x75791
cmpq $0x5, -0x28(%rbp)
jne 0x75643
movq -0x10(%rbp), %rsi
leaq 0x4dee(%rip), %rdi      # 0x7a3ec
movl $0x5, %edx
callq 0x8280
cmpl $0x0, %eax
jne 0x7561a
movq -0x40(%rbp), %rax
movl $0x0, 0x60(%rax)
jmp 0x75641
movq -0x10(%rbp), %rsi
leaq 0x4dd5(%rip), %rdi      # 0x7a3fa
movl $0x5, %edx
callq 0x8280
cmpl $0x0, %eax
jne 0x7563f
movq -0x40(%rbp), %rax
movl $0x3, 0x60(%rax)
jmp 0x75641
jmp 0x75643
cmpq $0x7, -0x28(%rbp)
jne 0x7566f
movq -0x10(%rbp), %rsi
leaq 0x4d9d(%rip), %rdi      # 0x7a3f2
movl $0x7, %edx
callq 0x8280
cmpl $0x0, %eax
jne 0x7566f
movq -0x40(%rbp), %rax
movl $0x1, 0x60(%rax)
cmpq $0x4, -0x28(%rbp)
jne 0x75697
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl $0x6f666e69, %eax       # imm = 0x6F666E69
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x75697
movq -0x40(%rbp), %rax
movl $0x2, 0x60(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x756b9
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7569f
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x75761
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x63090
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x756fc
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x7570b
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x7, -0x38(%rbp)
je 0x7571c
jmp 0x75791
movq -0x10(%rbp), %rdi
leaq 0x8982(%rip), %rsi      # 0x7e0a9
movl $0x7, %edx
callq 0x8280
cmpl $0x0, %eax
je 0x75738
jmp 0x75791
movq -0x40(%rbp), %rax
movb $0x1, 0x1d(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x75751
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x75759
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x75763
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x7577d
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x75763
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x75789
jmp 0x75791
movq -0x40(%rbp), %rax
movb $0x1, 0x1c(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)