LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::gc_ready(long)
bool handler::gc_ready(std::time_t now) {
    if( m_gc_thread.get() != nullptr ) {
        if( ! m_gc_thread->done() )
            return false;
        m_last_gc = now;
        m_gc_thread = nullptr;
    }

    std::time_t t = g_stats.flush_time.load(relaxed);
    if( t != 0 && now >= t )
        return true;

    // run GC immediately if the heap is over used.
    if( g_stats.used_memory.load(relaxed) >
        g_config.memory_limit() ) return true;

    // Run GC when there are new slaves.
    // In case there are unstable slaves that try to connect to
    // the master too frequently, the number of consecutive GCs is limited.
    if( ! m_new_slaves.empty() && m_consecutive_gcs < MAX_CONSECUTIVE_GCS ) {
        ++m_consecutive_gcs;
        return true;
    }

    if( now > (m_last_gc + g_config.gc_interval()) ) {
        m_consecutive_gcs = 0;
        return true;
    }

    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0x15b3c
movb (%rax), %al
testb $0x1, %al
je 0x15ba9
leaq 0x68(%rbx), %rdi
movq %r14, 0x60(%rbx)
xorl %esi, %esi
callq 0x179c6
leaq 0x3137d(%rip), %rcx     # 0x46ec0
movq 0xc0(%rcx), %rax
testq %rax, %rax
setne %dl
cmpq %r14, %rax
setle %sil
movb $0x1, %al
testb %sil, %dl
jne 0x15bab
movq 0x28(%rcx), %rdx
leaq 0x31057(%rip), %rcx     # 0x46bc0
cmpq 0xe8(%rcx), %rdx
ja 0x15bab
movq 0x90(%rbx), %rdx
cmpq 0x98(%rbx), %rdx
je 0x15b91
movl 0x70(%rbx), %edx
cmpl $0x2, %edx
jg 0x15b91
incl %edx
movl %edx, 0x70(%rbx)
jmp 0x15bab
movl 0x108(%rcx), %ecx
addq 0x60(%rbx), %rcx
cmpq %r14, %rcx
jge 0x15ba9
movl $0x0, 0x70(%rbx)
jmp 0x15bab
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::make_memcache_socket(int)
std::unique_ptr<cybozu::tcp_socket> handler::make_memcache_socket(int s) {
    if( m_is_slave )
        return nullptr;

    unsigned int mc = g_config.max_connections();
    if( mc != 0 &&
        (g_stats.curr_connections.load(relaxed) >= mc) )
        return nullptr;

    return std::unique_ptr<cybozu::tcp_socket>(
        new memcache_socket(s, m_finder, m_hash, m_slaves) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x38(%rsi)
jne 0x16c6c
movl %edx, %ebp
movq %rsi, %r15
leaq 0x2ff9c(%rip), %rax     # 0x46bc0
movl 0x40(%rax), %eax
testq %rax, %rax
je 0x16c3f
leaq 0x3028d(%rip), %rcx     # 0x46ec0
movq 0x100(%rcx), %rcx
cmpq %rax, %rcx
jae 0x16c6c
movl $0x1c0, %edi            # imm = 0x1C0
movl $0x40, %esi
callq 0x7530
movq %rax, %r14
leaq 0x8(%r15), %rdx
leaq 0x40(%r15), %rcx
addq $0x78, %r15
movq %rax, %rdi
movl %ebp, %esi
movq %r15, %r8
callq 0x18bd8
jmp 0x16c6f
xorl %r14d, %r14d
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x7680
movq %rbx, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/sockets.hpp
// Function: yrmcds::memcache::repl_socket::peer_ip[abi:cxx11]()
std::string peer_ip() {
        std::string addr = "unknown address";
        try {
            with_fd([&addr](int fd) -> bool {
                addr = cybozu::get_peer_ip_address(fd).str();
                return true;
            });
        } catch (...) {
            // ignore errors
        }
        return addr;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x1e287(%rip), %rsi     # 0x353e6
leaq 0x1e28f(%rip), %rdx     # 0x353f5
callq 0x9760
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, %rdi
callq 0x176ae
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x71a0
callq 0x78e0
jmp 0x1717b
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x171ad
movq (%r15), %rsi
incq %rsi
callq 0x7500
movq %r14, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/gc.hpp
// Function: yrmcds::memcache::gc_thread::gc_thread(cybozu::hash_map<yrmcds::memcache::object>&, std::vector<yrmcds::memcache::repl_socket*, std::allocator<yrmcds::memcache::repl_socket*>> const&, std::vector<yrmcds::memcache::repl_socket*, std::allocator<yrmcds::memcache::repl_socket*>> const&)
gc_thread(cybozu::hash_map<object>& m,
              const std::vector<repl_socket*>& slaves,
              const std::vector<repl_socket*>& new_slaves):
        m_hash(m), m_slaves(slaves), m_new_slaves(new_slaves) {
        for( repl_socket* s: new_slaves ) {
            if( std::find(slaves.begin(), slaves.end(), s) == slaves.end() )
                m_slaves.push_back(s);
        }
        m_flushers.reserve(10);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movq %rdx, %r13
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
leaq 0x18(%rdi), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x17748
leaq 0x30(%rbx), %rdi
movq %rdi, 0x10(%rsp)
movq %rbp, %rsi
callq 0x17748
leaq 0x98(%rbx), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
movq $0x0, 0xa8(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
xorl %eax, %eax
movl %eax, 0x68(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x80(%rbx)
movl %eax, 0x90(%rbx)
movq (%rbp), %r15
movq 0x8(%rbp), %r12
cmpq %r12, %r15
je 0x17294
leaq 0x8(%rsp), %rbp
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %rbp, %rdx
callq 0x178ff
cmpq 0x8(%r13), %rax
jne 0x1728b
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x17280
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x1728b
movq %r14, %rdi
movq %rbp, %rdx
callq 0x17d04
addq $0x8, %r15
cmpq %r12, %r15
jne 0x17249
movl $0xa, %esi
movq (%rsp), %rdi
callq 0x177c8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x172bf
movq %rax, %r13
jmp 0x172e4
movq %rax, %r13
jmp 0x172f8
jmp 0x172bf
movq %rax, %r13
movq (%rsp), %rdi
callq 0x1789c
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x172e4
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x7500
movq (%r14), %rdi
testq %rdi, %rdi
je 0x172f8
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x7500
cmpq $0x0, 0x8(%rbx)
jne 0x17307
movq %r13, %rdi
callq 0x79a0
callq 0x70e0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/sockets.hpp
// Function: yrmcds::memcache::repl_socket::repl_socket(int, unsigned int, std::function<cybozu::worker* ()> const&)
repl_socket(int fd, unsigned int bufcnt,
                const std::function<cybozu::worker*()>& finder)
        : cybozu::tcp_socket(fd, bufcnt),
          m_finder(finder),
          m_recvbuf(MAX_RECVSIZE),
          m_last_heartbeat(g_current_time.load(std::memory_order_relaxed))
    {
        m_sendjob = [this](cybozu::dynbuf&) {
            with_fd([=](int fd) -> bool {
                return write_pending_data(fd);
            });
        };
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
callq 0x1fc3e
leaq 0x2e4d4(%rip), %rax     # 0x45998
addq $0x10, %rax
movq %rax, (%rbx)
movq %r14, 0x100(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rbx)
movq $0x0, 0x118(%rbx)
movl $0x200000, %edi         # imm = 0x200000
callq 0x74f0
movq %rax, 0x108(%rbx)
movq %rax, %r14
addq $0x200000, %r14         # imm = 0x200000
movq %r14, 0x118(%rbx)
movl $0x200000, %edx         # imm = 0x200000
movq %rax, %rdi
xorl %esi, %esi
callq 0x7290
movq %r14, 0x110(%rbx)
leaq 0x120(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x120(%rbx)
movups %xmm0, 0x130(%rbx)
leaq 0x2f942(%rip), %rax     # 0x46e80
movq (%rax), %rax
movq %rax, 0x140(%rbx)
movq %rsp, %rsi
movq %rbx, (%rsi)
callq 0x17bf0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x14d5e
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/./cybozu/tcp.hpp
// Function: cybozu::tcp_socket::_flush(int)
void _flush(int fd) {
        // with TCP_CORK, setting TCP_NODELAY effectively flushes
        // the kernel send buffer.
        int v = 1;
        if( setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v)) == -1 )
            throw_unix_error(errno, "setsockopt(TCP_NODELAY)");
    }

// Assembly:
pushq %rax
movl %esi, %edi
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x79c0
cmpl $-0x1, %eax
je 0x17b62
popq %rax
retq
callq 0x7040
movl (%rax), %edi
leaq 0x1d8a2(%rip), %rsi     # 0x35412
callq 0x8d8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::file_flusher::~file_flusher()
file_flusher::~file_flusher() {
    if( m_fd == -1 ) return;
    if( ::fdatasync(m_fd) == 0 )
        ::posix_fadvise(m_fd, 0, 0, POSIX_FADV_DONTNEED);
    ::close(m_fd);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x181df
callq 0x7210
testl %eax, %eax
jne 0x181d8
movl (%rbx), %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0x4, %ecx
callq 0x73a0
movl (%rbx), %edi
callq 0x7a80
popq %rbx
retq
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::object(char const*, unsigned long, unsigned int, long)
object::object(const char* p, std::size_t len,
               std::uint32_t flags_, std::time_t exptime)
    : m_length(len), m_data(0, g_config.secure_erase()), m_file(nullptr),
      m_flags(flags_), m_exptime(exptime) {
    if( len > g_config.heap_data_limit() ) {
        m_file = std::unique_ptr<tempfile>(new tempfile);
        m_file->write(p, len);
    } else {
        if( len > 0 )
            m_data.append(p, len);
    }
    g_stats.total_objects.fetch_add(1, std::memory_order_relaxed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdx, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x2e9b7(%rip), %rbp     # 0x46bc0
movb 0x100(%rbp), %al
xorl %edx, %edx
movq %rdx, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movb %al, 0x20(%rdi)
leaq 0x30(%rdi), %r14
movups %xmm0, 0x28(%rdi)
movl %ecx, 0x38(%rdi)
movq %r8, 0x40(%rdi)
movq $0x1, 0x48(%rdi)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x50(%rdi)
movq %rdx, 0x58(%rdi)
cmpq %r15, 0xe0(%rbp)
jae 0x1829c
movl $0x10, %edi
callq 0x74f0
movq %rax, %r13
addq $0x48, %rbp
movq %rbp, %rdi
callq 0x18b02
movl %eax, (%r13)
movq $0x0, 0x8(%r13)
movq (%r14), %rsi
movq %r13, (%r14)
testq %rsi, %rsi
je 0x1828c
movq %r14, %rdi
callq 0x1818e
movq (%r14), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1f6a0
jmp 0x182af
testq %r15, %r15
je 0x182af
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x14ed4
leaq 0x2ec0a(%rip), %rax     # 0x46ec0
lock
incq 0x80(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0x10, %esi
movq %r13, %rdi
callq 0x7500
jmp 0x182e4
jmp 0x182e1
movq %rax, %r15
movq (%r14), %rsi
testq %rsi, %rsi
je 0x182f4
movq %r14, %rdi
callq 0x1818e
movq $0x0, (%r14)
movq %rbx, %rdi
callq 0x96b0
movq %r15, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::object(unsigned long, long)
object::object(std::uint64_t initial, std::time_t exptime)
    : m_length(0), m_data(24, g_config.secure_erase()),
      m_file(nullptr), m_flags(0), m_exptime(exptime) {
    char s_value[24]; // uint64 can be as large as 20 byte decimal string.
    m_length = ::snprintf(s_value, sizeof(s_value),
                          "%llu", (unsigned long long)initial);
    m_data.append(s_value, m_length);
    g_stats.total_objects.fetch_add(1, std::memory_order_relaxed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
xorl %eax, %eax
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x2e88d(%rip), %rax     # 0x46bc0
movb 0x100(%rax), %r14b
movl $0x18, %ebp
movl $0x18, %edi
callq 0x1042a
movq %rax, 0x8(%r15)
movq %rbp, 0x10(%r15)
movq %rbp, 0x18(%r15)
movb %r14b, 0x20(%r15)
leaq 0x30(%r15), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
movl $0x0, 0x38(%r15)
movq %r13, 0x40(%r15)
movq $0x1, 0x48(%r15)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x50(%r15)
xorl %eax, %eax
movq %rax, 0x58(%r15)
leaq 0x1d219(%rip), %rdx     # 0x355ad
movq %rsp, %r13
movl $0x18, %esi
movq %r13, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x7890
movslq %eax, %rdx
movq %rdx, (%r15)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x14ed4
leaq 0x2eaff(%rip), %rax     # 0x46ec0
lock
incq 0x80(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r14), %rsi
testq %rsi, %rsi
je 0x183eb
movq %r14, %rdi
callq 0x1818e
movq $0x0, (%r14)
movq %rbx, %rdi
callq 0x96b0
movq %r15, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::set(char const*, unsigned long, unsigned int, long)
void object::set(const char* p, std::size_t len,
                 std::uint32_t flags_, std::time_t exptime) {
    m_flags = flags_;
    m_exptime = exptime;
    ++ m_cas;
    m_gc_old = 0;
    m_data.reset();

    if( len > g_config.heap_data_limit() ) {
        if( m_file.get() == nullptr ) {
            m_file = std::unique_ptr<tempfile>(new tempfile);
        } else {
            m_file->clear();
        }
        m_file->write(p, len);
    } else {
        m_file = nullptr;
        if( len > 0 )
            m_data.append(p, len);
    }
    m_length = len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %ecx, 0x38(%rdi)
movq %r8, 0x40(%rdi)
incq 0x48(%rdi)
movq %rdx, %r14
movq %rsi, %r15
movl $0x0, 0x50(%rdi)
leaq 0x8(%rdi), %r13
movq %r13, %rdi
callq 0x10e92
leaq 0x2e785(%rip), %rbp     # 0x46bc0
leaq 0x30(%rbx), %r12
movq 0x30(%rbx), %rsi
cmpq %r14, 0xe0(%rbp)
jae 0x1845b
testq %rsi, %rsi
je 0x18485
movq %rsi, %rdi
callq 0x1f6ec
jmp 0x184bf
movq $0x0, (%r12)
testq %rsi, %rsi
je 0x18470
movq %r12, %rdi
callq 0x1818e
testq %r14, %r14
je 0x184ce
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14ed4
jmp 0x184ce
movl $0x10, %edi
callq 0x74f0
movq %rax, %r13
addq $0x48, %rbp
movq %rbp, %rdi
callq 0x18b02
movl %eax, (%r13)
movq $0x0, 0x8(%r13)
movq (%r12), %rsi
movq %r13, (%r12)
testq %rsi, %rsi
je 0x184bf
movq %r12, %rdi
callq 0x1818e
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1f6a0
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r13, %rdi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::append(char const*, unsigned long)
void object::append(const char* p, std::size_t len) {
    ++ m_cas;
    m_gc_old = 0;
    if( len == 0 ) return;

    std::size_t new_size = m_length + len;
    if( new_size > g_config.heap_data_limit() ) {
        if( m_file.get() == nullptr ) {
            m_file = std::unique_ptr<tempfile>(new tempfile);
            if( m_length > 0 )
                m_file->write(m_data.data(), m_length);
            m_data.reset();
            m_file->write(p, len);
        } else {
            m_file->write(p, len);
        }
    } else {
        m_data.append(p, len);
    }
    m_length = new_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
incq 0x48(%rdi)
movl $0x0, 0x50(%rdi)
testq %rdx, %rdx
je 0x185ba
movq %rdi, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %rbp
addq %rdx, %rbp
leaq 0x2e693(%rip), %r13     # 0x46bc0
cmpq 0xe0(%r13), %rbp
jbe 0x185a8
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x1859b
movl $0x10, %edi
callq 0x74f0
movq %rax, %r12
addq $0x48, %r13
movq %r13, %rdi
callq 0x18b02
leaq 0x30(%rbx), %rdi
movl %eax, (%r12)
movq $0x0, 0x8(%r12)
movq (%rdi), %rsi
movq %r12, (%rdi)
testq %rsi, %rsi
je 0x18579
callq 0x1818e
movq (%rbx), %rdx
testq %rdx, %rdx
je 0x1858e
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
callq 0x1f6a0
leaq 0x8(%rbx), %rdi
callq 0x10e92
movq 0x30(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1f6a0
jmp 0x185b7
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14ed4
movq %rbp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r12, %rdi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::prepend(char const*, unsigned long)
void object::prepend(const char* p, std::size_t len) {
    ++ m_cas;
    m_gc_old = 0;
    if( len == 0 ) return;

    std::size_t new_size = m_length + len;
    if( new_size > g_config.heap_data_limit() ) {
        if( m_file.get() == nullptr ) {
            m_file = std::unique_ptr<tempfile>(new tempfile);
            m_file->write(p, len);
            if( m_length > 0 )
                m_file->write(m_data.data(), m_length);
            m_data.reset();
        } else {
            cybozu::dynbuf buf(new_size);
            buf.append(p, len);
            m_file->read_contents(buf);
            m_file->clear();
            m_file->write(buf.data(), new_size);
        }
    } else {
        cybozu::dynbuf buf(new_size);
        buf.append(p, len);
        buf.append(m_data.data(), m_length);
        m_data.swap(buf);
    }
    m_length = new_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
incq 0x48(%rdi)
movl $0x0, 0x50(%rdi)
testq %rdx, %rdx
je 0x18781
movq %rdi, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq (%rdi), %r14
addq %rdx, %r14
leaq 0x2e5a6(%rip), %rbp     # 0x46bc0
cmpq 0xe0(%rbp), %r14
jbe 0x1868f
leaq 0x30(%rbx), %r13
cmpq $0x0, 0x30(%rbx)
je 0x1869e
movq %r14, %rdi
callq 0x1042a
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %r14, 0x8(%rdi)
movq %r14, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movq %r12, %rsi
movq %r15, %rdx
callq 0x14ed4
movq (%r13), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1f740
movq (%r13), %rdi
callq 0x1f6ec
movq (%r13), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x1f6a0
leaq 0x10(%rsp), %rdi
jmp 0x18779
testq %r14, %r14
je 0x1870c
movq %r14, %rdi
callq 0x1042a
jmp 0x1870e
movl $0x10, %edi
callq 0x74f0
movq %rax, 0x8(%rsp)
addq $0x48, %rbp
movq %rbp, %rdi
callq 0x18b02
movq 0x8(%rsp), %rdi
movl %eax, (%rdi)
movq $0x0, 0x8(%rdi)
movq (%r13), %rsi
movq %rdi, (%r13)
testq %rsi, %rsi
je 0x186e1
movq %r13, %rdi
callq 0x1818e
movq (%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1f6a0
movq (%rbx), %rdx
testq %rdx, %rdx
je 0x18701
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
callq 0x1f6a0
leaq 0x8(%rbx), %rdi
callq 0x10e92
jmp 0x1877e
xorl %eax, %eax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %r14, 0x8(%rdi)
movq %r14, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movq %r12, %rsi
movq %r15, %rdx
callq 0x14ed4
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x14ed4
movq 0x8(%rbx), %rax
leaq 0x10(%rsp), %rdi
movq (%rdi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%rdi)
movq 0x18(%rbx), %rax
movq 0x10(%rdi), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x10(%rdi)
movq 0x28(%rbx), %rax
movq 0x20(%rdi), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x20(%rdi)
callq 0x96b0
movq %r14, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq 0x8(%rsp), %rdi
callq 0x7500
jmp 0x187b3
jmp 0x187a6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x96b0
movq %rbx, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::incr(unsigned long)
std::uint64_t object::incr(std::uint64_t n) {
    if( m_file.get() != nullptr )
        throw not_a_number{};
    std::uint64_t u64_value;
    try {
        u64_value = to_uint64(m_data.data(), m_length);
    } catch( const std::logic_error& ) {
        throw not_a_number{};
    }
    u64_value += n;
    char s_value[24]; // uint64 can be as large as 20 byte decimal string.
    m_length = ::snprintf(s_value, sizeof(s_value),
                          "%llu", (unsigned long long)u64_value);
    m_data.reset();
    m_data.append(s_value, m_length);
    ++ m_cas;
    m_gc_old = 0;
    return u64_value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x30(%rdi)
jne 0x1883b
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
callq 0x188e4
movq %rax, %r14
leaq 0x8(%rbx), %r12
addq %r15, %r14
leaq 0x1cdbc(%rip), %rdx     # 0x355ad
movq %rsp, %r15
movl $0x18, %esi
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x7890
cltq
movq %rax, (%rbx)
movq %r12, %rdi
callq 0x10e92
movq (%rbx), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x14ed4
incq 0x48(%rbx)
movl $0x0, 0x50(%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x18ae6
leaq 0x2d0b1(%rip), %rsi     # 0x45908
movq 0x2d72a(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7960
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
jmp 0x188d4
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x188d4
movq %rbx, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x1e5ca(%rip), %rsi     # 0x36e61
movq %rax, %rdi
callq 0x7a30
leaq 0x2d08a(%rip), %rax     # 0x45930
movq %rax, (%r14)
leaq 0x2d058(%rip), %rsi     # 0x45908
movq 0x2d6d1(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7960
movq %rax, %rbx
jmp 0x188cf
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
callq 0x78e0
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: (anonymous namespace)::to_uint64(char const*, unsigned long)
std::uint64_t to_uint64(const char* p, std::size_t len) {
    unsigned long long ull = std::stoull( std::string(p, len) );
    if( ull > std::numeric_limits<std::uint64_t>::max() )
        throw std::out_of_range("out of range for uint64");
    return static_cast<std::uint64_t>(ull);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rax
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq (%rsi,%rdi), %rdx
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9760
movq (%rbx), %r15
callq 0x7040
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x76e0
cmpq %r15, (%r12)
je 0x18982
movq %rax, %r14
movl (%rbx), %eax
testl %eax, %eax
je 0x18958
cmpl $0x22, %eax
jne 0x1895a
leaq 0x1bc5d(%rip), %rdi     # 0x345b0
callq 0x77a0
movl %ebp, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x18970
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7500
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bc27(%rip), %rdi     # 0x345b0
callq 0x72f0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x18998
movl %ebp, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x189ae
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7500
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.cpp
// Function: yrmcds::memcache::object::decr(unsigned long)
std::uint64_t object::decr(std::uint64_t n) {
    if( m_file.get() != nullptr )
        throw not_a_number{};
    std::uint64_t u64_value;
    try {
        u64_value = to_uint64(m_data.data(), m_length);
    } catch( const std::logic_error& ) {
        throw not_a_number{};
    }
    u64_value = (u64_value < n) ? 0 : (u64_value - n);
    char s_value[24]; // uint64 can be as large as 20 byte decimal string.
    m_length = ::snprintf(s_value, sizeof(s_value),
                          "%llu", (unsigned long long)u64_value);
    m_data.reset();
    m_data.append(s_value, m_length);
    ++ m_cas;
    m_gc_old = 0;
    return u64_value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x30(%rdi)
jne 0x18a3c
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
callq 0x188e4
leaq 0x8(%rbx), %r15
subq %r14, %rax
movl $0x0, %r14d
cmovaeq %rax, %r14
leaq 0x1cbbb(%rip), %rdx     # 0x355ad
movq %rsp, %r12
movl $0x18, %esi
movq %r12, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x7890
cltq
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x10e92
movq (%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x14ed4
incq 0x48(%rbx)
movl $0x0, 0x50(%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x18ae6
leaq 0x2ceb0(%rip), %rsi     # 0x45908
movq 0x2d529(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7960
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
jmp 0x18ad5
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x18ad5
movq %rbx, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x1e3c9(%rip), %rsi     # 0x36e61
movq %rax, %rdi
callq 0x7a30
leaq 0x2ce89(%rip), %rax     # 0x45930
movq %rax, (%r14)
leaq 0x2ce57(%rip), %rsi     # 0x45908
movq 0x2d4d0(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7960
movq %rax, %rbx
jmp 0x18ad0
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
callq 0x78e0
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/sockets.cpp
// Function: yrmcds::memcache::memcache_socket::~memcache_socket()
memcache_socket::~memcache_socket() {
    // the destructor is the safe place to release remaining locks.
    for( auto& ref: m_locks ) {
        m_hash.apply(ref.get(),
                     [](const cybozu::hash_key&, object& obj) -> bool {
                         obj.unlock(true);
                         return true;
                     }, nullptr);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x2cb32(%rip), %rax     # 0x45958
movq %rax, (%rdi)
movq 0x1a0(%rdi), %r14
movq 0x1a8(%rdi), %r13
cmpq %r13, %r14
je 0x18edd
leaq 0x3183(%rip), %rbp      # 0x1bfca
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq 0x110(%rbx), %rcx
movq (%r14), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x314b(%rip), %rax      # 0x1bfb2
movq %rax, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x28(%rsi), %rax
xorl %edx, %edx
divq (%rcx)
leaq (%rdx,%rdx,2), %rdi
shlq $0x4, %rdi
addq 0x8(%rcx), %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1ee36
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x18eb2
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x18ec9
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
addq $0x8, %r14
cmpq %r13, %r14
jne 0x18e4f
movq 0x1a0(%rbx), %r14
testq %r14, %r14
je 0x18ef4
movq 0x1b0(%rbx), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x7500
movq 0x190(%rbx), %rax
testq %rax, %rax
je 0x18f11
leaq 0x180(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x170(%rbx), %rax
testq %rax, %rax
je 0x18f2e
leaq 0x160(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0x18f49
movq 0x158(%rbx), %rsi
subq %rdi, %rsi
callq 0x7500
leaq 0x118(%rbx), %rdi
callq 0x96b0
movq %rbx, %rdi
callq 0x14d5e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18f74
jmp 0x18f74
jmp 0x18f74
jmp 0x18f74
movq %rax, %rdi
callq 0x8f80
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/sockets.cpp
// Function: yrmcds::memcache::memcache_socket::on_readable(int)
bool memcache_socket::on_readable(int) {
    if( m_busy.load(std::memory_order_acquire) ) {
        m_reactor->add_readable(*this);
        return true;
    }

    // find an idle worker.
    cybozu::worker* w = m_finder();
    if( w == nullptr ) {
        m_reactor->add_readable(*this);
        return true;
    }

    // copy the current list of slaves
    m_slaves = m_slaves_origin;

    m_busy.store(true, std::memory_order_release);
    w->post_job(m_recvjob);
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movb 0x100(%rdi), %al
testb $0x1, %al
jne 0x1902c
movq 0x108(%rbx), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x19064
callq *0x18(%rdi)
testq %rax, %rax
je 0x1902c
movq %rax, %r14
movq 0x140(%rbx), %rsi
leaq 0x148(%rbx), %rdi
callq 0x1e692
movb $0x1, 0x100(%rbx)
addq $0x160, %rbx            # imm = 0x160
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x14c8c
leaq 0x70(%r14), %rdi
movq %r15, %rsi
callq 0x14e6e
movb $0x1, 0x40(%r14)
movq %r14, %rdi
callq 0x10486
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x19058
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x19058
movq 0x8(%rbx), %rdi
addq $0x50, %rbx
movq 0x48(%rdi), %rsi
cmpq 0x50(%rdi), %rsi
je 0x1904c
movl (%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rdi)
jmp 0x19058
addq $0x40, %rdi
movq %rbx, %rdx
callq 0xaa5a
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x7170
jmp 0x1908d
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x19085
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/memcache.hpp
// Function: yrmcds::memcache::text_request::next_key(std::tuple<char const*, unsigned long> const&)
static item next_key(const item& prev) noexcept {
        const char* b;
        std::size_t len;
        std::tie(b, len) = prev;

        b += len;
        while( *b == '\x20' ) ++b;
        const char* e = (const char*)::rawmemchr(b, '\x0d');
        if( b == e ) return eos;

        const char* key_end = (const char*)std::memchr(b, '\x20', e-b);
        if( key_end == nullptr ) key_end = e;
        return item(b, key_end-b);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
leaq (%rax,%rcx), %r12
decq %r12
movq %r12, %r14
incq %r12
cmpb $0x20, 0x1(%r14)
leaq 0x1(%r14), %r14
je 0x1e8f4
movq %r14, %rdi
movl $0xd, %esi
callq 0x7640
cmpq %rax, %r14
je 0x1e93d
movq %rax, %r15
movq %rax, %rdx
subq %r12, %rdx
movq %r14, %rdi
movl $0x20, %esi
callq 0x7540
testq %rax, %rax
cmoveq %r15, %rax
subq %r12, %rax
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x1e943
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/sockets.hpp
// Function: yrmcds::memcache::memcache_socket::on_invalidate(int)
virtual void on_invalidate(int fd) override final {
        // In order to avoid races and deadlocks, remaining locks
        // are not released here.  They are released in the destructor
        // where no other threads have access to this object.
        g_stats.curr_connections.fetch_sub(1);
        cybozu::tcp_socket::on_invalidate(fd);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x282a5(%rip), %rax     # 0x46ec0
lock
decq 0x100(%rax)
movl %esi, %edi
movl $0x2, %esi
callq 0x7700
movq %rbx, %rdi
callq 0x1ff36
addq $0xd0, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7940
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.hpp
// Function: yrmcds::memcache::object::unlock(bool)
void unlock(bool force = false) {
        if( ! force && ! locked_by_self() ) {
            cybozu::dump_stack();
            std::ostringstream os;
            os << "object::unlock bug (m_lock=" << m_lock
               << ", g_context=" << g_context
               << ", unlocked thread=" << m_unlocker
               << ", this thread=" << std::this_thread::get_id();
            throw std::logic_error(os.str());
        }
        m_unlocker = std::this_thread::get_id();
        m_lock = -1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
testl %esi, %esi
jne 0x1eca3
movl 0x54(%rbx), %ebp
cmpq $0x0, 0x27341(%rip)     # 0x45fd0
je 0x1ec96
callq 0x7ab0
movq $-0x4, %r15
cmpl %fs:(%r15), %ebp
jne 0x1ecc1
callq 0x7450
movq %rax, 0x58(%rbx)
movl $0xffffffff, 0x54(%rbx) # imm = 0xFFFFFFFF
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xbb26
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x76f0
leaq 0x17798(%rip), %rsi     # 0x36472
movl $0x1b, %edx
movq %r14, %rdi
callq 0x7570
movl 0x54(%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x7980
movq %rax, %r14
leaq 0x17790(%rip), %rsi     # 0x3648e
movl $0xc, %edx
movq %rax, %rdi
callq 0x7570
cmpq $0x0, 0x272bd(%rip)     # 0x45fd0
je 0x1ed1a
callq 0x7ab0
movl %fs:(%r15), %esi
movq %r14, %rdi
callq 0x7980
movq %rax, %r14
leaq 0x1776b(%rip), %rsi     # 0x3649b
movl $0x12, %edx
movq %rax, %rdi
callq 0x7570
movq 0x58(%rbx), %rsi
movq %r14, %rdi
callq 0x1ee0b
movq %rax, %rbx
leaq 0x1775b(%rip), %rsi     # 0x364ae
movl $0xe, %edx
movq %rax, %rdi
callq 0x7570
callq 0x7450
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ee0b
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x7870
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x77f0
xorl %ebp, %ebp
movq 0x27217(%rip), %rsi     # 0x45fb8
movq 0x271e8(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1edce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x1edd8
jmp 0x1ede5
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
jmp 0x1ede5
movq %rax, %r14
movq 0x27194(%rip), %rsi     # 0x45f80
leaq 0x20(%rsp), %rdi
callq 0x7260
leaq 0x90(%rsp), %rdi
callq 0x7140
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/object.hpp
// Function: yrmcds::memcache::object::data(cybozu::dynbuf&) const
const cybozu::dynbuf& data(cybozu::dynbuf& buf) const {
        m_gc_old = 0;
        if( m_file.get() == nullptr ) return m_data;
        buf.reset();
        m_file->read_contents(buf);
        return buf;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x0, 0x50(%rdi)
cmpq $0x0, 0x30(%rdi)
je 0x1f1ca
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x10e92
movq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x1f740
jmp 0x1f1d1
addq $0x8, %r14
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/./cybozu/hash_map.hpp
// Function: cybozu::hash_map<yrmcds::memcache::object>::bucket::remove_if(cybozu::hash_key const&, std::function<bool (cybozu::hash_key const&, yrmcds::memcache::object&)> const&)
bool remove_if(const hash_key& key,
                       const std::function<bool(const hash_key&, T&)>& pred) {
            lock_guard g(m_lock);
            for( item** p = &m_objects; *p != nullptr; p = &((*p)->next) ) {
                item* to_delete = *p;
                if( to_delete->key == key ) {
                    if( pred(key, to_delete->object) ) {
                        *p = to_delete->next;
                        delete to_delete;
                    }
                    return true;
                }
            }
            return false;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
callq 0x77d0
testl %eax, %eax
jne 0x1f527
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x1f49d
movq %r14, (%rsp)
leaq 0x28(%rbx), %r14
movq 0x18(%r12), %r13
movq 0x20(%r12), %rbp
cmpq %rbp, 0x20(%r15)
jne 0x1f484
movq 0x18(%r15), %rdi
cmpq %r13, %rdi
je 0x1f4b8
movq %r13, %rsi
movq %rbp, %rdx
callq 0x7510
testl %eax, %eax
je 0x1f4b8
movq %r15, %r14
movq 0x90(%r15), %rax
addq $0x90, %r14
movq %rax, %r15
testq %rax, %rax
jne 0x1f466
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x73c0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x1f52e
leaq 0x30(%r15), %rdx
movq %r12, %rsi
callq *0x18(%rdi)
movb $0x1, %bpl
testb %al, %al
je 0x1f49f
movq 0x90(%r15), %rax
movq %rax, (%r14)
movq 0x60(%r15), %rsi
testq %rsi, %rsi
je 0x1f4f0
leaq 0x60(%r15), %rdi
callq 0x1818e
movq $0x0, 0x60(%r15)
leaq 0x38(%r15), %rdi
callq 0x96b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1f515
movq 0x10(%r15), %rsi
subq %rdi, %rsi
callq 0x7500
movl $0x98, %esi
movq %r15, %rdi
callq 0x7500
jmp 0x1f49f
movl %eax, %edi
callq 0x7320
callq 0x7170
movq %rax, %r14
movq %rbx, %rdi
callq 0x73c0
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/tempfile.cpp
// Function: yrmcds::tempfile::write(char const*, unsigned long)
void tempfile::write(const char* p, std::size_t len) {
    while( len != 0 ) {
        ssize_t n = ::write(m_fd, p, len);
        if( n == -1 )
            cybozu::throw_unix_error(errno, "write");
        p += n;
        len -= n;
        m_length += n;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0x1f6d3
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%r15), %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7150
cmpq $-0x1, %rax
je 0x1f6d9
addq %rax, %r14
addq %rax, 0x8(%r15)
subq %rax, %rbx
jne 0x1f6b3
popq %rbx
popq %r14
popq %r15
retq
callq 0x7040
movl (%rax), %edi
leaq 0x14ba3(%rip), %rsi     # 0x3428a
callq 0x8d8d
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/tempfile.cpp
// Function: yrmcds::tempfile::clear()
void tempfile::clear() {
    if( lseek(m_fd, 0, SEEK_SET) == (off_t)-1 )
        cybozu::throw_unix_error(errno, "lseek");
    if( ftruncate(m_fd, 0) == -1 )
        cybozu::throw_unix_error(errno, "ftruncate");
    m_length = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7a20
cmpq $-0x1, %rax
je 0x1f719
movl (%rbx), %edi
xorl %esi, %esi
callq 0x7720
cmpl $-0x1, %eax
je 0x1f72c
movq $0x0, 0x8(%rbx)
popq %rbx
retq
callq 0x7040
movl (%rax), %edi
leaq 0x16f1c(%rip), %rsi     # 0x36643
callq 0x8d8d
callq 0x7040
movl (%rax), %edi
leaq 0x16f0f(%rip), %rsi     # 0x36649
callq 0x8d8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/tempfile.cpp
// Function: yrmcds::tempfile::read_contents(cybozu::dynbuf&) const
void tempfile::read_contents(cybozu::dynbuf& buf) const {
    char* p = buf.prepare(m_length);

    std::size_t to_read = m_length;
    while( to_read != 0 ) {
        ssize_t n = pread(m_fd, p, to_read, m_length - to_read);
        if( n == -1 )
            cybozu::throw_unix_error(errno, "pread");
        if( n == 0 )
            throw std::runtime_error("<tempfile::read_contents> unexpected EOF.");
        p += n;
        to_read -= n;
        buf.consume(n);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %r12
subq %r12, %rax
cmpq %r15, %rax
jae 0x1f775
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1516c
movq 0x20(%rbx), %r12
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x1f7a9
addq (%rbx), %r12
movl (%r14), %edi
movq 0x8(%r14), %rcx
subq %r15, %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x75f0
testq %rax, %rax
je 0x1f7b5
cmpq $-0x1, %rax
je 0x1f7e7
addq %rax, %r12
addq %rax, 0x20(%rbx)
subq %rax, %r15
jne 0x1f77d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x16e90(%rip), %rsi     # 0x36659
movq %rax, %rdi
callq 0x7190
movq 0x26818(%rip), %rsi     # 0x45ff0
movq 0x26791(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7960
callq 0x7040
movl (%rax), %edi
leaq 0x16e5e(%rip), %rsi     # 0x36653
callq 0x8d8d
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/hash_map.cpp
// Function: cybozu::nearest_prime(unsigned int)
unsigned int nearest_prime(unsigned int n) noexcept {
    static_assert( sizeof(n) >= 4, "Too small unsigned int." );
    if( n == 2 ) return 2;
    for( unsigned int i = n|1; ; i += 2 ) {
        bool prime = true;
        unsigned int r = (unsigned int)std::rint( std::sqrt((double)i) );
        for( unsigned int j = 3; j <= r; j += 2 ) {
            if( (i % j) == 0 ) {
                prime = false;
                break;
            }
        }
        if( prime ) return i;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x2, %ebx
cmpl $0x2, %edi
je 0x1f840
movl %edi, %r14d
orl $0x1, %r14d
cvtsi2sd %r14, %xmm0
sqrtsd %xmm0, %xmm0
callq 0x7770
cvttsd2si %xmm0, %rcx
movl %r14d, %ebx
cmpl $0x3, %ecx
jae 0x1f84a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x3, %esi
movl %ebx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
je 0x1f862
addl $0x2, %esi
cmpl %ecx, %esi
jbe 0x1f84f
jmp 0x1f840
addl $0x2, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
sqrtsd %xmm0, %xmm0
callq 0x7770
cvttsd2si %xmm0, %rcx
cmpl $0x2, %ecx
ja 0x1f84a
jmp 0x1f840
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/tcp.cpp
// Function: cybozu::tcp_socket::free_buffers()
void tcp_socket::free_buffers() {
    lock_guard g(m_lock);
    for( auto& t: m_pending ) {
        char* p;
        std::tie(p, std::ignore, std::ignore) = t;
        FREE(p);
    }
    m_pending.clear();
    for( char* p: m_free_buffers ) {
        FREE(p);
    }
    m_free_buffers.clear();
    m_tmpbuf.clear();
    m_tmpbuf.shrink_to_fit();
    m_shutdown = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xa8(%rdi), %rax
movq %rsp, %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x17b8c
movb $0x1, 0x8(%r14)
movq 0x70(%rbx), %r14
movq 0x78(%rbx), %r15
cmpq %r15, %r14
je 0x1ff8e
movq 0x10(%r14), %rdi
callq 0x75a0
addq $0x18, %r14
cmpq %r15, %r14
jne 0x1ff6e
movq 0x70(%rbx), %rax
cmpq %rax, 0x78(%rbx)
je 0x1ff8e
movq %rax, 0x78(%rbx)
movq 0x58(%rbx), %r14
movq 0x60(%rbx), %r15
cmpq %r15, %r14
je 0x1ffba
movq (%r14), %rdi
callq 0x75a0
addq $0x8, %r14
cmpq %r15, %r14
jne 0x1ff9b
movq 0x58(%rbx), %rax
cmpq %rax, 0x60(%rbx)
je 0x1ffba
movq %rax, 0x60(%rbx)
movq 0x88(%rbx), %rax
cmpq %rax, 0x90(%rbx)
je 0x1ffd1
movq %rax, 0x90(%rbx)
cmpq %rax, 0x98(%rbx)
je 0x1ffe6
leaq 0x88(%rbx), %rdi
callq 0x21680
movb $0x1, 0xa0(%rbx)
movq %rsp, %rdi
callq 0x17b76
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/tcp.hpp
// Function: cybozu::tcp_socket::can_send(unsigned long) const
bool can_send(std::size_t len) const {
        if( m_shutdown ) return true; // in fact, fail
        if( ! m_tmpbuf.empty() ) return false;
        if( m_pending.empty() ) return true;
        return capacity() >= len;
    }

// Assembly:
movb $0x1, %al
cmpb $0x0, 0xa0(%rdi)
jne 0x2142d
movq 0x88(%rdi), %rcx
cmpq 0x90(%rdi), %rcx
je 0x2142e
xorl %eax, %eax
retq
movq 0x78(%rdi), %rcx
cmpq %rcx, 0x70(%rdi)
je 0x2142d
movq 0x60(%rdi), %rax
subq 0x58(%rdi), %rax
shlq $0x11, %rax
subq -0x10(%rcx), %rax
addq $0x100000, %rax         # imm = 0x100000
cmpq %rsi, %rax
setae %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/counter/counter.cpp
// Function: yrmcds::counter::response::error(yrmcds::counter::status)
void response::error(counter::status status) {
    switch( status ) {
    case counter::status::NotFound:
        send_error(status, STATUS_NOT_FOUND,
                   sizeof(STATUS_NOT_FOUND) - 1);
        break;
    case counter::status::Invalid:
        send_error(status, STATUS_INVALID,
                   sizeof(STATUS_INVALID) - 1);
        break;
    case counter::status::ResourceNotAvailable:
        send_error(status, STATUS_RESOURCE_NOT_AVAILABLE,
                   sizeof(STATUS_RESOURCE_NOT_AVAILABLE) - 1);
        break;
    case counter::status::NotAcquired:
        send_error(status, STATUS_NOT_ACQUIRED,
                   sizeof(STATUS_NOT_ACQUIRED) - 1);
        break;
    case counter::status::UnknownCommand:
        send_error(status, STATUS_UNKNOWN_COMMAND,
                   sizeof(STATUS_UNKNOWN_COMMAND) - 1);
        break;
    case counter::status::OutOfMemory:
        send_error(status, STATUS_OUT_OF_MEMORY,
                   sizeof(STATUS_OUT_OF_MEMORY) - 1);
        break;
    default:
        cybozu::dump_stack();
        throw std::logic_error("<counter::response::error> invalid status: " +
                               std::to_string((std::uint8_t)status));
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
cmpl $0x21, %esi
jg 0x21c23
cmpl $0x1, %ebp
je 0x21c71
cmpl $0x4, %ebp
je 0x21c4b
cmpl $0x21, %ebp
jne 0x21ca2
leaq 0x14ce9(%rip), %rdx     # 0x36900
movl $0x16, %ecx
movl $0x21, %esi
jmp 0x21c95
cmpl $0x22, %ebp
je 0x21c84
cmpl $0x81, %ebp
je 0x21c5e
cmpl $0x82, %ebp
jne 0x21ca2
leaq 0x14d01(%rip), %rdx     # 0x36940
movl $0xb, %ecx
movl $0x82, %esi
jmp 0x21c95
leaq 0x14c8e(%rip), %rdx     # 0x368e0
movl $0x11, %ecx
movl $0x4, %esi
jmp 0x21c95
leaq 0x14ccb(%rip), %rdx     # 0x36930
movl $0xf, %ecx
movl $0x81, %esi
jmp 0x21c95
leaq 0x14c58(%rip), %rdx     # 0x368d0
movl $0x9, %ecx
movl $0x1, %esi
jmp 0x21c95
leaq 0x14c8c(%rip), %rdx     # 0x36917
movl $0xc, %ecx
movl $0x22, %esi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21d70
callq 0xbb26
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movzbl %bpl, %esi
movq %rsp, %rdi
callq 0xe401
leaq 0x14c85(%rip), %rsi     # 0x3694c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xe391
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x77f0
xorl %ebp, %ebp
movq 0x242cb(%rip), %rsi     # 0x45fb8
movq 0x2429c(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21d1a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21d35
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x21d5f
jmp 0x21d67
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21d5f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7500
jmp 0x21d5f
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/counter/counter.cpp
// Function: yrmcds::counter::response::get(unsigned int)
void response::get(std::uint32_t consumption) {
    char header[HEADER_SIZE];
    char body[4];
    fill_header(header, counter::status::OK, sizeof(body));
    cybozu::hton(consumption, body);
    cybozu::tcp_socket::iovec iov[] = {
        {header, HEADER_SIZE},
        {body, sizeof(body)},
    };
    m_socket.sendv(iov, 2, true);
}

// Assembly:
subq $0x58, %rsp
leaq 0x4(%rsp), %rax
movb $-0x6f, (%rax)
movq 0x8(%rdi), %rcx
movb 0x8(%rcx), %dl
movb %dl, 0x1(%rax)
movw $0x0, 0x2(%rax)
movl $0x4000000, 0x4(%rax)   # imm = 0x4000000
movq 0x10(%rcx), %rcx
movl (%rcx), %ecx
movl %ecx, 0x8(%rax)
bswapl %esi
movq %rsp, %rcx
movl %esi, (%rcx)
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq $0xc, 0x8(%rdx)
movq %rcx, 0x10(%rdx)
movq $0x4, 0x18(%rdx)
movq (%rdi), %rdi
leaq 0x38(%rsp), %rsi
movl $0x2, (%rsi)
movq %rdi, 0x8(%rsi)
movq %rdx, 0x10(%rsi)
movb $0x1, 0x18(%rsi)
callq 0x22726
addq $0x58, %rsp
retq
nop