LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/../sync.hpp
// Function: yrmcds::syncer::add_request(std::unique_ptr<yrmcds::sync_request, std::default_delete<yrmcds::sync_request>>)
void add_request(std::unique_ptr<sync_request> req) {
        const std::size_t n = m_workers.size();
        for( std::size_t i = 0; i < n; ++i ) {
            if( ! m_workers[i]->is_running() )
                req->set(i);
        }
        for( std::size_t i = n; i < MAX_WORKERS; ++i )
            req->set(i);
        if( ! req->check() )
            m_requests.emplace_back( std::move(req) );
    }

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rax), %rcx
movq (%rax), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0x10ff7
cmpq $0x1, %rdx
movq %rdx, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
movq (%rdi), %r8
movq (%r8), %r8
movq (%r8,%rcx,8), %r8
movb 0x40(%r8), %r8b
testb $0x1, %r8b
jne 0x10fef
movl $0x1, %r8d
shlq %cl, %r8
movq (%rsi), %r9
orq %r8, 0x20(%r9)
incq %rcx
cmpq %rcx, %rax
jne 0x10fcb
movq (%rsi), %rax
movq 0x20(%rax), %r8
cmpq $0x3f, %rdx
ja 0x110ef
movl $0x41, %ecx
subl %edx, %ecx
andl $0x7e, %ecx
movl $0x3f, %r9d
subl %edx, %r9d
movq %r8, %xmm0
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm3     # xmm3 = xmm1[0,1,0,1]
paddq 0x2386e(%rip), %xmm3    # 0x348a0
movd %r9d, %xmm1
pshufd $0x44, %xmm1, %xmm2     # xmm2 = xmm1[0,1,0,1]
movl $0x2, %edx
movdqa 0x23867(%rip), %xmm4    # 0x348b0
movdqa 0x2386f(%rip), %xmm5    # 0x348c0
movdqa %xmm0, %xmm1
movdqa %xmm4, %xmm6
psllq %xmm3, %xmm6
pshufd $0xee, %xmm3, %xmm7     # xmm7 = xmm3[2,3,2,3]
movdqa %xmm4, %xmm0
psllq %xmm7, %xmm0
movsd %xmm6, %xmm0            # xmm0 = xmm6[0],xmm0[1]
orpd %xmm1, %xmm0
paddq %xmm5, %xmm3
leaq (%rcx,%rdx), %r8
addq $-0x2, %r8
addq $-0x2, %rdx
cmpq $0x2, %r8
jne 0x11051
negq %rdx
movq %rdx, %xmm3
pshufd $0x44, %xmm3, %xmm3     # xmm3 = xmm3[0,1,0,1]
por 0x23803(%rip), %xmm3    # 0x348a0
movdqa 0x2382b(%rip), %xmm4    # 0x348d0
pxor %xmm4, %xmm2
pxor %xmm4, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pand %xmm5, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm1
pandn %xmm0, %xmm3
por %xmm1, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
por %xmm3, %xmm0
movq %xmm0, %r8
movq %xmm0, 0x20(%rax)
cmpq $-0x1, %r8
je 0x110ff
addq $0x8, %rdi
popq %rax
jmp 0x112a0
cmpq $0x0, 0x10(%rax)
je 0x1110d
movq %rax, %rdi
popq %rcx
jmpq *0x18(%rax)
callq 0x7170
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/config_parser.hpp
// Function: cybozu::config_parser::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void set(const std::string& key, const std::string& value) {
        auto it = m_config.find(key);
        if( it == m_config.end() ) {
            m_config.emplace(key, value);
        } else {
            it->second = value;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x11bf2
testq %rax, %rax
je 0x11bc6
addq $0x28, %rax
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7280
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x11c2c
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/ip_address.cpp
// Function: cybozu::ip_address::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ip_address::parse(const std::string& s) {
    struct addrinfo hints;
    struct addrinfo* res = nullptr;
    std::memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_INET;
    hints.ai_flags = AI_NUMERICHOST;
    int e = getaddrinfo(s.c_str(), nullptr, &hints, &res);
    if( e == 0 ) {
        af = addr_family::ipv4;
        std::memcpy(&addr, res->ai_addr, res->ai_addrlen);
        freeaddrinfo(res);
        return;
    }
    if( e != EAI_ADDRFAMILY && e != EAI_NONAME )
        throw std::runtime_error(gai_strerror(e));

    hints.ai_family = AF_INET6;
    e = getaddrinfo(s.c_str(), nullptr, &hints, &res);
    if( e == 0 ) {
        af = addr_family::ipv6;
        std::memcpy(&addr, res->ai_addr, res->ai_addrlen);
        freeaddrinfo(res);
        return;
    }
    if( e != EAI_ADDRFAMILY && e != EAI_NONAME )
        throw std::runtime_error(gai_strerror(e));
    throw bad_address("Invalid address: " + s);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movups %xmm0, 0x18(%rdx)
movq %rax, 0x28(%rdx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, (%rdx)
movq (%rsi), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $-0x9, %eax
je 0x12030
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x12030
movl $0x1, %eax
testl %ebp, %ebp
je 0x12056
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movl %ebp, %edi
callq 0x7730
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
jmp 0x120fe
leaq 0x30(%rsp), %rdx
movl $0xa, 0x4(%rdx)
movq (%r14), %rdi
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x7630
movl %eax, %ebp
movl $0x2, %eax
testl %ebp, %ebp
jne 0x12082
movl %eax, (%rbx)
addq $0x4, %rbx
movq 0x8(%rsp), %r14
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq %rbx, %rdi
callq 0x7400
movq %r14, %rdi
callq 0x7660
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $-0x9, %ebp
je 0x1208c
cmpl $-0x2, %ebp
jne 0x120df
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x22c12(%rip), %rsi     # 0x34cb2
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0xa064
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7610
leaq 0x33434(%rip), %rax     # 0x454f8
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x33400(%rip), %rsi     # 0x454d0
movq 0x33eb1(%rip), %rdx     # 0x45f88
movq %rbx, %rdi
callq 0x7960
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movl %ebp, %edi
callq 0x7730
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x33eeb(%rip), %rsi     # 0x45ff0
movq 0x33e64(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7960
jmp 0x1213d
jmp 0x1213d
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12136
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x12140
jmp 0x12148
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/ip_address.cpp
// Function: cybozu::ip_address::ip_address(sockaddr const*)
ip_address::ip_address(const struct sockaddr* ifa_addr) {
    if( ifa_addr->sa_family == AF_INET ) {
        af = addr_family::ipv4;
        std::memcpy(&addr, ifa_addr, sizeof(struct sockaddr_in));
        return;
    }
    if( ifa_addr->sa_family == AF_INET6 ) {
        af = addr_family::ipv6;
        std::memcpy(&addr, ifa_addr, sizeof(struct sockaddr_in6));
        return;
    }
    throw bad_address("Invalid address family");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl $0x0, (%rdi)
movzwl (%rsi), %eax
cmpl $0xa, %eax
je 0x12188
cmpl $0x2, %eax
jne 0x121a8
movl $0x1, (%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x4(%rdi)
jmp 0x1219d
movl $0x2, (%rdi)
movups (%rsi), %xmm0
movups 0xc(%rsi), %xmm1
movups %xmm0, 0x4(%rdi)
movups %xmm1, 0x10(%rdi)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x22aff(%rip), %rsi     # 0x34cc4
leaq 0x22b0e(%rip), %rdx     # 0x34cda
leaq 0x8(%rsp), %rdi
callq 0x9760
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7610
leaq 0x3330b(%rip), %rax     # 0x454f8
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x332d7(%rip), %rsi     # 0x454d0
movq 0x33d88(%rip), %rdx     # 0x45f88
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x12222
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x1222c
jmp 0x12234
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/ip_address.cpp
// Function: cybozu::ip_address::operator==(cybozu::ip_address const&) const
bool ip_address::operator==(const ip_address& rhs) const {
    if( af != rhs.af ) return false;
    if( af == addr_family::none ) return true;
    if( is_v4() ) {
        return std::memcmp(v4addr(), rhs.v4addr(), sizeof(struct in_addr)) == 0;
    }
    if( v6scope() != rhs.v6scope() ) return false;
    return std::memcmp(v6addr(), rhs.v6addr(), sizeof(struct in6_addr)) == 0;
}

// Assembly:
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x12279
testl %eax, %eax
je 0x12253
cmpl $0x1, %eax
jne 0x12256
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jmp 0x12275
movb $0x1, %al
retq
movl 0x1c(%rdi), %eax
cmpl 0x1c(%rsi), %eax
jne 0x12279
movdqu 0xc(%rdi), %xmm0
movdqu 0xc(%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/ip_address.cpp
// Function: cybozu::ip_address::str[abi:cxx11]() const
std::string ip_address::str() const {
    char host[101];
    if( is_v4() || is_v6() ) {
        std::size_t slen = is_v4() ?
            sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6);
        int e = getnameinfo((const struct sockaddr*)&addr, (socklen_t)slen,
                            host, sizeof(host), nullptr, 0, NI_NUMERICHOST);
        if( e != 0 ) throw std::runtime_error(gai_strerror(e));
        return std::string(host);
    }
    return "";
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movl (%rsi), %eax
leal -0x1(%rax), %ecx
cmpl $0x1, %ecx
ja 0x122f1
addq $0x4, %rsi
cmpl $0x1, %eax
movl $0x10, %ecx
movl $0x1c, %eax
cmovel %ecx, %eax
movl $0x1, (%rsp)
leaq 0x10(%rsp), %rdx
movq %rsi, %rdi
movl %eax, %esi
movl $0x65, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7300
testl %eax, %eax
jne 0x12319
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x71b0
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x12305
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x24b62(%rip), %rdx     # 0x36e61
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x9760
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movl %ebp, %edi
callq 0x7730
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x33caf(%rip), %rsi     # 0x45ff0
movq 0x33c28(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/ip_address.cpp
// Function: cybozu::get_peer_ip_address(int)
ip_address get_peer_ip_address(int sockfd) {
    union {
        struct sockaddr sa;
        struct sockaddr_storage ss;
    } addr;
    socklen_t addrlen = sizeof(addr);
    if( ::getpeername(sockfd, &addr.sa, &addrlen) != 0 )
        throw_unix_error(errno, "getpeername");
    return ip_address(&addr.sa);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movl %esi, %eax
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x10(%rsp), %rsi
movl %eax, %edi
callq 0x7380
testl %eax, %eax
jne 0x12459
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1215c
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
retq
callq 0x7040
movl (%rax), %edi
leaq 0x22874(%rip), %rsi     # 0x34cdb
callq 0x8d8d
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/signal.cpp
// Function: cybozu::signal_setup(std::initializer_list<int>)
std::unique_ptr<signal_reader> signal_setup(std::initializer_list<int> sigs) {
    sigset_t mask[1];
    sigemptyset(mask);
    for( int i: sigs )
        sigaddset(mask, i);
    int e = pthread_sigmask(SIG_BLOCK, mask, NULL);
    if( e != 0 )
        throw_unix_error(e, "pthread_sigmask");

    // signal disposition is a per-process attribute.
    struct sigaction act;
    std::memset(&act, 0, sizeof(act));
    act.sa_handler = SIG_IGN;
    if( sigaction(SIGPIPE, &act, NULL) == -1 )
        throw_unix_error(errno, "sigaction");

    std::memset(&act, 0, sizeof(act));
    act.sa_handler = handle_abort;
    act.sa_flags = SA_RESETHAND;
    if( sigaction(SIGABRT, &act, NULL) == -1 )
        throw_unix_error(errno, "sigaction");

    return std::unique_ptr<signal_reader>( new signal_reader(mask) );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x7600
testq %r14, %r14
je 0x124c9
shlq $0x2, %r14
xorl %r13d, %r13d
movq %rsp, %r12
movl (%r15,%r13), %esi
movq %r12, %rdi
callq 0x7830
addq $0x4, %r13
cmpq %r13, %r14
jne 0x124b4
movq %rsp, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x70d0
testl %eax, %eax
jne 0x1259d
leaq 0x90(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7290
movq $0x1, -0x8(%r14)
leaq 0x88(%rsp), %rsi
movl $0xd, %edi
xorl %edx, %edx
callq 0x7620
cmpl $-0x1, %eax
je 0x1258a
leaq 0x90(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7290
leaq 0x90(%rip), %rax        # 0x125c3
movq %rax, -0x8(%r14)
movl $0x80000000, 0x80(%r14) # imm = 0x80000000
leaq 0x88(%rsp), %rsi
movl $0x6, %edi
xorl %edx, %edx
callq 0x7620
cmpl $-0x1, %eax
je 0x1258a
movl $0x78, %edi
callq 0x74f0
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x125e4
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x7040
movl (%rax), %edi
leaq 0x2278d(%rip), %rsi     # 0x34d25
callq 0x8d8d
leaq 0x22771(%rip), %rsi     # 0x34d15
movl %eax, %edi
callq 0x8d8d
movq %rax, %rbx
movl $0x78, %esi
movq %r14, %rdi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/signal.hpp
// Function: cybozu::signal_reader::signal_reader(__sigset_t const*, std::function<void (signalfd_siginfo const&, cybozu::reactor&)>)
signal_reader(const sigset_t *mask, callback_t callback):
        resource( signalfd(-1, mask, SFD_NONBLOCK|SFD_CLOEXEC) ),
        m_callback(callback)
    {
        with_fd([](int fd) -> bool {
            if( fd == -1 )
                throw_unix_error(errno, "signalfd");
            return true;
        });
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x80800, %edx          # imm = 0x80800
callq 0x72c0
xorl %ecx, %ecx
movq %rcx, 0x8(%rbx)
movw $0x1, 0x10(%rbx)
movq %rcx, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movl $0x2, 0x48(%rbx)
movl %eax, 0x50(%rbx)
leaq 0x32e8e(%rip), %rax     # 0x45520
movq %rax, (%rbx)
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x103cc
leaq 0xf(%rsp), %rsi
movq %rbx, %rdi
callq 0x126f2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x126e1
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x126e1
movq %rax, %rdi
callq 0x8f80
movq %rax, %r15
movq %rbx, %rdi
callq 0x128aa
movq %r15, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/./cybozu/reactor.hpp
// Function: bool cybozu::resource::with_fd<cybozu::tcp_socket::send(char const*, unsigned long, bool)::'lambda'(int)>(cybozu::tcp_socket::send(char const*, unsigned long, bool)::'lambda'(int)&&)
bool with_fd(Func&& f) {
        read_lock g(m_lock);
        if( ! valid() ) return false;
        // no need to check m_closed because it becomes true only after m_valid is set to false.

        if( f(m_fd) ) {
            return true;
        }

        invalidate_and_close_();
        return false;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x128ce
movb 0x10(%r14), %al
testb $0x1, %al
je 0x17aff
movl 0x50(%r14), %ebp
movq (%r12), %r15
leaq 0xa8(%r15), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x17b8c
movq %rsp, %r8
movb $0x1, 0x8(%r8)
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq %r15, %rdi
movl %ebp, %esi
callq 0x20000
testb %al, %al
je 0x17aef
cmpb $0x1, 0x18(%r12)
jne 0x17ae2
movq 0x70(%r15), %rax
cmpq 0x78(%r15), %rax
jne 0x17ae2
movq 0x90(%r15), %rax
cmpq %rax, 0x88(%r15)
jne 0x17ae2
movq %r15, %rdi
movl %ebp, %esi
callq 0x17b38
movq %rsp, %rdi
callq 0x17b76
movb $0x1, %bpl
jmp 0x17b01
movq %rsp, %rdi
callq 0x17b76
movq %r14, %rdi
callq 0xa0ec
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x7690
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x17b76
jmp 0x17b28
movq %rax, %r14
movq %rbx, %rdi
callq 0x7690
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/cybozu/signal.hpp
// Function: cybozu::signal_reader::on_readable(int)
virtual bool on_readable(int fd) override final {
        while( true ) {
            struct signalfd_siginfo si;
            ssize_t n = read(fd, &si, sizeof(si));
            if( n == -1 ) {
                if( errno == EINTR ) continue;
                if( errno == EAGAIN || errno ==EWOULDBLOCK ) return true;
                throw_unix_error(errno, "read");
            }
            if( n != sizeof(si) )
                throw std::runtime_error("<signal_reader::on_readable> bug?");
            if( m_callback ) m_callback(si, *m_reactor);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x58(%rdi), %r15
leaq 0x8(%rsp), %r12
movl $0x80, %edx
movl %ebx, %edi
movq %r12, %rsi
callq 0x7780
cmpq $0x80, %rax
je 0x127e7
cmpq $-0x1, %rax
jne 0x12814
callq 0x7040
movl (%rax), %edi
cmpl $0x4, %edi
je 0x127bc
jmp 0x127fe
cmpq $0x0, 0x68(%r14)
je 0x127bc
movq 0x8(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq *0x70(%r14)
jmp 0x127bc
cmpl $0xb, %edi
jne 0x12846
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x22510(%rip), %rsi     # 0x34d38
movq %rax, %rdi
callq 0x7190
movq 0x337b9(%rip), %rsi     # 0x45ff0
movq 0x33732(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7960
leaq 0x22352(%rip), %rsi     # 0x34b9f
callq 0x8d8d
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/counter/handler.cpp
// Function: yrmcds::counter::handler::gc_ready()
bool handler::gc_ready() {
    std::time_t now = g_current_time.load(relaxed);

    if( m_gc_thread.get() != nullptr ) {
        if( ! m_gc_thread->done() )
            return false;
        m_last_gc = now;
        m_gc_thread = nullptr;  // join
    }

    unsigned int interval = g_config.counter().stat_interval();
    std::time_t boundary = (now / interval) * interval;
    return m_last_gc < boundary;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x344f8(%rip), %rax     # 0x46e80
movq (%rax), %r14
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x129a9
movb (%rax), %al
testb $0x1, %al
je 0x129ca
leaq 0x58(%rbx), %rdi
movq %r14, 0x50(%rbx)
xorl %esi, %esi
callq 0x13490
leaq 0x34210(%rip), %rax     # 0x46bc0
movl 0x11c(%rax), %ecx
movq %r14, %rax
cqto
idivq %rcx
subq %rdx, %r14
cmpq %r14, 0x50(%rbx)
setl %al
jmp 0x129cc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x33dfe(%rip), %rax     # 0x46bc0
movl 0x114(%rax), %eax
testq %rax, %rax
je 0x12de0
leaq 0x33f2c(%rip), %rcx     # 0x46d00
movq 0x80(%rcx), %rcx
cmpq %rax, %rcx
jae 0x12e09
movl $0x1c0, %edi            # imm = 0x1C0
movl $0x40, %esi
callq 0x7530
movq %rax, %r14
leaq 0x8(%r15), %rdx
addq $0x30, %r15
movq %rax, %rdi
movl %ebp, %esi
movq %r15, %rcx
callq 0x1388c
jmp 0x12e0c
xorl %r14d, %r14d
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x7680
movq %rbx, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/counter/handler.cpp
// Function: yrmcds::counter::handler::dump_stats()
void handler::dump_stats() {
    std::uint64_t ops = 0;
    for( auto& v: g_stats.ops ) {
        ops += v.load(relaxed);
    }
    using logger = cybozu::logger;
    logger::info() << "counter: "
                   << g_stats.objects.load(relaxed) << " objects, "
                   << g_stats.curr_connections.load(relaxed) << " clients, "
                   << ops << " total ops.";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq $-0x98, %rax
xorl %ebx, %ebx
leaq 0x33dd5(%rip), %r15     # 0x46d00
movq 0x158(%r15,%rax), %rcx
addq %rcx, %rbx
addq $0x8, %rax
jne 0x12f2b
leaq 0x33b45(%rip), %rax     # 0x46a88
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
leaq 0x21b08(%rip), %rdx     # 0x34a5d
movq %rsp, %r14
movq %r14, %rdi
callq 0x96e6
movb (%r14), %al
cmpb $0x1, %al
jne 0x12f80
movq 0x8(%rsp), %rdi
leaq 0x21e21(%rip), %rsi     # 0x34d94
movl $0x9, %edx
callq 0x7570
movb (%rsp), %al
movl (%r15), %esi
testb $0x1, %al
je 0x12f94
movq 0x8(%rsp), %rdi
callq 0x7330
movb (%rsp), %al
testb $0x1, %al
je 0x12fb1
movq 0x8(%rsp), %rdi
leaq 0x21dfa(%rip), %rsi     # 0x34d9e
movl $0xa, %edx
callq 0x7570
movb (%rsp), %al
movq 0x80(%r15), %rsi
testb $0x1, %al
je 0x12fc9
movq 0x8(%rsp), %rdi
callq 0x7330
movb (%rsp), %al
testb $0x1, %al
je 0x12fe6
movq 0x8(%rsp), %rdi
leaq 0x21dd0(%rip), %rsi     # 0x34da9
movl $0xa, %edx
callq 0x7570
movb (%rsp), %al
testb $0x1, %al
je 0x12ffa
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7330
movb (%rsp), %al
testb $0x1, %al
je 0x13014
movq 0x8(%rsp), %rdi
leaq 0x21daa(%rip), %rsi     # 0x34db4
movl $0xb, %edx
callq 0x7570
movq %rsp, %rdi
callq 0x8f4e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1302a
jmp 0x1302a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8f4e
movq %rbx, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/./cybozu/hash_map.hpp
// Function: cybozu::hash_map<yrmcds::memcache::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 %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x174a8
movq %rdi, %rbx
movq 0x60(%r14), %rsi
movq 0x90(%r14), %r15
testq %rsi, %rsi
je 0x1746a
leaq 0x60(%r14), %rdi
callq 0x1818e
movq $0x0, 0x60(%r14)
leaq 0x38(%r14), %rdi
callq 0x96b0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1748f
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x7500
movl $0x98, %esi
movq %r14, %rdi
callq 0x7500
movq %r15, 0x28(%rbx)
movq %r15, %r14
testq %r15, %r15
jne 0x17451
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13d47
movq 0x108(%rbx), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x13d7f
callq *0x18(%rdi)
testq %rax, %rax
je 0x13d47
movq %rax, %r14
movb $0x1, 0x100(%rbx)
addq $0x140, %rbx            # imm = 0x140
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x14c8c
leaq 0x70(%r14), %rdi
movq %r15, %rsi
callq 0x14e6e
movb $0x1, 0x40(%r14)
movq %r14, %rdi
callq 0x10486
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x13d73
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x13d73
movq 0x8(%rbx), %rdi
addq $0x50, %rbx
movq 0x48(%rdi), %rsi
cmpq 0x50(%rdi), %rsi
je 0x13d67
movl (%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rdi)
jmp 0x13d73
addq $0x40, %rdi
movq %rbx, %rdx
callq 0xaa5a
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x7170
jmp 0x13da8
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x13da0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdi, %r14
movq 0x108(%rdi), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x13e41
movl %esi, %ebp
callq *0x18(%rdi)
testq %rax, %rax
je 0x13e2d
movq %rax, %rbx
addq $0x160, %r14            # imm = 0x160
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x14c8c
leaq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x14e6e
movb $0x1, 0x40(%rbx)
movq %rbx, %rdi
callq 0x10486
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x13e20
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x14cea
callq 0x7170
jmp 0x13e6c
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x13e64
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x110(%rdi), %r13
movq 0x20(%rsi), %rdi
movq 0x28(%rsi), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
callq 0xb822
movq %rax, %r12
movq %rax, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x18, %edi
callq 0x74f0
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x30(%rsp), %r8
movq %rax, (%r8)
leaq 0x812(%rip), %rax       # 0x1480e
movq %rax, 0x18(%r8)
leaq 0x81b(%rip), %rax       # 0x14822
movq %rax, 0x10(%r8)
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
movq %r12, %rax
xorl %edx, %edx
divq (%r13)
leaq (%rdx,%rdx,2), %rdi
shlq $0x4, %rdi
addq 0x8(%r13), %rdi
movq %rsp, %rsi
movq %r8, %rdx
callq 0x1530c
movl %eax, %ebp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x14055
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x1406e
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x14084
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x14096
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21bee
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14105
jmp 0x14105
movq %rax, %rbx
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x140c5
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x140e7
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x140e7
jmp 0x14105
jmp 0x14105
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x140fd
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movsd 0x18(%rsi), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x110(%rdi), %r12
movq 0x20(%rsi), %rdi
movq 0x28(%rsi), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
callq 0xb822
movq %rax, %r15
movq %rax, 0x48(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x18, %edi
callq 0x74f0
movq %r14, (%rax)
movaps 0x50(%rsp), %xmm0
movlps %xmm0, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, (%rsp)
leaq 0x6f5(%rip), %rax       # 0x14886
movq %rax, 0x18(%rsp)
leaq 0x779(%rip), %rax       # 0x14916
movq %rax, 0x10(%rsp)
movq $0x0, 0x70(%rsp)
movl $0x18, %edi
callq 0x74f0
movq %r14, (%rax)
movaps 0x50(%rsp), %xmm0
movss %xmm0, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x68(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x7a5(%rip), %rax       # 0x1497a
movq %rax, 0x18(%rcx)
leaq 0x7da(%rip), %rax       # 0x149ba
movq %rax, 0x10(%rcx)
movq %r15, %rax
xorl %edx, %edx
divq (%r12)
leaq (%rdx,%rdx,2), %rdi
shlq $0x4, %rdi
addq 0x8(%r12), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x1530c
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x14220
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x14237
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1424e
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x142c1
jmp 0x142c1
movq %rax, %rbx
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x14284
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x14284
jmp 0x142c1
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x142a2
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x142a2
jmp 0x142c1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x142b9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl 0x18(%rsi), %ebp
movq 0x110(%rdi), %r12
movq 0x20(%rsi), %rdi
movq 0x28(%rsi), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
callq 0xb822
movq %rax, %r15
movq %rax, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x18, %edi
callq 0x74f0
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x30(%rsp), %r8
movq %rax, (%r8)
leaq 0x6dd(%rip), %rax       # 0x14a1e
movq %rax, 0x18(%r8)
leaq 0x79c(%rip), %rax       # 0x14ae8
movq %rax, 0x10(%r8)
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
movq %r15, %rax
xorl %edx, %edx
divq (%r12)
leaq (%rdx,%rdx,2), %rdi
shlq $0x4, %rdi
addq 0x8(%r12), %rdi
movq %rsp, %rsi
movq %r8, %rdx
callq 0x1530c
movl %eax, %ebp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x1439b
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x143b4
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x143ca
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
testb %bpl, %bpl
jne 0x143dc
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21bee
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14449
jmp 0x14449
movq %rax, %rbx
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x14409
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x1442b
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1442b
jmp 0x14449
jmp 0x14449
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x14441
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x110(%rdi), %rcx
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x6d4(%rip), %rax       # 0x14b4c
movq %rax, 0x20(%rsp)
leaq 0x71a(%rip), %rax       # 0x14b9e
movq %rax, 0x18(%rsp)
movq 0x8(%rcx), %r14
movq 0x10(%rcx), %r12
cmpq %r12, %r14
je 0x144b9
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x15582
addq $0x30, %r14
cmpq %r12, %r14
jne 0x1449b
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x144c8
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x21b9c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x14502
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x144fa
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79a0
movq %rax, %rdi
callq 0x8f80
// File: /workspace/github_cpp_makefile_star2_O3/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 0x155e8
testq %rax, %rax
je 0x1453f
addl %ebp, 0x10(%rax)
jmp 0x14554
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x15644
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x155e8
testq %rax, %rax
je 0x1458a
movl 0x10(%rax), %ecx
subl %ebp, %ecx
jae 0x1458e
xorl %eax, %eax
jmp 0x145a2
jne 0x1459d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x158e4
jmp 0x145a0
movl %ecx, 0x10(%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14f01
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1516c
movq 0x20(%r14), %rdi
addq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7400
addq %rbx, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/./cybozu/tcp.hpp
// Function: cybozu::tcp_socket::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, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rcx
movq 0x20(%rsi), %rax
subq %rax, %rcx
cmpq %rdx, %rcx
jae 0x14f4b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1516c
movq 0x20(%rbx), %rax
addq (%rbx), %rax
movq %rsp, %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
movq %r15, 0x10(%rsi)
movq %r14, %rdi
callq 0x1523a
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
je 0x14fad
movq (%rsp), %rax
testq %rax, %rax
je 0x14fa0
cmpq $-0x1, %rax
jne 0x14fa7
callq 0x7040
movl (%rax), %edi
movl $0x1, %eax
cmpl $0xb, %edi
je 0x14fad
leaq 0x202bb(%rip), %rsi     # 0x35256
callq 0x8d8d
movl $0x3, %eax
jmp 0x14fad
addq %rax, 0x20(%rbx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movq $0x0, (%rdi)
movw $0x12, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdi)
movups %xmm0, 0x1c(%rdi)
movl $0x0, 0x2c(%rdi)
movb $0x4, 0x30(%rdi)
testq %rsi, %rsi
je 0x14ff5
testq %rdx, %rdx
je 0x15013
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21a8c
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x20252(%rip), %rsi     # 0x3525b
movq %rax, %rdi
callq 0x7790
jmp 0x1502f
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x2025f(%rip), %rsi     # 0x35286
movq %rax, %rdi
callq 0x7790
movq 0x30f82(%rip), %rsi     # 0x45fb8
movq 0x30f53(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7960
jmp 0x15047
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15126
movq %rsi, %r15
testq %rsi, %rsi
je 0x1511a
movq %rdi, %rbx
subq %r15, %r14
jne 0x15096
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10e92
movq 0x8(%rbx), %rdi
cmpq %rdi, %r14
ja 0x150a5
cmpq %rdi, 0x10(%rbx)
jne 0x150d1
movq (%rbx), %rdi
leaq (%rdi,%r15), %rsi
movq %r14, %rdx
callq 0x78d0
cmpb $0x1, 0x18(%rbx)
jne 0x15116
leaq 0x30277(%rip), %rax     # 0x45338
movq (%rax), %rax
movq (%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq *%rax
jmp 0x15116
callq 0x1042a
movq %rax, %r12
addq (%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7400
cmpb $0x1, 0x18(%rbx)
jne 0x15103
leaq 0x30241(%rip), %rax     # 0x45338
movq (%rax), %rax
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
callq *%rax
movq (%rbx), %rdi
callq 0x75a0
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
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x20176(%rip), %rsi     # 0x352b0
movq %rax, %rdi
callq 0x7a60
movq 0x30e77(%rip), %rsi     # 0x45fc0
movq 0x30e50(%rip), %rdx     # 0x45fa0
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x151dc
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq 0x10(%rdi), %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x151c2
movq %rbx, %rdi
callq 0x1042a
movq %rax, %r15
movq (%r14), %rsi
testq %rsi, %rsi
je 0x151d0
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0x7400
leaq 0x3018c(%rip), %rax     # 0x45338
movq (%rax), %rax
movq (%r14), %rdi
movq 0x20(%r14), %rsi
callq *%rax
movq (%r14), %rdi
callq 0x75a0
jmp 0x151d0
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x151de
movq %rax, %r15
movq %r15, (%r14)
movq %rbx, 0x10(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x151f4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x20030(%rip), %rsi     # 0x35238
movq %rax, %rdi
callq 0x7190
movq 0x30dd9(%rip), %rsi     # 0x45ff0
movq 0x30d52(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7960
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
movq 0x28(%rdi), %r15
testq %r15, %r15
je 0x153c5
movq 0x18(%r12), %r13
movq 0x20(%r12), %r14
movq %r15, %rbp
cmpq %r14, 0x20(%rbp)
jne 0x153bc
movq 0x18(%rbp), %rdi
cmpq %r13, %rdi
je 0x153f7
movq %r13, %rsi
movq %r14, %rdx
callq 0x7510
testl %eax, %eax
je 0x153f7
movq 0x40(%rbp), %rbp
testq %rbp, %rbp
jne 0x1539e
movq 0x10(%rsp), %r13
cmpq $0x0, 0x10(%r13)
je 0x1541e
movl $0x48, %edi
callq 0x74f0
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x15448
movq %r14, 0x28(%rbx)
movb $0x1, %al
jmp 0x15420
movq 0x8(%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x1541e
leaq 0x30(%rbp), %rdx
movq 0x18(%rdi), %rax
movq %rbp, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x48, %esi
movq %r14, %rdi
callq 0x7500
movq %rbx, %rdi
callq 0x79a0
nop