// File: cybozu[P]yrmcds/src/memcache/memcache.cpp
// Function: yrmcds::memcache::text_response::value(cybozu::hash_key const&, unsigned int, cybozu::dynbuf const&)
void text_response::value(const cybozu::hash_key& key, std::uint32_t flags,
                          const cybozu::dynbuf& data) {
    if( key.length() > MAX_KEY_LENGTH )
        throw std::logic_error("MAX_KEY_LENGTH over bug");
    m_iov[0] = {VALUE, sizeof(VALUE) - 1};
    m_iov[1] = {key.data(), key.length()};
    char buf[MAX_KEY_LENGTH + 100];
    static_assert( sizeof(unsigned int) >= sizeof(std::uint32_t),
                   "unsigned int is smaller than std::uint32_t" );
    int length = snprintf(buf, sizeof(buf), " %u %llu\x0d\x0a",
                          (unsigned int)flags,
                          (long long unsigned int)data.size());
    m_iov[2] = {buf, (std::size_t)length};
    m_iov[3] = {data.data(), data.size()};
    m_iov[4] = {CRLF, sizeof(CRLF) - 1};
    m_socket.sendv(m_iov, 5, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x355c0
cmpq $0xfa, %rax
jbe 0x63152
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1f8(%rbp)
leaq 0x1a1ba(%rip), %rsi     # 0x7d2ce
callq 0x89a0
jmp 0x6311b
movq -0x1f8(%rbp), %rdi
movq 0x4be97(%rip), %rsi     # 0xaefc0
movq 0x4be50(%rip), %rdx     # 0xaef80
callq 0x8b70
movq -0x1f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x8490
jmp 0x632bc
movq -0x1f0(%rbp), %rax
leaq 0x1a0b4(%rip), %rcx     # 0x7d214
movq %rcx, -0x40(%rbp)
movq $0x6, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x355a0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x355c0
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x20(%rax)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x208(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1fc(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33df0
movq -0x208(%rbp), %rdi
movl -0x1fc(%rbp), %ecx
movq %rax, %r8
movl $0x15e, %esi            # imm = 0x15E
leaq 0x1a0fa(%rip), %rdx     # 0x7d2e6
movb $0x0, %al
callq 0x8aa0
movl %eax, %ecx
movq -0x1f0(%rbp), %rax
movl %ecx, -0x1b4(%rbp)
leaq -0x1b0(%rbp), %rcx
movq %rcx, -0x1c8(%rbp)
movslq -0x1b4(%rbp), %rcx
movq %rcx, -0x1c0(%rbp)
movq -0x1c8(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x1c0(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
callq 0x33dd0
movq %rax, -0x1d8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33df0
movq -0x1f0(%rbp), %rsi
movq %rax, -0x1d0(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, 0x38(%rsi)
movq -0x1d0(%rbp), %rax
movq %rax, 0x40(%rsi)
leaq 0x19fa3(%rip), %rax     # 0x7d21b
movq %rax, -0x1e8(%rbp)
movq $0x2, -0x1e0(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, 0x48(%rsi)
movq -0x1e0(%rbp), %rax
movq %rax, 0x50(%rsi)
movq (%rsi), %rdi
addq $0x8, %rsi
movl $0x5, %edx
xorl %ecx, %ecx
callq 0x5d4a0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)