LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: cybozu[P]yrmcds/src/counter/handler.cpp
// Function: yrmcds::counter::handler::make_counter_socket(int)
std::unique_ptr<cybozu::tcp_socket> handler::make_counter_socket(int s) {
    unsigned int mc = g_config.counter().max_connections();
    if( mc != 0 &&
        g_stats.curr_connections.load(relaxed) >= mc )
        return nullptr;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x84323(%rip), %rdi     # 0xafd00
callq 0x220f0
movq %rax, %rdi
callq 0x2cb10
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x2ba7e
leaq 0x84442(%rip), %rax     # 0xafe40
subq $-0x80, %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x104e0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x5c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x2ba4b
jmp 0x2ba34
movl -0x5c(%rbp), %eax
subl $0x5, %eax
je 0x2ba58
jmp 0x2ba3e
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2ba63
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2ba63
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpq %rcx, %rax
jb 0x2ba7e
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2cb30
jmp 0x2badb
movl $0x1c0, %edi            # imm = 0x1C0
movl $0x40, %esi
callq 0x86c0
movq -0x48(%rbp), %rcx
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movl -0x2c(%rbp), %esi
movq %rcx, %rdx
addq $0x8, %rdx
addq $0x30, %rcx
callq 0x2eef0
jmp 0x2bab0
movq -0x70(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2cb70
jmp 0x2badb
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x40, %esi
callq 0x8870
jmp 0x2bae5
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8bc0
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2cec2
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq 0x40(%rcx), %rcx
movq %rcx, -0x10(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x2ceb4
movq -0x20(%rbp), %rdi
callq 0x2ecd0
movq -0x20(%rbp), %rdi
movl $0x48, %esi
callq 0x8650
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
jmp 0x2ce74
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x100, %rdi            # imm = 0x100
movl $0x2, %esi
callq 0x235b0
testb $0x1, %al
jne 0x2f59e
jmp 0x2f5b4
movq -0x58(%rbp), %rsi
movq 0x8(%rsi), %rdi
callq 0x32800
movb $0x1, -0x1(%rbp)
jmp 0x2f651
movq -0x58(%rbp), %rax
movq 0x108(%rax), %rdi
callq 0x32830
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2f5e2
movq -0x58(%rbp), %rsi
movq 0x8(%rsi), %rdi
callq 0x32800
movb $0x1, -0x1(%rbp)
jmp 0x2f651
movq -0x58(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movl $0x1, %esi
movl $0x3, %edx
callq 0x23390
movq -0x58(%rbp), %rsi
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x140, %rsi            # imm = 0x140
leaq -0x40(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x328c0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x32870
jmp 0x2f62b
leaq -0x40(%rbp), %rdi
callq 0xc560
movb $0x1, -0x1(%rbp)
jmp 0x2f651
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xc560
jmp 0x2f65c
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x108(%rax), %rdi
callq 0x32830
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2f6b1
movq -0x58(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x32970
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x2f706
movq -0x58(%rbp), %rsi
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x160, %rsi            # imm = 0x160
leaq -0x40(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x328c0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x32870
jmp 0x2f6e0
leaq -0x40(%rbp), %rdi
callq 0xc560
movb $0x1, -0x1(%rbp)
jmp 0x2f706
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xc560
jmp 0x2f711
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x8bc0
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x110(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq -0xd8(%rbp), %rsi
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x78(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x32ae0
leaq -0xa0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2fe90
jmp 0x2f9c0
xorl %eax, %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x32b50
movq -0xe0(%rbp), %rdi
movq -0xf0(%rbp), %rcx
leaq -0x60(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x32a70
movb %al, -0xe1(%rbp)
jmp 0x2f9fd
movb -0xe1(%rbp), %al
xorb $-0x1, %al
movb %al, -0xf1(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x32b90
leaq -0xa0(%rbp), %rdi
callq 0x32bb0
leaq -0x60(%rbp), %rdi
callq 0x2ecf0
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x2fa38
jmp 0x2fa91
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x5c050
jmp 0x2fa91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x2fa86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x32b90
leaq -0xa0(%rbp), %rdi
callq 0x32bb0
leaq -0x60(%rbp), %rdi
callq 0x2ecf0
jmp 0x2fa9a
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32bd0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32bf0
movl %eax, %ecx
movq -0x108(%rbp), %rax
movl %ecx, -0x20(%rbp)
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movl -0x20(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, -0x50(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, -0x48(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq 0x110(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq -0xf8(%rbp), %rsi
movq %rax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
movq -0x98(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x32ae0
leaq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2ff30
jmp 0x2fb90
leaq -0xf0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2ffd0
jmp 0x2fba2
movq -0x100(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
callq 0x32a70
jmp 0x2fbc2
leaq -0xf0(%rbp), %rdi
callq 0x32b90
leaq -0xc0(%rbp), %rdi
callq 0x32bb0
leaq -0x80(%rbp), %rdi
callq 0x2ecf0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x2fc3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x2fc32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x32b90
leaq -0xc0(%rbp), %rdi
callq 0x32bb0
leaq -0x80(%rbp), %rdi
callq 0x2ecf0
movq -0xc8(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32bd0
movl %eax, %ecx
movq -0xf0(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq 0x110(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq %rax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32ac0
movq -0xe0(%rbp), %rsi
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x80(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x32ae0
leaq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x30070
jmp 0x2fd0d
xorl %eax, %eax
movl %eax, %esi
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x32b50
movq -0xe8(%rbp), %rdi
movq -0x100(%rbp), %rcx
leaq -0x68(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x32a70
movb %al, -0xf1(%rbp)
jmp 0x2fd4a
movb -0xf1(%rbp), %al
xorb $-0x1, %al
movb %al, -0x101(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x32b90
leaq -0xa8(%rbp), %rdi
callq 0x32bb0
leaq -0x68(%rbp), %rdi
callq 0x2ecf0
movb -0x101(%rbp), %al
testb $0x1, %al
jne 0x2fd85
jmp 0x2fdde
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x5c050
jmp 0x2fdde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2fdd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x32b90
leaq -0xa8(%rbp), %rdi
callq 0x32bb0
leaq -0x68(%rbp), %rdi
callq 0x2ecf0
jmp 0x2fde7
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x110(%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x30110
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x32c10
jmp 0x2fe4b
leaq -0x40(%rbp), %rdi
callq 0x32c90
movq -0x10(%rbp), %rdi
callq 0x5c000
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x32c90
movq -0x48(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
addq $0x180, %rdi            # imm = 0x180
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x32cb0
movq -0x50(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x180, %rdi            # imm = 0x180
callq 0x32d10
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32ce0
testb $0x1, %al
jne 0x301fe
jmp 0x30218
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x32d40
movl -0x54(%rbp), %ecx
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
jmp 0x3023f
movq -0x50(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x32d70
movq %rax, -0x48(%rbp)
movb %dl, -0x40(%rbp)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
addq $0x180, %rdi            # imm = 0x180
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x32cb0
movq -0x50(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x180, %rdi            # imm = 0x180
callq 0x32d10
movq %rax, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x32dc0
testb $0x1, %al
jne 0x302ae
jmp 0x302b4
movb $0x0, -0x1(%rbp)
jmp 0x30320
leaq -0x28(%rbp), %rdi
callq 0x32d40
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jae 0x302cb
movb $0x0, -0x1(%rbp)
jmp 0x30320
leaq -0x28(%rbp), %rdi
callq 0x32d40
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x30302
movq -0x50(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x32df0
movq %rax, -0x48(%rbp)
movb $0x1, -0x1(%rbp)
jmp 0x30320
movl -0x1c(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x32d40
movl -0x54(%rbp), %edx
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x34230
cmpq -0x18(%rbp), %rax
jae 0x33d94
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x34250
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x8540
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x343b0
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x34400
andb $0x1, %al
movb %al, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x33e76
movl $0x2, -0x4(%rbp)
jmp 0x33ed1
cmpq $0x0, -0x30(%rbp)
jne 0x33e86
movl $0x3, -0x4(%rbp)
jmp 0x33ed1
cmpq $-0x1, -0x30(%rbp)
jne 0x33ebd
callq 0x8050
cmpl $0xb, (%rax)
je 0x33ea1
callq 0x8050
cmpl $0xb, (%rax)
jne 0x33eaa
movl $0x1, -0x4(%rbp)
jmp 0x33ed1
callq 0x8050
movl (%rax), %edi
leaq 0x474ed(%rip), %rsi     # 0x7b3a5
callq 0xa320
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x344c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq $0x0, (%rdi)
movb $0x12, 0x8(%rdi)
movb $0x0, 0x9(%rdi)
movl $0x0, 0xc(%rdi)
movq $0x0, 0x10(%rdi)
movl $0x0, 0x18(%rdi)
movl $0x0, 0x1c(%rdi)
addq $0x20, %rdi
callq 0x34570
movq -0x30(%rbp), %rax
movb $0x4, 0x30(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x33f90
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x4744f(%rip), %rsi     # 0x7b3aa
callq 0x89a0
jmp 0x33f62
movq -0x38(%rbp), %rdi
movq 0x7b053(%rip), %rsi     # 0xaefc0
movq 0x7b00c(%rip), %rdx     # 0xaef80
callq 0x8b70
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8490
jmp 0x33ffe
cmpq $0x0, -0x18(%rbp)
jne 0x33fe7
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x47423(%rip), %rsi     # 0x7b3d5
callq 0x89a0
jmp 0x33fb9
movq -0x40(%rbp), %rdi
movq 0x7affc(%rip), %rsi     # 0xaefc0
movq 0x7afb5(%rip), %rdx     # 0xaef80
callq 0x8b70
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8490
jmp 0x33ffe
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5bdd0
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8bc0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x20(%rax), %rax
cmpq -0x10(%rbp), %rax
jae 0x34105
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x47332(%rip), %rsi     # 0x7b3ff
callq 0x8cb0
jmp 0x340d4
movq -0x40(%rbp), %rdi
movq 0x7aee9(%rip), %rsi     # 0xaefc8
movq 0x7aec2(%rip), %rdx     # 0xaefa8
callq 0x8b70
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x8490
jmp 0x3421a
cmpq $0x0, -0x10(%rbp)
jne 0x34111
jmp 0x34214
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x34136
movq -0x38(%rbp), %rdi
callq 0x263d0
jmp 0x34214
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x8(%rcx), %rax
ja 0x341cc
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rax
cmpq 0x8(%rcx), %rax
je 0x341cc
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x23080
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
addq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x8540
movq -0x38(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x341a3
movq -0x38(%rbp), %rcx
leaq 0x7a129(%rip), %rax     # 0xae2c0
movq (%rax), %rax
movq (%rcx), %rdi
movq 0x20(%rcx), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0xc600
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x34214
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq (%rax), %rsi
addq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x8ad0
movq -0x38(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x34208
movq -0x38(%rbp), %rcx
leaq 0x7a0c8(%rip), %rax     # 0xae2c0
movq (%rax), %rax
movq (%rcx), %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x20(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x34274
jmp 0x3430e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
addq -0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
testb $0x1, 0x18(%rax)
je 0x342e8
movq -0x18(%rbp), %rdi
callq 0x23080
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x342db
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq (%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x8540
movq -0x28(%rbp), %rcx
leaq 0x79ffd(%rip), %rax     # 0xae2c0
movq (%rax), %rax
movq (%rcx), %rdi
movq 0x20(%rcx), %rsi
callq *%rax
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0xc600
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x34302
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x34320
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8af0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x34398
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x47024(%rip), %rsi     # 0x7b387
callq 0x8220
jmp 0x3436a
movq -0x30(%rbp), %rdi
movq 0x7ac7b(%rip), %rsi     # 0xaeff0
movq 0x7abf4(%rip), %rdx     # 0xaef70
callq 0x8b70
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8490
jmp 0x343a2
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8bc0
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x34824
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x348b0
testb $0x1, %al
jne 0x347e2
jmp 0x34814
movq -0x20(%rbp), %rdi
callq 0x34930
testb $0x1, %al
jne 0x347f8
movb $0x0, -0x1(%rbp)
jmp 0x34890
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x30, %rdx
callq 0x34950
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x34890
jmp 0x34816
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x347c8
movq -0x28(%rbp), %rdi
callq 0x349a0
testb $0x1, %al
jne 0x34837
movb $0x0, -0x1(%rbp)
jmp 0x34890
movl $0x48, %edi
callq 0x8640
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x50(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq 0x28(%rax), %rcx
callq 0x349c0
jmp 0x34862
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x28(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x34890
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x48, %esi
callq 0x8650
jmp 0x3489b
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl (%rax), %eax
addl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jbe 0x3519d
movb $0x0, -0x1(%rbp)
jmp 0x3522e
callq 0x35250
movq %rax, -0x38(%rbp)
jmp 0x351a8
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x352d0
movq %rax, -0x40(%rbp)
jmp 0x351cb
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq %rcx, %rax
jge 0x351e6
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, 0x4(%rax)
jmp 0x35217
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x4, %rdi
movl (%rax), %eax
movl -0x14(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rsi
callq 0x35310
movq %rax, -0x50(%rbp)
jmp 0x3520a
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xa7e0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movl -0x14(%rbp), %eax
cmpl (%rcx), %eax
jbe 0x35464
movb $0x0, -0x1(%rbp)
jmp 0x354b3
callq 0x35250
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x352d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jge 0x3549a
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %edx
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
callq 0x36ad0
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x36ad0
movq -0x30(%rbp), %rdi
addq $0x14, %rdi
xorl %esi, %esi
callq 0x36ad0
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rdi
addq $0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rdi
addq $0x88, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x30(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x98, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x36aa6
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36b70
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x36a79
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::clear()
void handler::clear() {
    for( auto& bucket: m_hash )
        bucket.clear_nolock();
    g_stats.total_objects.store(0, relaxed);
    g_stats.repl_created = 0;
    g_stats.repl_updated = 0;
    g_stats.repl_removed = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3a600
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3a630
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3a660
testb $0x1, %al
jne 0x38055
jmp 0x38076
leaq -0x38(%rbp), %rdi
callq 0x3a6a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x3a6c0
leaq -0x38(%rbp), %rdi
callq 0x3a730
jmp 0x38042
leaq 0x77f83(%rip), %rax     # 0xb0000
subq $-0x80, %rax
movq %rax, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x14(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x104e0
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
je 0x380d8
jmp 0x380c1
movl -0x4c(%rbp), %eax
subl $0x5, %eax
je 0x380e5
jmp 0x380cb
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x380f0
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x380f0
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
xchgq %rax, (%rcx)
leaq 0x77f09(%rip), %rax     # 0xb0000
movq $0x0, 0x68(%rax)
leaq 0x77efa(%rip), %rax     # 0xb0000
movq $0x0, 0x70(%rax)
leaq 0x77eeb(%rip), %rax     # 0xb0000
movq $0x0, 0x78(%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
testb $0x1, 0x38(%rax)
je 0x3879e
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2cb30
jmp 0x388a4
leaq 0x7755b(%rip), %rdi     # 0xafd00
callq 0x3a750
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x38840
leaq 0x77842(%rip), %rax     # 0xb0000
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x104e0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x5c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x3880d
jmp 0x387f6
movl -0x5c(%rbp), %eax
subl $0x5, %eax
je 0x3881a
jmp 0x38800
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x38825
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x38825
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpq %rcx, %rax
jb 0x38840
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2cb30
jmp 0x388a4
movl $0x1c0, %edi            # imm = 0x1C0
movl $0x40, %esi
callq 0x86c0
movq -0x48(%rbp), %r8
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movl -0x2c(%rbp), %esi
movq %r8, %rdx
addq $0x8, %rdx
movq %r8, %rcx
addq $0x40, %rcx
addq $0x78, %r8
callq 0x41060
jmp 0x38879
movq -0x70(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2cb70
jmp 0x388a4
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x40, %esi
callq 0x8870
jmp 0x388ae
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8bc0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x8bd0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0x4169f(%rip), %rsi     # 0x7b632
callq 0xa160
jmp 0x39f9a
leaq -0x12(%rbp), %rdi
callq 0x86a0
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x3afa0
jmp 0x39fba
jmp 0x39ff1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x86a0
jmp 0x3a027
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8230
callq 0x8ae0
jmp 0x39fef
jmp 0x39ff1
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x3a01d
jmp 0x3a014
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x83f0
jmp 0x3a027
movq -0x40(%rbp), %rdi
callq 0x83f0
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8bc0
// File: 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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3b0c0
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x18, %rdi
movq %rdi, -0x78(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3b0e0
jmp 0x3a107
movq -0x80(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x88(%rbp)
movq -0x20(%rbp), %rsi
callq 0x3b0e0
jmp 0x3a121
movq -0x80(%rbp), %rdi
movl $0x0, 0x48(%rdi)
movl $0x0, 0x4c(%rdi)
movl $0x0, 0x50(%rdi)
movl $0x0, 0x54(%rdi)
movl $0x0, 0x58(%rdi)
movl $0x0, 0x5c(%rdi)
movl $0x0, 0x60(%rdi)
movl $0x0, 0x64(%rdi)
movl $0x0, 0x68(%rdi)
movq $0x0, 0x70(%rdi)
movl $0x0, 0x78(%rdi)
movl $0x0, 0x7c(%rdi)
movq $0x0, 0x80(%rdi)
movl $0x0, 0x88(%rdi)
movl $0x0, 0x8c(%rdi)
movl $0x0, 0x90(%rdi)
addq $0x98, %rdi
movq %rdi, -0x90(%rbp)
callq 0x3b1d0
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3b1f0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3b220
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3b250
testb $0x1, %al
jne 0x3a1ee
jmp 0x3a2c4
leaq -0x40(%rbp), %rdi
callq 0x3b290
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3b1f0
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3b220
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x3b2f0
movq %rax, -0x98(%rbp)
jmp 0x3a232
movq -0x98(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3b220
movq %rax, -0x70(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3b2b0
testb $0x1, %al
jne 0x3a25d
jmp 0x3a2b4
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
leaq -0x50(%rbp), %rsi
callq 0x3a950
jmp 0x3a270
jmp 0x3a2b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3a2ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3a2e4
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3b480
movq -0x88(%rbp), %rdi
callq 0x39ae0
jmp 0x3a2e4
jmp 0x3a2b6
leaq -0x40(%rbp), %rdi
callq 0x3b340
jmp 0x3a1d8
movq -0x80(%rbp), %rdi
addq $0x98, %rdi
movl $0xa, %esi
callq 0x3b360
jmp 0x3a2db
addq $0xa0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x39ae0
movq -0x80(%rbp), %rdi
callq 0x3b4e0
movq -0x28(%rbp), %rdi
callq 0x8bc0
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movl %edx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x55720
movq -0x68(%rbp), %rax
leaq 0x741c9(%rip), %rcx     # 0xae990
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x100(%rax)
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x60(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x8bd0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
movl $0x200000, %esi         # imm = 0x200000
callq 0x3d000
jmp 0x3a804
leaq -0x31(%rbp), %rdi
callq 0x86a0
movq -0x68(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x23000
movq -0x68(%rbp), %rax
addq $0x140, %rax            # imm = 0x140
movq %rax, -0x80(%rbp)
leaq 0x7578e(%rip), %rax     # 0xaffc0
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x104e0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x6c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x3a87b
jmp 0x3a864
movl -0x6c(%rbp), %eax
subl $0x5, %eax
je 0x3a888
jmp 0x3a86e
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a893
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a893
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq %rdi, -0x50(%rbp)
addq $0x120, %rdi            # imm = 0x120
leaq -0x50(%rbp), %rsi
callq 0x3d070
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x86a0
movq -0x68(%rbp), %rdi
callq 0x33280
movq -0x40(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq (%rax), %rsi
movq %rsi, -0x50(%rbp)
addq $0xa8, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x3cc10
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %r8
movl -0x14(%rbp), %esi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
callq 0x55c60
movb %al, -0x39(%rbp)
jmp 0x3cb83
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x3cbb0
jmp 0x3cb8c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
jmp 0x3cbec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3ccf0
jmp 0x3cc00
movq -0x58(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x3cbe1
movq -0x50(%rbp), %rdi
callq 0x3cc50
movb %al, -0x59(%rbp)
jmp 0x3cbc8
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x3cbd1
jmp 0x3cbe1
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3cca0
jmp 0x3cbdf
jmp 0x3cbe1
movb $0x1, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3ccf0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x8bc0
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl -0xc(%rbp), %edi
movl $0x6, %esi
movl $0x1, %edx
leaq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq 0x8bf0
cmpl $-0x1, %eax
jne 0x3ccea
callq 0x8050
movl (%rax), %edi
leaq 0x3e979(%rip), %rsi     # 0x7b65e
callq 0xa320
addq $0x10, %rsp
popq %rbp
retq