// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/memcache.cpp
// Function: yrmcds::memcache::text_request::parse_touch(char const*, char const*)
inline void
text_request::parse_touch(const char* b, const char* e) noexcept {
    while( *b == SP ) ++b;
    if( b == e ) return;
    const char* key_end = cfind(b, SP, e-b);
    if( key_end == nullptr ) return;
    m_key = item(b, key_end-b);
    b = key_end;

    while( *b == SP ) ++b;
    if( b == e ) return;
    const char* exptime_end = cfind(b, SP, e-b);
    if( exptime_end == nullptr ) exptime_end = e;
    bool result;
    std::time_t t = to_uint<std::time_t>(b, result);
    if( ! result ) return;
    if( t != 0 )
        m_exptime = (t > EXPTIME_THRESHOLD) ? t :
            (g_current_time.load(relaxed) + t);
    b = exptime_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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
decq %r15
movq %r15, %r12
incq %r15
cmpb $0x20, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0x3225a
cmpq %r14, %r12
je 0x322ea
movq %r14, %rdx
subq %r15, %rdx
movq %r12, %rdi
movl $0x20, %esi
callq 0x7540
testq %rax, %rax
je 0x322ea
movq %rax, %r13
subq %r15, %rax
movq %r12, 0x28(%rbx)
movq %rax, 0x20(%rbx)
movq %r14, %rdx
subq %r13, %rdx
decq %r13
incq %rdx
decq %rdx
cmpb $0x20, 0x1(%r13)
leaq 0x1(%r13), %r13
je 0x322a1
cmpq %r14, %r13
je 0x322ea
movq %r13, %rdi
movl $0x20, %esi
callq 0x7540
movq %rax, %r15
testq %rax, %rax
cmoveq %r14, %r15
movq %rsp, %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x76e0
movq (%rbp), %rbp
xorq %rbp, %r13
orq %rax, %r13
jne 0x322f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x3230c
callq 0x7040
cmpl $0x22, (%rax)
je 0x322ea
movzbl (%rbp), %eax
cmpq $0x20, %rax
ja 0x322ea
movabsq $0x100002400, %rcx      # imm = 0x100002400
btq %rax, %rcx
jae 0x322ea
testq %r12, %r12
js 0x322ea
je 0x32347
cmpq $0x278d00, %r12         # imm = 0x278D00
ja 0x32343
leaq 0x14b43(%rip), %rax     # 0x46e80
movq (%rax), %rax
addq %rax, %r12
movq %r12, 0x38(%rbx)
decq %r15
movq %r15, %r12
incq %r15
cmpb $0x20, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0x3234d
cmpq %r14, %r12
je 0x323b8
movq %r14, %r13
subq %r15, %r13
movq %r12, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0x7540
movq %rax, %rcx
subq %r15, %rcx
testq %rax, %rax
cmoveq %r13, %rcx
cmpq $0x7, %rcx
jne 0x322ea
movl $0x65726f6e, %ecx       # imm = 0x65726F6E
xorl (%r12), %ecx
movl $0x796c7065, %edx       # imm = 0x796C7065
xorl 0x3(%r12), %edx
orl %ecx, %edx
jne 0x322ea
testq %rax, %rax
movb $0x1, 0x1d(%rbx)
cmoveq %r14, %rax
movq %rax, %r12
decq %r12
cmpb $0x20, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0x323bb
cmpq %r14, %r12
jne 0x322ea
movb $0x1, 0x1c(%rbx)
jmp 0x322ea