LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/hash_map.hpp
// Function: cybozu::hash_map<yrmcds::counter::object>::bucket::clear_nolock()
void clear_nolock() {
            while( m_objects ) {
                item* next = m_objects->next;
                delete m_objects;
                m_objects = next;
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r15
pushq $0x48
popq %r14
testq %r15, %r15
je 0x11974
movq 0x40(%r15), %r12
movq %r15, %rdi
callq 0x11e84
movq %r15, %rdi
movq %r14, %rsi
callq 0x7520
movq %r12, 0x28(%rbx)
movq %r12, %r15
jmp 0x1194f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::release_all()
void counter_socket::release_all() {
    for( auto& res: m_acquired_resources ) {
        uint32_t count = res.second;
        auto h = [count](const cybozu::hash_key&, object& obj) -> bool {
            if( ! obj.release(count) ) {
                cybozu::dump_stack();
                throw std::logic_error("<counter_socket::release_all> release failed");
            }
            return true;
        };
        if( ! m_hash.apply(*res.first, h, nullptr) ) {
            cybozu::dump_stack();
            throw std::logic_error("<counter_socket::release_all> not found: "
                                   + res.first->str());
        }
    }
    m_acquired_resources.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x190(%rdi), %r12
leaq 0xcd7(%rip), %r13       # 0x12d64
movq %rsp, %r14
leaq 0x20(%rsp), %r15
movq (%r12), %r12
testq %r12, %r12
je 0x12153
movl 0x10(%r12), %eax
movq 0x110(%rbx), %rdi
movq 0x8(%r12), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movl %eax, (%rsp)
leaq 0xc3c(%rip), %rax       # 0x12d00
movq %rax, 0x18(%rsp)
movq %r13, 0x10(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdx
movq %r15, %rcx
callq 0x12e2c
movl %eax, %ebp
movq %r15, %rdi
callq 0x8d90
movq %r14, %rdi
callq 0x8d90
testb %bpl, %bpl
jne 0x12095
callq 0xb30b
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
movq 0x8(%r12), %rsi
leaq 0x20(%rsp), %rdi
callq 0x12ea8
leaq 0x1505d(%rip), %rsi     # 0x2717d
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x8abf
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7800
xorl %ebp, %ebp
movq 0x28e7c(%rip), %rsi     # 0x3afc0
movq 0x28e3d(%rip), %rdx     # 0x3af88
movq %rbx, %rdi
callq 0x7950
addq $0x180, %rbx            # imm = 0x180
movq %rbx, %rdi
callq 0x12fe6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x71d0
jmp 0x12184
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x71d0
testb %bpl, %bpl
jne 0x12198
jmp 0x121b7
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
jmp 0x121b7
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x8d90
movq %rsp, %rdi
callq 0x8d90
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::on_readable(int)
bool counter_socket::on_readable(int fd) {
    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;
    }

    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 0x12235
movq 0x108(%rbx), %rdi
callq 0x12d8a
testq %rax, %rax
je 0x12235
movq %rax, %r14
movb $0x1, 0x100(%rbx)
addq $0x140, %rbx            # imm = 0x140
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12db4
movq %r14, %rdi
movq %r15, %rsi
callq 0x12d9a
movq %rsp, %rdi
callq 0x8d90
jmp 0x12249
movq 0x8(%rbx), %rdi
addq $0x40, %rdi
addq $0x50, %rbx
movq %rbx, %rsi
callq 0x9f96
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d90
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::on_writable(int)
bool counter_socket::on_writable(int fd) {
    cybozu::worker* w = m_finder();
    if( w == nullptr ) {
        // if there is no idle worker, fallback to the default.
        return cybozu::tcp_socket::on_writable(fd);
    }

    w->post_job(m_sendjob);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x108(%rdi), %rdi
callq 0x12d8a
testq %rax, %rax
je 0x122c4
movq %rax, %r14
addq $0x160, %rbx            # imm = 0x160
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12db4
movq %r14, %rdi
movq %r15, %rsi
callq 0x12d9a
leaq 0x8(%rsp), %rdi
callq 0x8d90
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12dfa
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8d90
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::cmd_get(yrmcds::counter::request const&, yrmcds::counter::response&)
void counter_socket::cmd_get(const counter::request& cmd, counter::response& r) {
    auto h = [this,&cmd,&r](const cybozu::hash_key& k, object& obj) -> bool {
        r.get(obj.consumption());
        return true;
    };
    if( ! m_hash.apply(cybozu::hash_key(cmd.name().p, cmd.name().len), h, nullptr) )
        r.error( counter::status::NotFound );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x110(%rdi), %r14
movq 0x20(%rsi), %rsi
movq 0x28(%r15), %rdx
leaq 0x40(%rsp), %rdi
callq 0x12e4c
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
pushq $0x18
popq %rdi
callq 0x7510
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x5ac(%rip), %rax       # 0x129dc
movq %rax, 0x18(%rdx)
leaq 0x5b5(%rip), %rax       # 0x129f0
movq %rax, 0x10(%rdx)
leaq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x12e2c
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x8d90
movq %rsp, %rdi
callq 0x8d90
leaq 0x40(%rsp), %rdi
callq 0x11e84
testb %bpl, %bpl
jne 0x12489
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x1d8a4
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8d90
jmp 0x124a8
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d90
leaq 0x40(%rsp), %rdi
callq 0x11e84
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::cmd_acquire(yrmcds::counter::request const&, yrmcds::counter::response&)
void counter_socket::cmd_acquire(const counter::request& cmd, counter::response& r) {
    uint32_t resources = cmd.resources();
    uint32_t maximum = cmd.maximum();
    auto h = [this,resources,maximum,&r](const cybozu::hash_key& k, object& obj) -> bool {
        if( ! obj.acquire(resources, maximum) ) {
            r.error( counter::status::ResourceNotAvailable );
            return true;
        }
        on_acquire(k, resources);
        r.acquire(resources);
        return true;
    };
    auto c = [this,resources,&r](const cybozu::hash_key& k) -> object {
        on_acquire(k, resources);
        r.acquire(resources);
        return object(resources);
    };
    m_hash.apply(cybozu::hash_key(cmd.name().p, cmd.name().len), h, c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r14
movq %rdi, %r15
movsd 0x18(%rsi), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x110(%rdi), %rbx
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %rdx
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x12e4c
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
pushq $0x18
popq %rdi
callq 0x7510
movq %r15, (%rax)
movaps 0x20(%rsp), %xmm0
movlps %xmm0, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rax, (%rsp)
leaq 0x527(%rip), %rax       # 0x12a50
movq %rax, 0x18(%rsp)
leaq 0x573(%rip), %rax       # 0x12aa8
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
pushq $0x18
popq %rdi
callq 0x7510
movq %r15, (%rax)
movaps 0x20(%rsp), %xmm0
movss %xmm0, 0x8(%rax)
movq %r14, 0x10(%rax)
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x599(%rip), %rax       # 0x12b08
movq %rax, 0x18(%rcx)
leaq 0x5ce(%rip), %rax       # 0x12b48
movq %rax, 0x10(%rcx)
leaq 0x50(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x12e2c
leaq 0x30(%rsp), %rdi
callq 0x8d90
movq %rsp, %rdi
callq 0x8d90
leaq 0x50(%rsp), %rdi
callq 0x11e84
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x125b9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8d90
jmp 0x125cb
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d90
leaq 0x50(%rsp), %rdi
callq 0x11e84
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::cmd_release(yrmcds::counter::request const&, yrmcds::counter::response&)
void counter_socket::cmd_release(const counter::request& cmd, counter::response& r) {
    uint32_t resources = cmd.resources();
    auto h = [this,resources,&r](const cybozu::hash_key& k, object& obj) -> bool {
        if( ! on_release(k, resources) ) {
            r.error( counter::status::NotAcquired );
            return true;
        }
        if( ! obj.release(resources) ) {
            cybozu::dump_stack();
            throw std::logic_error("<counter_socket::cmd_release> bug");
        }
        r.success();
        return true;
    };
    if( ! m_hash.apply(cybozu::hash_key(cmd.name().p, cmd.name().len), h, nullptr) )
        r.error( counter::status::NotFound );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rdi, %r15
movl 0x18(%rsi), %ebp
movq 0x110(%rdi), %r14
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %rdx
leaq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x12e4c
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
pushq $0x18
popq %rdi
callq 0x7510
movq %r15, (%rax)
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x568(%rip), %rax       # 0x12ba8
movq %rax, 0x18(%rdx)
leaq 0x5f1(%rip), %rax       # 0x12c3c
movq %rax, 0x10(%rdx)
leaq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x12e2c
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x8d90
movq %rsp, %rdi
callq 0x8d90
leaq 0x48(%rsp), %rdi
callq 0x11e84
testb %bpl, %bpl
jne 0x12699
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x1d8a4
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8d90
jmp 0x126b6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d90
leaq 0x48(%rsp), %rdi
callq 0x11e84
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::cmd_dump(yrmcds::counter::response&)
void counter_socket::cmd_dump(counter::response& r) {
    auto pred = [this,&r](const cybozu::hash_key& k, object& obj) {
        r.dump(k.data(), k.length(), obj.consumption(), obj.max_consumption());
    };
    m_hash.foreach(pred);
    r.success();
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq 0x110(%rdi), %rax
movq %rsp, %rsi
movq %rdi, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0x5ac(%rip), %rcx       # 0x12c9c
movq %rcx, 0x18(%rsi)
leaq 0x5dd(%rip), %rcx       # 0x12cd8
movq %rcx, 0x10(%rsi)
movq %rax, %rdi
callq 0x12e7c
movq %rsp, %rdi
callq 0x8d90
movq %rbx, %rdi
callq 0x1d868
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d90
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::on_acquire(cybozu::hash_key const&, unsigned int)
void counter_socket::on_acquire(const cybozu::hash_key& k, std::uint32_t resources) {
    auto it = m_acquired_resources.find(&k);
    if( it != m_acquired_resources.end() ) {
        it->second += resources;
        return;
    }
    m_acquired_resources.emplace(&k, resources);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x4(%rsp)
addq $0x180, %rbx            # imm = 0x180
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0x13912
testq %rax, %rax
je 0x12765
addl %ebp, 0x10(%rax)
jmp 0x1277a
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x1398e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/sockets.cpp
// Function: yrmcds::counter::counter_socket::on_release(cybozu::hash_key const&, unsigned int)
bool counter_socket::on_release(const cybozu::hash_key& k, std::uint32_t resources) {
    auto it = m_acquired_resources.find(&k);
    if( it == m_acquired_resources.end() )
        return false;
    if( it->second < resources )
        return false;
    if( it->second == resources ) {
        m_acquired_resources.erase(it);
        return true;
    }
    it->second -= resources;
    return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
addq $0x180, %rbx            # imm = 0x180
movq %rsp, %rax
movq %rsi, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13912
testq %rax, %rax
je 0x127b0
movl 0x10(%rax), %ecx
subl %ebp, %ecx
jae 0x127b4
xorl %eax, %eax
jmp 0x127c8
jne 0x127c3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13c72
jmp 0x127c6
movl %ecx, 0x10(%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::append(char const*, unsigned long)
void append(const char* p, std::size_t len) {
        if( freebytes() < len )
            enlarge(len);
        std::memcpy(m_p+m_used, p, len);
        m_used += len;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %rdi
subq %rdi, %rax
cmpq %rdx, %rax
jae 0x130ed
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13354
movq 0x20(%r14), %rdi
addq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7420
addq %rbx, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/tcp.hpp
// Function: cybozu::tcp_socket::receive(cybozu::dynbuf&, unsigned long)
recv_result receive(dynbuf& buf, const std::size_t max_recvsize) {
        char* p = buf.prepare(max_recvsize);
        ::ssize_t n;
        auto ret = with_fd([=, &n](int fd) -> bool {
            do {
                n = ::recv(fd, p, max_recvsize, 0);
            } while( n == -1 && errno == EINTR );

            return (n != -1) || (errno != ECONNRESET);
        });

        if( ! ret ) {
            return recv_result::RESET;
        }

        if( n == 0 ) {
            return recv_result::NONE;
        }

        if( n == -1 ) {
            if( errno == EAGAIN || errno == EWOULDBLOCK )
                return recv_result::AGAIN;
            throw_unix_error(errno, "recv");
        }

        buf.consume(n);
        return recv_result::OK;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x13420
movq %rsp, %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
movq %r14, 0x10(%rsi)
movq %r15, %rdi
callq 0x13446
testb %al, %al
je 0x13161
movq (%rsp), %rax
testq %rax, %rax
je 0x13165
cmpq $-0x1, %rax
jne 0x13172
callq 0x7030
movl (%rax), %edi
cmpl $0xb, %edi
jne 0x1317a
pushq $0x1
jmp 0x13167
pushq $0x2
jmp 0x13167
pushq $0x3
popq %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
addq %rax, 0x20(%rbx)
xorl %eax, %eax
jmp 0x13168
leaq 0x14069(%rip), %rsi     # 0x271ea
callq 0x8513
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/counter.hpp
// Function: yrmcds::counter::request::request(char const*, unsigned long)
request(const char* p, std::size_t len) {
        if( p == nullptr )
            throw std::logic_error("<counter::request> `p` must not be nullptr");
        if( len == 0 )
            throw std::logic_error("<counter::request> `len` must not be zero");
        parse(p, len);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
andq $0x0, (%rdi)
movw $0x12, 0x8(%rdi)
xorps %xmm0, %xmm0
andl $0x0, 0x2c(%rdi)
movups %xmm0, 0xc(%rdi)
movups %xmm0, 0x1c(%rdi)
movb $0x4, 0x30(%rdi)
testq %rsi, %rsi
je 0x131bd
testq %rdx, %rdx
je 0x131d9
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1d75c
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x14020(%rip), %rsi     # 0x271ef
movq %rax, %rdi
callq 0x77a0
jmp 0x131f3
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x1402f(%rip), %rsi     # 0x2721a
movq %rax, %rdi
callq 0x77a0
movq 0x27dc6(%rip), %rsi     # 0x3afc0
movq 0x27d87(%rip), %rdx     # 0x3af88
movq %rbx, %rdi
callq 0x7950
jmp 0x1320b
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::erase(unsigned long)
void erase(const std::size_t len) {
        if( m_used < len )
            throw std::invalid_argument("<cybozu::dynbuf::erase>");
        if( len == 0 ) return;
        std::size_t remain = m_used - len;
        if( remain == 0 ) {
            reset();
            return;
        }
        if( remain <= m_default_capacity && m_capacity != m_default_capacity ) {
            char* new_p = _malloc(m_default_capacity);
            std::memcpy(new_p, m_p+len, remain);
            if( m_erase )
                clear_memory(m_p, m_used);
            _free(m_p);
            m_p = new_p;
            m_capacity = m_default_capacity;
            m_used = remain;
            return;
        }
        std::memmove(m_p, m_p+len, remain);
        if( m_erase )
            clear_memory(m_p+remain, len);
        m_used = remain;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r14
cmpq %rsi, %r14
jb 0x13310
movq %rsi, %r15
testq %rsi, %rsi
je 0x13304
movq %rdi, %rbx
subq %r15, %r14
jne 0x13280
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xfa4a
movq 0x8(%rbx), %rdi
cmpq %rdi, %r14
ja 0x1328f
cmpq %rdi, 0x10(%rbx)
jne 0x132bb
movq (%rbx), %rdi
leaq (%rdi,%r15), %rsi
movq %r14, %rdx
callq 0x78d0
cmpb $0x1, 0x18(%rbx)
jne 0x13300
leaq 0x2708d(%rip), %rax     # 0x3a338
movq (%rax), %rax
movq (%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq *%rax
jmp 0x13300
callq 0xefe4
movq %rax, %r12
addq (%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7420
cmpb $0x1, 0x18(%rbx)
jne 0x132ed
leaq 0x27057(%rip), %rax     # 0x3a338
movq (%rax), %rax
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
callq *%rax
movq (%rbx), %rdi
callq 0x75b0
movq %r12, (%rbx)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x13f22(%rip), %rsi     # 0x27244
movq %rax, %rdi
callq 0x7a50
movq 0x27c97(%rip), %rsi     # 0x3afc8
movq 0x27c70(%rip), %rdx     # 0x3afa8
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::enlarge(unsigned long)
void enlarge(std::size_t additional) {
        if( additional == 0 )
            return;
        const std::size_t new_capacity = m_capacity + additional;
        if( m_erase ) {
            char * const new_p = _malloc(new_capacity);
            if( m_p ) {
                std::memcpy(new_p, m_p, m_used);
                clear_memory(m_p, m_used);
                _free(m_p);
            }
            m_p = new_p;
        } else {
            m_p = _realloc(m_p, new_capacity);
        }
        m_capacity = new_capacity;
    }

// Assembly:
testq %rsi, %rsi
je 0x133c4
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq 0x10(%rdi), %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x133aa
movq %rbx, %rdi
callq 0xefe4
movq %rax, %r15
movq (%r14), %rsi
testq %rsi, %rsi
je 0x133b8
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0x7420
leaq 0x26fa4(%rip), %rax     # 0x3a338
movq (%rax), %rax
movq (%r14), %rdi
movq 0x20(%r14), %rsi
callq *%rax
movq (%r14), %rdi
callq 0x75b0
jmp 0x133b8
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x133c6
movq %rax, %r15
movq %r15, (%r14)
movq %rbx, 0x10(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::_realloc(void*, unsigned long)
static char* _realloc(void* p, std::size_t new_len) {
#ifdef USE_TCMALLOC
        char* np = (char*)tc_realloc(p, new_len);
#else
        char* np = (char*)std::realloc(p, new_len);
#endif
        if( np == nullptr )
            throw std::runtime_error("failed to re-allocate memory.");
        return np;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x78f0
testq %rax, %rax
je 0x133dc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x13dde(%rip), %rsi     # 0x271cc
movq %rax, %rdi
callq 0x7190
movq 0x27bf3(%rip), %rsi     # 0x3aff0
movq 0x27b6c(%rip), %rdx     # 0x3af70
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/hash_map.hpp
// Function: cybozu::hash_map<yrmcds::counter::object>::bucket::apply_nolock(cybozu::hash_key const&, std::function<bool (cybozu::hash_key const&, yrmcds::counter::object&)> const&, std::function<yrmcds::counter::object (cybozu::hash_key const&)> const&)
bool apply_nolock(const hash_key& key,
                          const handler& h, const creator& c) {
            for( item* p = m_objects; p != nullptr; p = p->next ) {
                if( p->key == key ) {
                    if( ! h ) return false;
                    return h(p->key, p->object);
                }
            }
            if( ! c ) return false;
            m_objects = new item(key, c, m_objects);
            return true;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
addq $0x28, %rbx
movq %rbx, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x135cc
movq %r13, %rdi
movq %r15, %rsi
callq 0x13638
testb %al, %al
jne 0x135f6
addq $0x40, %r13
jmp 0x135ae
cmpq $0x0, 0x10(%r14)
je 0x13616
pushq $0x48
popq %rdi
callq 0x7510
movq %rax, %r12
movq (%rbx), %rcx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1367a
movq %r12, (%rbx)
movb $0x1, %al
jmp 0x13618
cmpq $0x0, 0x10(%r12)
je 0x13616
leaq 0x30(%r13), %rdx
movq %r12, %rdi
movq %r13, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13666
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r12, %rdi
callq 0x7520
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/object.hpp
// Function: yrmcds::counter::object::acquire(unsigned int, unsigned int)
bool acquire(std::uint32_t resources, std::uint32_t maximum) noexcept {
        if( m_consumption + resources > maximum )
            return false;

        std::time_t t = now();
        if( m_last_updated < nearest_boundary(t) )
            m_max_consumption = m_consumption + resources;
        else
            m_max_consumption = std::max(m_max_consumption, m_consumption + resources);
        m_last_updated = t;

        m_consumption += resources;
        return true;
    }

// Assembly:
movl %edx, %ecx
addl (%rdi), %esi
cmpl %edx, %esi
ja 0x13825
leaq 0x28695(%rip), %rax     # 0x3be80
movq (%rax), %r8
movq 0x8(%rdi), %r9
leaq 0x283c7(%rip), %rax     # 0x3bbc0
movl 0x11c(%rax), %r10d
movq %r8, %rax
cqto
idivq %r10
movq %r8, %rax
subq %rdx, %rax
movl 0x4(%rdi), %edx
cmpl %esi, %edx
cmovbel %esi, %edx
cmpq %rax, %r9
cmovll %esi, %edx
movl %edx, 0x4(%rdi)
movq %r8, 0x8(%rdi)
movl %esi, (%rdi)
cmpl %ecx, %esi
setbe %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/object.hpp
// Function: yrmcds::counter::object::release(unsigned int)
bool release(std::uint32_t resources) noexcept {
        if( resources > m_consumption )
            return false;

        std::time_t t = now();
        if( m_last_updated < nearest_boundary(t) )
            m_max_consumption = m_consumption;
        m_last_updated = t;

        m_consumption -= resources;
        return true;
    }

// Assembly:
movl (%rdi), %r8d
movl %r8d, %r9d
subl %esi, %r9d
jb 0x13871
leaq 0x28642(%rip), %rax     # 0x3be80
movq (%rax), %rcx
movq 0x8(%rdi), %r10
leaq 0x28374(%rip), %rax     # 0x3bbc0
movl 0x11c(%rax), %r11d
movq %rcx, %rax
cqto
idivq %r11
movq %rcx, %rax
subq %rdx, %rax
cmpq %rax, %r10
jge 0x1386a
movl %r8d, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
movl %r9d, (%rdi)
cmpl %esi, %r8d
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/counter/stats.cpp
// Function: yrmcds::counter::statistics::reset()
void statistics::reset() noexcept {
    objects = 0;
    used_memory = 0;
    conflicts = 0;
    gc_count = 0;
    last_gc_elapsed = 0;
    total_gc_elapsed = 0;
    total_objects = 0;
    curr_connections = 0;
    total_connections = 0;
    for( auto& v: ops )
        v = 0;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
xchgl %ecx, (%rdi)
xorl %ecx, %ecx
xchgq %rcx, 0x8(%rdi)
xorl %ecx, %ecx
xchgl %ecx, 0x10(%rdi)
xorl %ecx, %ecx
xchgl %ecx, 0x14(%rdi)
xorl %ecx, %ecx
xchgq %rcx, 0x18(%rdi)
xorl %ecx, %ecx
xchgq %rcx, 0x20(%rdi)
xorl %ecx, %ecx
xchgq %rcx, 0x40(%rdi)
xorl %ecx, %ecx
xchgq %rcx, 0x80(%rdi)
xchgq %rax, 0x88(%rdi)
movq $-0x98, %rax
testq %rax, %rax
je 0x13dc8
xorl %ecx, %ecx
xchgq %rcx, 0x158(%rdi,%rax)
addq $0x8, %rax
jmp 0x13db3
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/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 0x13edc
movb (%rax), %al
testb $0x1, %al
je 0x13f46
leaq 0x68(%rbx), %rdi
movq %r14, 0x60(%rbx)
xorl %esi, %esi
callq 0x15848
leaq 0x27fdd(%rip), %rcx     # 0x3bec0
movq 0xc0(%rcx), %rax
testq %rax, %rax
setne %dl
cmpq %r14, %rax
setle %sil
movb $0x1, %al
testb %sil, %dl
jne 0x13f48
movq 0x28(%rcx), %rdx
leaq 0x27cb7(%rip), %rcx     # 0x3bbc0
cmpq 0xe8(%rcx), %rdx
ja 0x13f48
movq 0x90(%rbx), %rdx
cmpq 0x98(%rbx), %rdx
je 0x13f31
movl 0x70(%rbx), %edx
cmpl $0x2, %edx
jg 0x13f31
incl %edx
movl %edx, 0x70(%rbx)
jmp 0x13f48
movl 0x108(%rcx), %ecx
addq 0x60(%rbx), %rcx
cmpq %r14, %rcx
jge 0x13f46
andl $0x0, 0x70(%rbx)
jmp 0x13f48
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::on_master_interval()
void handler::on_master_interval() {
    for( auto it = m_slaves.begin(); it != m_slaves.end(); ) {
        repl_socket* slave = *it;
        if( ! slave->valid() ) {
            it = m_slaves.erase(it);
            continue;
        }
        if( slave->timed_out() ) {
            cybozu::logger::info()
                << "No heartbeats from a slave ("
                << slave->peer_ip()
                << "). Close the replication socket.";
            // close the socket and release resources
            if( ! slave->invalidate() )
                m_reactor.remove_resource(*slave);
            it = m_slaves.erase(it);
            continue;
        }
        ++it;
    }

    if( gc_ready(g_current_time.load(relaxed)) ) {
        m_gc_thread = std::unique_ptr<gc_thread>(
            new gc_thread(m_hash, m_slaves, m_new_slaves));
        m_new_slaves.clear();
        m_gc_thread->start();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x78(%rdi), %r14
movq 0x78(%rdi), %rbp
leaq 0x18(%rsp), %r13
cmpq 0x80(%rbx), %rbp
je 0x14641
movq (%rbp), %r12
movb 0x10(%r12), %al
testb $0x1, %al
je 0x1462e
leaq 0x278e3(%rip), %rax     # 0x3be80
movq (%rax), %rax
leaq 0x27619(%rip), %rcx     # 0x3bbc0
movl 0x10c(%rcx), %ecx
addq 0x140(%r12), %rcx
cmpq %rax, %rcx
jle 0x145c0
addq $0x8, %rbp
jmp 0x14578
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xec96
movq %r15, %rdi
leaq 0x12cea(%rip), %rsi     # 0x272c1
callq 0x1321e
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0x14fb6
movq %r15, %rdi
movq %r13, %rsi
callq 0x869a
movq %rax, %rdi
leaq 0x12cdf(%rip), %rsi     # 0x272de
callq 0x15012
movq %r13, %rdi
callq 0x71d0
leaq 0x8(%rsp), %rdi
callq 0x86e4
movq %r12, %rdi
callq 0xf07a
testb %al, %al
jne 0x1462e
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x1502a
movq %r14, %rdi
movq %rbp, %rsi
callq 0x14f7c
movq %rax, %rbp
jmp 0x14578
leaq 0x27838(%rip), %rax     # 0x3be80
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x13eb4
testb %al, %al
je 0x146ba
movl $0xb0, %edi
callq 0x7510
movq %rax, %r15
leaq 0x40(%rbx), %rsi
leaq 0x90(%rbx), %rcx
movq %rax, %rdi
movq %r14, %rdx
callq 0x15032
leaq 0x68(%rbx), %r14
leaq 0x18(%rsp), %r12
andq $0x0, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x15848
movq %r12, %rdi
callq 0x14f62
movq 0x90(%rbx), %rax
cmpq %rax, 0x98(%rbx)
je 0x146b2
movq %rax, 0x98(%rbx)
movq (%r14), %rdi
callq 0x1514a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xb0, %esi
movq %r15, %rdi
callq 0x7520
jmp 0x146f9
jmp 0x146dd
movq %rax, %rbx
jmp 0x146ef
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x71d0
leaq 0x8(%rsp), %rdi
callq 0x86e4
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::dump_stats()
void handler::dump_stats() {
    using logger = cybozu::logger;

    if( m_is_slave ) {
        logger::info() << "memcache replication stats: "
                       << g_stats.repl_created << " created, "
                       << g_stats.repl_updated << " updated, "
                       << g_stats.repl_removed << " removed.";
        return;
    }

    // master
    std::uint64_t ops = 0;
    for( auto& v: g_stats.text_ops ) {
        ops += v.load(relaxed);
    }
    for( auto& v: g_stats.bin_ops ) {
        ops += v.load(relaxed);
    }
    logger::info() << "memcache master: "
                   << m_slaves.size() << " slaves, "
                   << g_stats.objects.load(relaxed) << " objects, "
                   << g_stats.curr_connections.load(relaxed) << " clients, "
                   << ops << " total ops.";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x38(%rdi)
jne 0x14a2b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xec96
leaq 0x1295e(%rip), %rsi     # 0x27321
movq %rbx, %rdi
callq 0x1321e
leaq 0x274ee(%rip), %rbx     # 0x3bec0
leaq 0x68(%rbx), %rsi
movq %rax, %rdi
callq 0xf538
leaq 0x12959(%rip), %rsi     # 0x2733e
movq %rax, %rdi
callq 0x11924
leaq 0x70(%rbx), %rsi
movq %rax, %rdi
callq 0xf538
leaq 0x12949(%rip), %rsi     # 0x27349
movq %rax, %rdi
callq 0x11924
addq $0x78, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf538
leaq 0x12936(%rip), %rsi     # 0x27354
movq %rax, %rdi
callq 0xed5a
jmp 0x14b27
movq %rdi, %rbx
andq $0x0, (%rsp)
xorl %ecx, %ecx
leaq 0x27484(%rip), %r15     # 0x3bec0
xorl %eax, %eax
cmpq $0xb8, %rcx
je 0x14a5c
movq 0x140(%r15,%rcx), %rdx
addq %rdx, %rax
movq %rax, (%rsp)
addq $0x8, %rcx
jmp 0x14a3e
xorl %ecx, %ecx
cmpq $0x290, %rcx            # imm = 0x290
je 0x14a7c
movq 0x1f8(%r15,%rcx), %rdx
addq %rdx, %rax
movq %rax, (%rsp)
addq $0x8, %rcx
jmp 0x14a5e
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xec96
leaq 0x128ce(%rip), %rsi     # 0x2735e
movq %r14, %rdi
callq 0x15262
movq 0x80(%rbx), %rcx
subq 0x78(%rbx), %rcx
sarq $0x3, %rcx
leaq 0x28(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0xf538
leaq 0x128b2(%rip), %rsi     # 0x27370
movq %rax, %rdi
callq 0xed5a
movl (%r15), %ecx
leaq 0x1c(%rsp), %rsi
movl %ecx, (%rsi)
movq %rax, %rdi
callq 0xf382
leaq 0x12250(%rip), %rsi     # 0x26d2f
movq %rax, %rdi
callq 0x11924
movq 0x100(%r15), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0xf538
leaq 0x12235(%rip), %rsi     # 0x26d3a
movq %rax, %rdi
callq 0x11924
movq %rsp, %rsi
movq %rax, %rdi
callq 0xf538
leaq 0x12226(%rip), %rsi     # 0x26d45
movq %rax, %rdi
callq 0xed42
leaq 0x8(%rsp), %rdi
callq 0x86e4
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x14b43
jmp 0x14b43
jmp 0x14b43
jmp 0x14b43
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x86e4
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14bba
movl %edx, %ebp
movq %rsi, %r14
leaq 0x2704c(%rip), %rax     # 0x3bbc0
movl 0x40(%rax), %eax
testq %rax, %rax
je 0x14b8f
leaq 0x2733d(%rip), %rcx     # 0x3bec0
movq 0x100(%rcx), %rcx
cmpq %rax, %rcx
jae 0x14bba
pushq $0x40
popq %rsi
movl $0x1c0, %edi            # imm = 0x1C0
callq 0x7550
movq %rax, %r15
leaq 0x8(%r14), %rdx
leaq 0x40(%r14), %rcx
addq $0x78, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %r8
callq 0x16a48
jmp 0x14bbd
xorl %r15d, %r15d
movq %r15, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r15, %rdi
callq 0x76a0
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x123b0(%rip), %rsi     # 0x2737a
leaq 0xf(%rsp), %rdx
callq 0x84d8
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, %rdi
callq 0x15458
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x71a0
callq 0x78e0
jmp 0x14fe4
movq %rax, %r14
movq %rbx, %rdi
callq 0x71d0
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
andq $0x0, 0x8(%rdi)
movq %rdx, %r13
movq %rsi, 0x10(%rdi)
leaq 0x18(%rdi), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x15508
leaq 0x30(%rbx), %rdi
movq %rdi, 0x8(%rsp)
movq %rbp, %rsi
callq 0x15508
leaq 0x98(%rbx), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
andq $0x0, 0xa8(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
andl $0x0, 0x68(%rbx)
movups %xmm0, 0x70(%rbx)
andl $0x0, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movq (%rbp), %r15
movq 0x8(%rbp), %r12
leaq 0x10(%rsp), %rbp
cmpq %r12, %r15
je 0x150ee
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %rbp, %rdx
callq 0x1569b
cmpq 0x8(%r13), %rax
jne 0x150e8
movq %r14, %rdi
movq %rbp, %rsi
callq 0x15344
addq $0x8, %r15
jmp 0x150ba
pushq $0xa
popq %rsi
movq (%rsp), %rdi
callq 0x15556
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15117
movq %rax, %r13
jmp 0x1512d
movq %rax, %r13
jmp 0x15135
jmp 0x15117
movq %rax, %r13
movq (%rsp), %rdi
callq 0x155e4
movq 0x8(%rsp), %rdi
callq 0x15606
movq %r14, %rdi
callq 0x15606
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x8de2
movq %r13, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movq %rcx, %r14
movq %rdi, %rbx
callq 0x1bcf6
leaq 0x256c9(%rip), %rax     # 0x3a998
addq $0x10, %rax
movq %rax, (%rbx)
movq %r14, 0x100(%rbx)
leaq 0x108(%rbx), %rdi
leaq 0xf(%rsp), %rdx
movl $0x200000, %esi         # imm = 0x200000
callq 0x15a7c
leaq 0x120(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x130(%rbx)
movups %xmm0, 0x120(%rbx)
leaq 0x26b6e(%rip), %rax     # 0x3be80
movq (%rax), %rax
movq %rax, 0x140(%rbx)
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
callq 0x15ace
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x12ee2
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/tcp.hpp
// Function: cybozu::tcp_socket::send(char const*, unsigned long, bool)::'lambda'(int)::operator()(int) const
bool send(const char* p, std::size_t len, bool flush=false) {
        return with_fd([=](int fd) -> bool {
            lock_guard g(m_lock);
            if( ! _send(fd, p, len, g) )
                return false;
            if( flush && empty() )
                _flush(fd);
            return true;
        });
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r15
movq (%rdi), %r14
leaq 0xa8(%r14), %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x159c8
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %r8
callq 0x1c03a
movl %eax, %ebp
testb %al, %al
je 0x1599e
cmpb $0x1, 0x18(%r15)
jne 0x1599e
movq 0x70(%r14), %rax
cmpq 0x78(%r14), %rax
jne 0x1599e
movq 0x90(%r14), %rax
cmpq %rax, 0x88(%r14)
jne 0x1599e
movq %r14, %rdi
movl %ebx, %esi
callq 0x159de
movq %rsp, %rdi
callq 0x15a16
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x15a16
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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)
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
pushq $0x4
popq %r8
callq 0x79b0
cmpl $-0x1, %eax
je 0x15a02
popq %rax
retq
callq 0x7030
movl (%rax), %edi
leaq 0x11996(%rip), %rsi     # 0x273a6
callq 0x8513
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1616d
callq 0x7230
testl %eax, %eax
jne 0x16166
movl (%rbx), %edi
pushq $0x4
popq %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
movl (%rbx), %edi
callq 0x7a90
popq %rbx
retq
movq %rax, %rdi
callq 0x870a
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x25a2d(%rip), %rax     # 0x3bbc0
movb 0x100(%rax), %dl
andq $0x0, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movb %dl, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
movl %ecx, 0x38(%rdi)
movq %r8, 0x40(%rdi)
movq $0x1, 0x48(%rdi)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x30(%rdi), %r14
cmpq %r15, 0xe0(%rax)
jae 0x1621d
pushq $0x10
popq %rdi
callq 0x7510
movq %rax, %r13
movq %rax, %rdi
callq 0x16922
movq %rsp, %rbp
andq $0x0, (%rbp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x16a0e
movq %rbp, %rdi
callq 0x160f8
movq (%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1b8ac
jmp 0x16230
testq %r15, %r15
je 0x16230
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x130c0
leaq 0x25c89(%rip), %rax     # 0x3bec0
lock
incq 0x80(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r13, %rdi
callq 0x7520
jmp 0x16263
jmp 0x16260
movq %rax, %r15
movq %r14, %rdi
callq 0x160f8
movq %rbx, %rdi
callq 0x8dac
movq %r15, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %r12
movq %rdi, %r14
andq $0x0, (%rdi)
movq %rsi, %r13
leaq 0x8(%rdi), %rbx
leaq 0x2591e(%rip), %rax     # 0x3bbc0
movzbl 0x100(%rax), %edx
pushq $0x18
popq %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xefac
andq $0x0, 0x30(%r14)
andl $0x0, 0x38(%r14)
leaq 0x30(%r14), %r15
movq %r12, 0x40(%r14)
movq $0x1, 0x48(%r14)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x50(%r14)
andq $0x0, 0x58(%r14)
leaq 0x11256(%rip), %rdx     # 0x27541
movq %rsp, %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x78a0
movslq %eax, %rdx
movq %rdx, (%r14)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x130c0
leaq 0x25baa(%rip), %rax     # 0x3bec0
lock
incq 0x80(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x160f8
movq %rbx, %rdi
callq 0x8dac
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl %ecx, 0x38(%rdi)
movq %r8, 0x40(%rdi)
incq 0x48(%rdi)
andl $0x0, 0x50(%rdi)
leaq 0x8(%rdi), %r13
movq %r13, %rdi
callq 0xfa4a
leaq 0x25842(%rip), %rax     # 0x3bbc0
leaq 0x30(%r14), %r12
cmpq %rbx, 0xe0(%rax)
jae 0x1639b
movq (%r12), %rdi
testq %rdi, %rdi
je 0x163ba
callq 0x1b8f8
jmp 0x163e8
movq %r12, %rdi
xorl %esi, %esi
callq 0x16a0e
testq %rbx, %rbx
je 0x163f7
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x130c0
jmp 0x163f7
pushq $0x10
popq %rdi
callq 0x7510
movq %rax, %r13
movq %rax, %rdi
callq 0x16922
movq %rsp, %rbp
andq $0x0, (%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x16a0e
movq %rbp, %rdi
callq 0x160f8
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1b8ac
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r13, %rdi
callq 0x7520
movq %rbx, %rdi
callq 0x7990
nop