LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e781(%rip), %rax     # 0x46bc0
movb 0x100(%rax), %r14b
movl $0x18, %ebp
movl $0x18, %edi
callq 0x104a0
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 0x1d0c9(%rip), %rdx     # 0x35569
movq %rsp, %r13
movl $0x18, %esi
movq %r13, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x78a0
movslq %eax, %rdx
movq %rdx, (%r15)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x14fa6
leaq 0x2e9f3(%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 0x184f7
movq %r14, %rdi
callq 0x18286
movq $0x0, (%r14)
movq %rbx, %rdi
callq 0x96e2
movq %r15, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10f0c
leaq 0x2e679(%rip), %rbp     # 0x46bc0
leaq 0x30(%rbx), %r12
movq 0x30(%rbx), %rsi
cmpq %r14, 0xe0(%rbp)
jae 0x18567
testq %rsi, %rsi
je 0x18591
movq %rsi, %rdi
callq 0x1ff18
jmp 0x185de
movq $0x0, (%r12)
testq %rsi, %rsi
je 0x1857c
movq %r12, %rdi
callq 0x18286
testq %r14, %r14
je 0x185ed
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14fa6
jmp 0x185ed
movl $0x10, %edi
callq 0x7500
movq %rax, %r13
addq $0x48, %rbp
movq %rbp, %rdi
callq 0x18c56
movl %eax, (%r13)
xorl %eax, %eax
movq %rax, 0x8(%r13)
movq %rax, (%rsp)
movq (%r12), %rsi
movq %r13, (%r12)
testq %rsi, %rsi
je 0x185cd
movq %r12, %rdi
callq 0x18286
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x185de
movq %rsp, %rdi
callq 0x18286
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1fecc
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 0x7510
movq %rbx, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x186f1
movq %rdi, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %rbp
addq %rdx, %rbp
leaq 0x2e573(%rip), %r13     # 0x46bc0
cmpq 0xe0(%r13), %rbp
jbe 0x186df
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x186d2
movl $0x10, %edi
callq 0x7500
movq %rax, %r12
addq $0x48, %r13
movq %r13, %rdi
callq 0x18c56
leaq 0x30(%rbx), %rdi
movl %eax, (%r12)
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq %rax, (%rsp)
movq (%rdi), %rsi
movq %r12, (%rdi)
testq %rsi, %rsi
je 0x1869f
callq 0x18286
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x186b0
movq %rsp, %rdi
callq 0x18286
movq (%rbx), %rdx
testq %rdx, %rdx
je 0x186c5
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
callq 0x1fecc
leaq 0x8(%rbx), %rdi
callq 0x10f0c
movq 0x30(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1fecc
jmp 0x186ee
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14fa6
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 0x7510
movq %rbx, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1898f
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
callq 0x18a38
movq %rax, %r14
leaq 0x8(%rbx), %r12
addq %r15, %r14
leaq 0x1cc24(%rip), %rdx     # 0x35569
movq %rsp, %r15
movl $0x18, %esi
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x78a0
cltq
movq %rax, (%rbx)
movq %r12, %rdi
callq 0x10f0c
movq (%rbx), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x14fa6
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 0x18c3a
leaq 0x2cf5d(%rip), %rsi     # 0x45908
movq 0x2d5d6(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
jmp 0x18a28
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x18a28
movq %rbx, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x1e4c6(%rip), %rsi     # 0x36eb1
movq %rax, %rdi
callq 0x7a40
leaq 0x2cf36(%rip), %rax     # 0x45930
movq %rax, (%r14)
leaq 0x2cf04(%rip), %rsi     # 0x45908
movq 0x2d57d(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
jmp 0x18a23
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
callq 0x78f0
movq %rbx, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 0x97a0
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 0x76f0
cmpq %r15, (%r12)
je 0x18ad6
movq %rax, %r14
movl (%rbx), %eax
testl %eax, %eax
je 0x18aac
cmpl $0x22, %eax
jne 0x18aae
leaq 0x1bb09(%rip), %rdi     # 0x345b0
callq 0x77b0
movl %ebp, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x18ac4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7510
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bad3(%rip), %rdi     # 0x345b0
callq 0x72f0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x18aec
movl %ebp, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x18b02
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18b90
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
callq 0x18a38
leaq 0x8(%rbx), %r15
subq %r14, %rax
movl $0x0, %r14d
cmovaeq %rax, %r14
leaq 0x1ca23(%rip), %rdx     # 0x35569
movq %rsp, %r12
movl $0x18, %esi
movq %r12, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x78a0
cltq
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x10f0c
movq (%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x14fa6
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 0x18c3a
leaq 0x2cd5c(%rip), %rsi     # 0x45908
movq 0x2d3d5(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
jmp 0x18c29
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x18c29
movq %rbx, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x1e2c5(%rip), %rsi     # 0x36eb1
movq %rax, %rdi
callq 0x7a40
leaq 0x2cd35(%rip), %rax     # 0x45930
movq %rax, (%r14)
leaq 0x2cd03(%rip), %rsi     # 0x45908
movq 0x2d37c(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
jmp 0x18c24
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
callq 0x78f0
movq %rbx, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c9c4(%rip), %rax     # 0x45958
movq %rax, (%rdi)
movq 0x1a0(%rdi), %r12
movq 0x1a8(%rdi), %r13
cmpq %r13, %r12
je 0x19045
leaq 0x36d3(%rip), %rbp      # 0x1c688
movq %rsp, %r14
leaq 0x20(%rsp), %r15
movq 0x110(%rbx), %rcx
movq (%r12), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x369a(%rip), %rax      # 0x1c670
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 %r14, %rdx
movq %r15, %rcx
callq 0x1f628
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x19021
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x19038
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
addq $0x8, %r12
cmpq %r13, %r12
jne 0x18fbd
movq 0x1a0(%rbx), %rdi
testq %rdi, %rdi
je 0x19060
movq 0x1b0(%rbx), %rsi
subq %rdi, %rsi
callq 0x7510
movq 0x190(%rbx), %rax
testq %rax, %rax
je 0x1907d
leaq 0x180(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x170(%rbx), %rax
testq %rax, %rax
je 0x1909a
leaq 0x160(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0x190b5
movq 0x158(%rbx), %rsi
subq %rdi, %rsi
callq 0x7510
leaq 0x118(%rbx), %rdi
callq 0x96e2
movq %rbx, %rdi
callq 0x14e28
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x190e0
jmp 0x190e0
jmp 0x190e0
jmp 0x190e0
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 0x19198
movq 0x108(%rbx), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x191d0
callq *0x18(%rdi)
testq %rax, %rax
je 0x19198
movq %rax, %r14
movq 0x140(%rbx), %rsi
leaq 0x148(%rbx), %rdi
callq 0x1ee90
movb $0x1, 0x100(%rbx)
addq $0x160, %rbx            # imm = 0x160
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x14d4e
leaq 0x70(%r14), %rdi
movq %r15, %rsi
callq 0x14f38
movb $0x1, 0x40(%r14)
movq %r14, %rdi
callq 0x104fc
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x191c4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x191c4
movq 0x8(%rbx), %rdi
addq $0x50, %rbx
movq 0x48(%rdi), %rsi
cmpq 0x50(%rdi), %rsi
je 0x191b8
movl (%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rdi)
jmp 0x191c4
addq $0x40, %rdi
movq %rbx, %rdx
callq 0xaac6
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x7170
jmp 0x191f9
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x191f1
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/memcache/sockets.hpp
// Function: yrmcds::memcache::memcache_socket::unlock_all()
void unlock_all() {
        for( auto& ref: m_locks ) {
            m_hash.apply(ref.get(),
                         [](const cybozu::hash_key&, object& obj) -> bool {
                             obj.unlock(false);
                             return true;
                         }, nullptr);
        }
        m_locks.clear();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x1a0(%rdi), %r12
movq 0x1a8(%rdi), %r13
cmpq %r13, %r12
je 0x1f025
leaq 0x4b1(%rip), %rbp       # 0x1f446
movq %rsp, %r14
leaq 0x20(%rsp), %r15
movq 0x110(%rbx), %rcx
movq (%r12), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x480(%rip), %rax       # 0x1f436
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 %r14, %rdx
movq %r15, %rcx
callq 0x1f628
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x1f001
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1f018
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
addq $0x8, %r12
cmpq %r13, %r12
jne 0x1ef9d
movq 0x1a0(%rbx), %rax
cmpq %rax, 0x1a8(%rbx)
je 0x1f03c
movq %rax, 0x1a8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1f08c
jmp 0x1f08c
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x1f06b
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1f082
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79b0
jmp 0x1f08c
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f0e4
movq %r14, %rdi
movl $0xd, %esi
callq 0x7650
cmpq %rax, %r14
je 0x1f12d
movq %rax, %r15
movq %rax, %rdx
subq %r12, %rdx
movq %r14, %rdi
movl $0x20, %esi
callq 0x7550
testq %rax, %rax
cmoveq %r15, %rax
subq %r12, %rax
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x1f133
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_O1/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 0x27ab7(%rip), %rax     # 0x46ec0
lock
decq 0x100(%rax)
movl %esi, %edi
movl $0x2, %esi
callq 0x7710
movq %rbx, %rdi
callq 0x20756
addq $0xd0, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7950
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f491
movl 0x54(%rbx), %ebp
cmpq $0x0, 0x26b53(%rip)     # 0x45fd0
je 0x1f484
callq 0x7ac0
movq $-0x4, %r15
cmpl %fs:(%r15), %ebp
jne 0x1f4af
callq 0x7460
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 0xbb8e
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x7700
leaq 0x16f9a(%rip), %rsi     # 0x36462
movl $0x1b, %edx
movq %r14, %rdi
callq 0x7580
movl 0x54(%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x7990
movq %rax, %r14
leaq 0x16f92(%rip), %rsi     # 0x3647e
movl $0xc, %edx
movq %rax, %rdi
callq 0x7580
cmpq $0x0, 0x26acf(%rip)     # 0x45fd0
je 0x1f508
callq 0x7ac0
movl %fs:(%r15), %esi
movq %r14, %rdi
callq 0x7990
movq %rax, %r14
leaq 0x16f6d(%rip), %rsi     # 0x3648b
movl $0x12, %edx
movq %rax, %rdi
callq 0x7580
movq 0x58(%rbx), %rsi
movq %r14, %rdi
callq 0x1f5fc
movq %rax, %rbx
leaq 0x16f5d(%rip), %rsi     # 0x3649e
movl $0xe, %edx
movq %rax, %rdi
callq 0x7580
callq 0x7460
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1f5fc
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x7880
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7800
xorl %ebp, %ebp
movq 0x26a29(%rip), %rsi     # 0x45fb8
movq 0x269fa(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f5c4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0x1f5c4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1f5d6
movq %rbx, %rdi
callq 0x7370
jmp 0x1f5d6
movq %rax, %r14
movq 0x269a3(%rip), %rsi     # 0x45f80
leaq 0x20(%rsp), %rdi
callq 0x7260
leaq 0x90(%rsp), %rdi
callq 0x7140
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f9c6
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x10f0c
movq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x1ff6c
jmp 0x1f9cd
addq $0x8, %r14
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movq %rdi, %rbx
callq 0x77e0
testl %eax, %eax
jne 0x1fd53
movq 0x28(%rbx), %r12
testq %r12, %r12
setne %bpl
movq %rbx, (%rsp)
je 0x1fd30
leaq 0x28(%rbx), %r13
movq 0x20(%r12), %rdx
cmpq 0x20(%r15), %rdx
jne 0x1fc8f
movq 0x18(%r12), %rdi
movq 0x18(%r15), %rsi
cmpq %rsi, %rdi
je 0x1fc93
callq 0x7520
testl %eax, %eax
sete %bl
jmp 0x1fc95
xorl %ebx, %ebx
jmp 0x1fc95
movb $0x1, %bl
testb %bl, %bl
je 0x1fd11
cmpq $0x0, 0x10(%r14)
je 0x1fd4e
leaq 0x30(%r12), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq *0x18(%r14)
testb %al, %al
je 0x1fd0d
movq 0x90(%r12), %rax
movq %rax, (%r13)
movq 0x60(%r12), %rsi
testq %rsi, %rsi
je 0x1fcd7
leaq 0x60(%r12), %rdi
callq 0x18286
movq $0x0, 0x60(%r12)
leaq 0x38(%r12), %rdi
callq 0x96e2
movq (%r12), %rdi
testq %rdi, %rdi
je 0x1fd00
movq 0x10(%r12), %rsi
subq %rdi, %rsi
callq 0x7510
movl $0x98, %esi
movq %r12, %rdi
callq 0x7510
testb %bl, %bl
jne 0x1fd30
movq (%r13), %r13
movq 0x90(%r13), %r12
addq $0x90, %r13
testq %r12, %r12
setne %bpl
jne 0x1fc6a
movq (%rsp), %rdi
callq 0x73c0
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7170
movl %eax, %edi
callq 0x7320
jmp 0x1fd5c
movq %rax, %r14
movq (%rsp), %rdi
callq 0x73c0
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1feff
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%r15), %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7150
cmpq $-0x1, %rax
je 0x1ff05
addq %rax, %r14
addq %rax, 0x8(%r15)
subq %rax, %rbx
jne 0x1fedf
popq %rbx
popq %r14
popq %r15
retq
callq 0x7040
movl (%rax), %edi
leaq 0x14377(%rip), %rsi     # 0x3428a
callq 0x8dd3
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7a30
cmpq $-0x1, %rax
je 0x1ff45
movl (%rbx), %edi
xorl %esi, %esi
callq 0x7730
cmpl $-0x1, %eax
je 0x1ff58
movq $0x0, 0x8(%rbx)
popq %rbx
retq
callq 0x7040
movl (%rax), %edi
leaq 0x166e0(%rip), %rsi     # 0x36633
callq 0x8dd3
callq 0x7040
movl (%rax), %edi
leaq 0x166d3(%rip), %rsi     # 0x36639
callq 0x8dd3
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %rsi
movq 0x10(%rbx), %rax
subq 0x20(%rbx), %rax
cmpq %rsi, %rax
jae 0x1ff93
movq %rbx, %rdi
callq 0x15236
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x1ffcf
movq (%rbx), %r12
addq 0x20(%rbx), %r12
movl (%r14), %edi
movq 0x8(%r14), %rcx
subq %r15, %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x7600
testq %rax, %rax
je 0x1ffdb
cmpq $-0x1, %rax
je 0x2000d
addq %rax, %r12
addq %rax, 0x20(%rbx)
subq %rax, %r15
jne 0x1ffa3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x1665a(%rip), %rsi     # 0x36649
movq %rax, %rdi
callq 0x7190
movq 0x25ff2(%rip), %rsi     # 0x45ff0
movq 0x25f6b(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7970
callq 0x7040
movl (%rax), %edi
leaq 0x16628(%rip), %rsi     # 0x36643
callq 0x8dd3
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
movl $0x2, %ebp
cmpl $0x2, %edi
je 0x200a8
movl %edi, %ebx
orl $0x1, %ebx
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
ucomisd 0x16620(%rip), %xmm0    # 0x36678
jb 0x20060
sqrtsd %xmm0, %xmm0
jmp 0x20065
callq 0x73e0
callq 0x7780
cvttsd2si %xmm0, %rsi
cmpl $0x3, %esi
setb %cl
jae 0x2007b
movl %ebx, %ebp
jmp 0x200a1
imull $0xaaaaaaab, %ebx, %eax # imm = 0xAAAAAAAB
cmpl $0x55555556, %eax       # imm = 0x55555556
jb 0x200a1
movl $0x5, %edi
cmpl %esi, %edi
seta %cl
ja 0x20077
movl %ebx, %eax
xorl %edx, %edx
divl %edi
addl $0x2, %edi
testl %edx, %edx
jne 0x2008d
addl $0x2, %ebx
testb %cl, %cl
je 0x20046
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x17c58
movb $0x1, 0x8(%r14)
movq 0x70(%rbx), %r14
movq 0x78(%rbx), %r15
cmpq %r15, %r14
je 0x2079d
movq 0x10(%r14), %rdi
callq 0x75b0
addq $0x18, %r14
jmp 0x20789
movq 0x70(%rbx), %rax
cmpq %rax, 0x78(%rbx)
je 0x207ab
movq %rax, 0x78(%rbx)
movq 0x58(%rbx), %r14
movq 0x60(%rbx), %r15
cmpq %r15, %r14
je 0x207c6
movq (%r14), %rdi
callq 0x75b0
addq $0x8, %r14
jmp 0x207b3
movq 0x58(%rbx), %rax
cmpq %rax, 0x60(%rbx)
je 0x207d4
movq %rax, 0x60(%rbx)
movq 0x88(%rbx), %rax
cmpq %rax, 0x90(%rbx)
je 0x207eb
movq %rax, 0x90(%rbx)
movq 0x98(%rbx), %rax
cmpq 0x90(%rbx), %rax
je 0x20807
leaq 0x88(%rbx), %rdi
callq 0x21fbc
movb $0x1, 0xa0(%rbx)
movq %rsp, %rdi
callq 0x17c42
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x21d63
movq 0x88(%rdi), %rcx
cmpq 0x90(%rdi), %rcx
je 0x21d64
xorl %eax, %eax
retq
movq 0x70(%rdi), %rcx
cmpq 0x78(%rdi), %rcx
je 0x21d63
movq 0x60(%rdi), %rax
movq 0x78(%rdi), %rdx
subq 0x58(%rdi), %rax
shlq $0x11, %rax
cmpq %rdx, %rcx
je 0x21d8d
subq -0x10(%rdx), %rax
addq $0x100000, %rax         # imm = 0x100000
cmpq %rsi, %rax
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2256b
cmpl $0x1, %ebp
je 0x225b9
cmpl $0x4, %ebp
je 0x22593
cmpl $0x21, %ebp
jne 0x225ea
leaq 0x143b1(%rip), %rdx     # 0x36910
movl $0x16, %ecx
movl $0x21, %esi
jmp 0x225dd
cmpl $0x22, %ebp
je 0x225cc
cmpl $0x81, %ebp
je 0x225a6
cmpl $0x82, %ebp
jne 0x225ea
leaq 0x143c9(%rip), %rdx     # 0x36950
movl $0xb, %ecx
movl $0x82, %esi
jmp 0x225dd
leaq 0x14356(%rip), %rdx     # 0x368f0
movl $0x11, %ecx
movl $0x4, %esi
jmp 0x225dd
leaq 0x14393(%rip), %rdx     # 0x36940
movl $0xf, %ecx
movl $0x81, %esi
jmp 0x225dd
leaq 0x14320(%rip), %rdx     # 0x368e0
movl $0x9, %ecx
movl $0x1, %esi
jmp 0x225dd
leaq 0x14354(%rip), %rdx     # 0x36927
movl $0xc, %ecx
movl $0x22, %esi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x226a2
callq 0xbb8e
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movzbl %bpl, %esi
movq %rsp, %rdi
callq 0xe425
leaq 0x1434d(%rip), %rsi     # 0x3695c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xe3b5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7800
xorl %ebp, %ebp
movq 0x23983(%rip), %rsi     # 0x45fb8
movq 0x23954(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2266a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0x2266a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2268d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0x2268d
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2269a
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/counter/counter.cpp
// Function: yrmcds::counter::response::send_error(yrmcds::counter::status, char const*, unsigned long)
void response::send_error(counter::status status, const char* message,
                          std::size_t length) {
    char header[HEADER_SIZE];
    fill_header(header, status, length);
    cybozu::tcp_socket::iovec iov[] = {
        {header, HEADER_SIZE},
        {message, length},
    };
    m_socket.sendv(iov, 2, true);
}

// Assembly:
subq $0x58, %rsp
leaq 0x4(%rsp), %rax
movb $-0x6f, (%rax)
movq 0x8(%rdi), %r8
movb 0x8(%r8), %r9b
movb %r9b, 0x1(%rax)
movb %sil, 0x2(%rax)
movb $0x0, 0x3(%rax)
movl %ecx, %esi
bswapl %esi
movl %esi, 0x4(%rax)
movq 0x10(%r8), %rsi
movl (%rsi), %esi
movl %esi, 0x8(%rax)
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq $0xc, 0x8(%r8)
movq %rdx, 0x10(%r8)
movq %rcx, 0x18(%r8)
movq (%rdi), %rdi
leaq 0x38(%rsp), %rsi
movl $0x2, (%rsi)
movq %rdi, 0x8(%rsi)
movq %r8, 0x10(%rsi)
movb $0x1, 0x18(%rsi)
callq 0x23058
addq $0x58, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23058
addq $0x58, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/counter/counter.cpp
// Function: yrmcds::counter::response::dump(char const*, unsigned short, unsigned int, unsigned int)
void response::dump(const char* name, std::uint16_t name_len,
                    std::uint32_t consumption, std::uint32_t max_conumption) {
    char header[HEADER_SIZE];
    char body[10];
    fill_header(header, counter::status::OK, sizeof(body) + name_len);
    cybozu::hton(consumption, body);
    cybozu::hton(max_conumption, body + 4);
    cybozu::hton(name_len, body + 8);
    cybozu::tcp_socket::iovec iov[] = {
        {header, HEADER_SIZE},
        {body, sizeof(body)},
        {name, name_len},
    };
    m_socket.sendv(iov, 3, false);
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movl %edx, %eax
movl %edx, %r9d
addl $0xa, %r9d
leaq 0x14(%rsp), %r10
movb $-0x6f, (%r10)
movq 0x8(%rdi), %r11
movb 0x8(%r11), %bl
movb %bl, 0x1(%r10)
movw $0x0, 0x2(%r10)
bswapl %r9d
movl %r9d, 0x4(%r10)
movq 0x10(%r11), %r9
movl (%r9), %r9d
movl %r9d, 0x8(%r10)
bswapl %ecx
leaq 0x8(%rsp), %r9
movl %ecx, (%r9)
bswapl %r8d
movl %r8d, 0x4(%r9)
rolw $0x8, %dx
movw %dx, 0x8(%r9)
leaq 0x40(%rsp), %rcx
movq %r10, (%rcx)
movq $0xc, 0x8(%rcx)
movq %r9, 0x10(%rcx)
movq $0xa, 0x18(%rcx)
movq %rsi, 0x20(%rcx)
movq %rax, 0x28(%rcx)
movq (%rdi), %rdi
leaq 0x20(%rsp), %rsi
movl $0x3, (%rsi)
movq %rdi, 0x8(%rsi)
movq %rcx, 0x10(%rsi)
movb $0x0, 0x18(%rsi)
callq 0x23058
addq $0x70, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/counter/counter.cpp
// Function: (anonymous namespace)::add_stat(std::vector<char, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void add_stat(std::vector<char>& body, const std::string& name,
              const std::string& value) {
    char buffer[4];
    cybozu::hton((uint16_t)name.size(), buffer);
    cybozu::hton((uint16_t)value.size(), buffer + 2);
    body.insert(body.end(), buffer, buffer + 4);
    body.insert(body.end(), name.begin(), name.end());
    body.insert(body.end(), value.begin(), value.end());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movzwl 0x8(%rsi), %eax
rolw $0x8, %ax
movq %rdi, %r14
leaq 0x10(%rsp), %rcx
movw %ax, -0x4(%rcx)
movzwl 0x8(%rdx), %eax
rolw $0x8, %ax
movw %ax, -0x2(%rcx)
movq 0x8(%rdi), %rsi
leaq 0xc(%rsp), %rdx
callq 0x231ac
movq 0x8(%r14), %rsi
movq (%r15), %rdx
movq 0x8(%r15), %rcx
addq %rdx, %rcx
movq %r14, %rdi
callq 0x2338c
movq 0x8(%r14), %rsi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
addq %rdx, %rcx
movq %r14, %rdi
callq 0x2338c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/./cybozu/tcp.hpp
// Function: cybozu::tcp_socket::sendv(cybozu::tcp_socket::iovec const*, int, bool)::'lambda'(int)::operator()(int) const
bool sendv(const iovec* iov, int iovcnt, bool flush=false) {
        return with_fd([=](int fd) -> bool {
            if( iovcnt >= MAX_IOVCNT )
                throw std::logic_error("<tcp_socket::sendv> too many iovec.");
            lock_guard g(m_lock);
            if( ! _sendv(fd, iov, iovcnt, g) )
                return false;
            if( flush && empty() )
                _flush(fd);
            return true;
        });
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x14, (%rdi)
jge 0x2315a
movl %esi, %ebx
movq %rdi, %r15
movq 0x8(%rdi), %r14
leaq 0xa8(%r14), %rax
movq %rsp, %r12
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
movq %r12, %rdi
callq 0x17c58
movb $0x1, 0x8(%r12)
movq 0x10(%r15), %rdx
movl (%r15), %ecx
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %r8
callq 0x20bf6
movl %eax, %ebp
testb %al, %al
je 0x23143
cmpb $0x1, 0x18(%r15)
jne 0x23143
movq 0x70(%r14), %rax
cmpq 0x78(%r14), %rax
jne 0x23143
movq 0x90(%r14), %rax
cmpq %rax, 0x88(%r14)
jne 0x23143
movq %r14, %rdi
movl %ebx, %esi
callq 0x17c04
movq %rsp, %rdi
callq 0x17c42
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x138d5(%rip), %rsi     # 0x36a43
movq %rax, %rdi
callq 0x77a0
movq 0x22e3b(%rip), %rsi     # 0x45fb8
movq 0x22e0c(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
jmp 0x231a4
movq %rax, %r14
movq %rsp, %rdi
callq 0x17c42
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/counter/gc.cpp
// Function: yrmcds::counter::gc_thread::run()
void gc_thread::run() {
    using namespace std::chrono;
    auto t1 = steady_clock::now();

    gc();
    g_stats.objects.store(m_objects, std::memory_order_relaxed);
    g_stats.used_memory.store(m_used_memory, std::memory_order_relaxed);
    g_stats.conflicts.store(m_conflicts, std::memory_order_relaxed);
    g_stats.gc_count.fetch_add(1, std::memory_order_relaxed);

    auto t2 = steady_clock::now();
    std::uint64_t us = (std::uint64_t)duration_cast<microseconds>(t2-t1).count();
    g_stats.last_gc_elapsed.store(us, std::memory_order_relaxed);
    g_stats.total_gc_elapsed.fetch_add(us, std::memory_order_relaxed);

    cybozu::logger::debug() << "Semaphore GC end: elapsed=" << us
                            << "us, survived=" << m_objects;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x76d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x23730
movl 0x18(%rbx), %eax
leaq 0x236be(%rip), %r15     # 0x46d00
movl %eax, (%r15)
movq 0x20(%rbx), %rax
movq %rax, 0x8(%r15)
movl 0x1c(%rbx), %eax
movl %eax, 0x10(%r15)
lock
incl 0x14(%r15)
callq 0x76d0
subq %r14, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r14
addq %rax, %r14
movq %r14, 0x18(%r15)
lock
addq %r14, 0x20(%r15)
leaq 0x23409(%rip), %rax     # 0x46a98
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x3, %eax
setge %sil
leaq 0x10ba6(%rip), %rdx     # 0x34247
movq %rsp, %r15
movq %r15, %rdi
callq 0x9718
cmpb $0x1, (%r15)
jne 0x236c8
movq 0x8(%rsp), %rdi
leaq 0x1348b(%rip), %rsi     # 0x36b49
movl $0x1a, %edx
callq 0x7580
cmpb $0x1, (%rsp)
jne 0x236db
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x7330
cmpb $0x1, (%rsp)
jne 0x236f7
movq 0x8(%rsp), %rdi
leaq 0x13477(%rip), %rsi     # 0x36b64
movl $0xd, %edx
callq 0x7580
cmpb $0x1, (%rsp)
jne 0x2370a
movq 0x8(%rsp), %rdi
movl 0x18(%rbx), %esi
callq 0x7330
movq %rsp, %rdi
callq 0x8f94
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8f94
movq %rbx, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/counter/gc.cpp
// Function: yrmcds::counter::gc_thread::gc()
void gc_thread::gc() {
    auto pred = [this](const cybozu::hash_key& k, object& obj) -> bool {
        if( obj.deletable() )
            return true;
        ++m_objects;
        ++m_objects_in_bucket;
        if( m_objects_in_bucket == 2 )
            ++m_conflicts;
        m_used_memory += sizeof(cybozu::hash_key) + k.length() + sizeof(object);
        return false;
    };

    for( auto it = m_hash.begin(); it != m_hash.end(); ++it ) {
        m_objects_in_bucket = 0;
        it->gc(pred);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x10(%rdi), %rax
movq 0x8(%rax), %r14
cmpq 0x10(%rax), %r14
je 0x237b0
movq %rdi, %rbx
leaq 0x95(%rip), %r12        # 0x237ea
leaq 0xf2(%rip), %r13        # 0x2384e
movq %rsp, %r15
movl $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rbx, (%rsp)
movq %r12, 0x18(%rsp)
movq %r13, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x23874
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x237a2
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
addq $0x30, %r14
movq 0x10(%rbx), %rax
cmpq 0x10(%rax), %r14
jne 0x2375f
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x237e2
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x237da
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/./cybozu/hash_map.hpp
// Function: cybozu::hash_map<yrmcds::memcache::object>::bucket::gc(std::function<bool (cybozu::hash_key const&, yrmcds::memcache::object&)> const&)
void gc(const std::function<bool(const hash_key&, T&)>& pred) {
            lock_guard g(m_lock);
            for( item** p = &m_objects; *p != nullptr; ) {
                item* to_delete = *p;
                if( pred(to_delete->key, to_delete->object) ) {
                    *p = to_delete->next;
                    delete to_delete;
                } else {
                    p = &(to_delete->next);
                }
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x77e0
testl %eax, %eax
jne 0x241c5
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x241ad
leaq 0x28(%rbx), %r12
cmpq $0x0, 0x10(%r14)
je 0x241c0
leaq 0x30(%r15), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq *0x18(%r14)
testb %al, %al
je 0x24196
movq 0x90(%r15), %rax
movq %rax, (%r12)
movq 0x60(%r15), %rsi
testq %rsi, %rsi
je 0x24162
leaq 0x60(%r15), %rdi
callq 0x18286
movq $0x0, 0x60(%r15)
leaq 0x38(%r15), %rdi
callq 0x96e2
movq (%r15), %rdi
testq %rdi, %rdi
je 0x24187
movq 0x10(%r15), %rsi
subq %rdi, %rsi
callq 0x7510
movl $0x98, %esi
movq %r15, %rdi
callq 0x7510
jmp 0x241a0
addq $0x90, %r15
movq %r15, %r12
movq (%r12), %r15
testq %r15, %r15
jne 0x24128
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x73c0
callq 0x7170
movl %eax, %edi
callq 0x7320
jmp 0x241ce
movq %rax, %r14
movq %rbx, %rdi
callq 0x73c0
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/memcache/object.hpp
// Function: yrmcds::memcache::object::survive(std::vector<yrmcds::memcache::file_flusher, std::allocator<yrmcds::memcache::file_flusher>>&) const
void survive(std::vector<file_flusher>& flushers) const {
        ++ m_gc_old;
        if( m_gc_old != FLUSH_AGE || m_file.get() == nullptr )
            return;

        int new_fd = ::dup(m_file->fileno());
        if( new_fd == -1 ) {
            cybozu::logger::warning() << "Failed to dup a file descriptor";
            return;
        }
        flushers.emplace_back(new_fd);
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl 0x50(%rdi), %eax
incl %eax
movl %eax, 0x50(%rdi)
cmpl $0xa, %eax
jne 0x24287
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x24287
movq %rsi, %rbx
movl (%rax), %edi
callq 0x7830
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0x2422e
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2427a
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x24287
leaq 0x22863(%rip), %rax     # 0x46a98
movl (%rax), %eax
xorl %esi, %esi
testl %eax, %eax
setg %sil
leaq 0x10365(%rip), %rdx     # 0x345ab
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x9718
cmpb $0x1, (%rbx)
jne 0x2426e
movq 0x18(%rsp), %rdi
leaq 0x129c1(%rip), %rsi     # 0x36c25
movl $0x1f, %edx
callq 0x7580
leaq 0x10(%rsp), %rdi
callq 0x8f94
jmp 0x24287
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x242a2
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8f94
movq %rbx, %rdi
callq 0x79b0