LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/reactor.cpp
// Function: cybozu::reactor::remove_resource(int)
void reactor::remove_resource(int fd) {
    resource_map::iterator it = m_resources.find(fd);
    if( it == m_resources.end() ) {
        dump_stack();
        throw std::logic_error("bug in remove_resource");
    }
    auto res = it->second.get();
    m_garbage.emplace_back( std::move(it->second) );
    m_resources.erase(it);
    if( epoll_ctl(m_fd, EPOLL_CTL_DEL, fd, NULL) == -1 )
        throw_unix_error(errno, "epoll_ctl(EPOLL_CTL_DEL)");
    m_readables.erase(std::remove(m_readables.begin(), m_readables.end(), fd),
                      m_readables.end());

    if( ! res->try_close() ) {
        logger::debug() << "failed to close fd (will be closed later): " << fd;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rax
movl %esi, (%rax)
leaq 0x8(%rdi), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xa734
testq %rax, %rax
je 0x9d05
movq %rax, %r12
movq %rax, %rsi
addq $0x10, %rsi
movq 0x10(%rax), %r14
leaq 0xa8(%rbx), %rdi
callq 0x9ed0
movq %r15, %rdi
movq %r12, %rsi
callq 0xa8e6
movl (%rbx), %edi
movl 0x4(%rsp), %edx
pushq $0x2
popq %rsi
xorl %ecx, %ecx
callq 0x7730
cmpl $-0x1, %eax
je 0x9d3a
leaq 0x40(%rbx), %r15
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
leaq 0x4(%rsp), %rdx
callq 0xa9e8
movq 0x48(%rbx), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x9f0c
movq %r14, %rdi
callq 0x9f12
testb %al, %al
jne 0x9cf9
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x9360
leaq 0x1c66d(%rip), %rsi     # 0x26347
movq %rbx, %rdi
callq 0x9f72
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x93b8
leaq 0x8(%rsp), %rdi
callq 0x86e4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xb30b
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x1c5fb(%rip), %rsi     # 0x26317
movq %rax, %rdi
callq 0x77a0
movq 0x31295(%rip), %rsi     # 0x3afc0
movq 0x31256(%rip), %rdx     # 0x3af88
movq %rbx, %rdi
callq 0x7950
callq 0x7030
movl (%rax), %edi
leaq 0x1c5e6(%rip), %rsi     # 0x2632e
callq 0x8513
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
jmp 0x9d67
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x86e4
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/reactor.hpp
// Function: cybozu::resource::try_close()
bool try_close() {
        write_lock g(m_lock, std::try_to_lock);
        if( ! g ) return false;

        if( ! m_closed ) {
            ::close(m_fd);
            m_closed = true;
        }
        return true;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
addq $0x18, %rdi
movq %rdi, 0x8(%rsp)
callq 0xa1f8
movl %eax, %ebx
movb %al, 0x10(%rsp)
testb %al, %al
je 0x9f49
cmpb $0x0, 0x11(%r14)
jne 0x9f49
movl 0x50(%r14), %edi
callq 0x7a90
movb $0x1, 0x11(%r14)
leaq 0x8(%rsp), %rdi
callq 0xa1e2
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa1e2
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/util.cpp
// Function: cybozu::demangler::demangler(char const*)
demangler::demangler(const char* name) {
    int status;
    char* demangled = abi::__cxa_demangle(name, 0, 0, &status);
    if( status == 0 ) {
        m_name = demangled;
        std::free(demangled);
    } else {
        m_name = name;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7440
cmpl $0x0, 0xc(%rsp)
je 0xb2d8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7a70
jmp 0xb2ee
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7a70
movq %r15, %rdi
callq 0x75b0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x71d0
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/util.cpp
// Function: cybozu::dump_stack()
void dump_stack() noexcept {
    char buf[32];
    std::time_t t = std::time(nullptr);
    std::size_t len = std::strlen(ctime_r(&t, buf));
    ::write(STDERR_FILENO, buf, len);

    void* bt[100];
    int n = backtrace(bt, 100);
    backtrace_symbols_fd(bt, n, STDERR_FILENO);
}

// Assembly:
pushq %rbx
subq $0x350, %rsp            # imm = 0x350
xorl %edi, %edi
callq 0x74c0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x75a0
movq %rax, %rdi
callq 0x71b0
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7150
leaq 0x30(%rsp), %rdi
pushq $0x64
popq %rsi
callq 0x77f0
leaq 0x30(%rsp), %rdi
pushq $0x2
popq %rdx
movl %eax, %esi
callq 0x7890
addq $0x350, %rsp            # imm = 0x350
popq %rbx
retq
movq %rax, %rdi
callq 0x870a
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/util.cpp
// Function: cybozu::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> tokenize(const std::string& s, char c) {
    auto end = s.cend();
    auto start = end;  // initially, token start position is not set.

    std::vector<std::string> v;
    for( auto it = s.cbegin(); it != end; ++it ) {
        if( *it != c ) {
            if( start == end )
                start = it;
            continue;
        }
        if( start != end ) {
            v.emplace_back(start, it);
            start = end;
        }
    }
    if( start != end )
        v.emplace_back(start, end);
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %r12
addq %rax, %r12
movq %r12, 0x18(%rsp)
leaq 0x8(%rsp), %r14
movq %r12, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x10(%rsp), %r15
movq %r12, %rcx
movq %r12, %rdx
movq %r12, %rdi
movq %r12, %rsi
movq %rax, 0x10(%rsp)
cmpq %rsi, %rax
je 0xb41c
cmpb %bpl, (%rax)
jne 0xb3f6
movq %rdx, %r8
movq %rdx, %rdi
cmpq %rsi, %rdx
je 0xb411
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xb46a
movq %r12, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %r12, %rcx
movq %r12, %rdx
movq %r12, %r8
movq %r12, %rdi
jmp 0xb411
cmpq %rsi, %rdi
je 0xb403
movq %rdi, %r8
movq %rsi, %rdi
jmp 0xb411
movq %rax, 0x8(%rsp)
movq %rax, %rcx
movq %rax, %rdx
movq %rax, %r8
movq %rdi, %rsi
incq %rax
movq %r8, %rdi
jmp 0xb3b6
cmpq %rsi, %rcx
je 0xb433
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0xb46a
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb445
movq %rax, %r14
movq %rbx, %rdi
callq 0x8780
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/config.cpp
// Function: (anonymous namespace)::parse_unit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*)
inline std::size_t parse_unit(std::string& s, const char* cmd) {
    std::size_t base = 1;
    switch( s.back() ) {
    case 'k':
    case 'K':
        base <<= 10;
        break;
    case 'm':
    case 'M':
        base <<= 20;
        break;
    case 'g':
    case 'G':
        base <<= 30;
        break;
    }
    if( base != 1 )
        s.pop_back();
    int n = std::stoi( s );
    if( n < 1 )
        throw yrmcds::config::bad_config(cmd + std::string(" must be > 0"));
    return base * static_cast<std::size_t>(n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movzbl -0x1(%rax,%rcx), %eax
pushq $0x1
popq %r15
addl $-0x47, %eax
cmpl $0x26, %eax
ja 0xcdbb
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rax, %rcx
jb 0xcdaa
movl $0x400, %r12d           # imm = 0x400
movabsq $0x1000000010, %rcx     # imm = 0x1000000010
btq %rax, %rcx
jb 0xcdb0
movabsq $0x4000000040, %rcx     # imm = 0x4000000040
btq %rax, %rcx
jae 0xcdbb
movl $0x100000, %r12d        # imm = 0x100000
jmp 0xcdb0
movl $0x40000000, %r12d      # imm = 0x40000000
movq %rbx, %rdi
callq 0x75d0
movq %r12, %r15
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd6e5
testl %eax, %eax
jle 0xcde2
movl %eax, %eax
imulq %rax, %r15
movq %r15, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x1973d(%rip), %rsi     # 0x26531
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x84d8
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x8abf
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0xd09e
xorl %ebp, %ebp
leaq 0x2d512(%rip), %rsi     # 0x3a340
movq 0x2e14b(%rip), %rdx     # 0x3af80
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x71d0
jmp 0xce52
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x71d0
testb %bpl, %bpl
jne 0xce66
jmp 0xce6e
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/config_parser.hpp
// Function: cybozu::config_parser::get_as_bool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool get_as_bool(const std::string& key) const {
        const std::string& s = get(key);
        if( s == "true" ) return true;
        if( s == "false" ) return false;
        throw illegal_value(key);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xd042
movq %rax, %r14
leaq 0x19692(%rip), %rsi     # 0x26598
movq %rax, %rdi
callq 0x89e2
movl %eax, %ebp
testb %al, %al
jne 0xcf27
leaq 0x19682(%rip), %rsi     # 0x2659d
movq %r14, %rdi
callq 0x89e2
testb %al, %al
je 0xcf2e
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd672
leaq 0x2d40d(%rip), %rsi     # 0x3a358
movq 0x2e02e(%rip), %rdx     # 0x3af80
movq %r14, %rdi
callq 0x7950
movq %rax, %rbx
movq %r14, %rdi
callq 0x7390
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/config_parser.hpp
// Function: cybozu::config_parser::get_as_int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int get_as_int(const std::string& key) const {
        try {
            return std::stoi(get(key));
        } catch(const std::invalid_argument& e) {
            throw illegal_value(key);
        } catch(const std::out_of_range& e) {
            throw illegal_value(key);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xd042
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xd6e5
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
cmpl $0x2, %edx
jne 0xcfcc
movq %r14, %rdi
callq 0x71a0
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd672
leaq 0x2d39d(%rip), %rsi     # 0x3a358
movq 0x2dfbe(%rip), %rdx     # 0x3af80
movq %r15, %rdi
callq 0x7950
jmp 0xd005
cmpl $0x1, %edx
jne 0xd031
movq %r14, %rdi
callq 0x71a0
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd672
leaq 0x2d362(%rip), %rsi     # 0x3a358
movq 0x2df83(%rip), %rdx     # 0x3af80
movq %r15, %rdi
callq 0x7950
movq %rax, %r14
jmp 0xd015
movq %rax, %r14
movq %r15, %rdi
callq 0x7390
callq 0x78e0
jmp 0xd031
movq %rax, %r14
jmp 0xd02c
movq %rax, %r14
movq %r15, %rdi
callq 0x7390
callq 0x78e0
movq %r14, %rdi
callq 0x7990
movq %rax, %rdi
callq 0x870a
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/config_parser.hpp
// Function: cybozu::config_parser::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const std::string& get(const std::string& key) const {
        auto it = m_config.find(key);
        if( it == m_config.end() )
            throw not_found(key);
        return it->second;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0xd550
testq %rax, %rax
je 0xd05f
addq $0x28, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd7c4
leaq 0x2d31c(%rip), %rsi     # 0x3a398
movq 0x2defd(%rip), %rdx     # 0x3af80
movq %r14, %rdi
callq 0x7950
movq %rax, %rbx
movq %r14, %rdi
callq 0x7390
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/config_parser.hpp
// Function: cybozu::config_parser::get_as_uint64(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::uint64_t get_as_uint64(const std::string& key) const {
        try {
            return std::stoull(get(key));
        } catch(const std::invalid_argument& e) {
            throw illegal_value(key);
        } catch(const std::out_of_range& e) {
            throw illegal_value(key);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xd042
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xd921
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
cmpl $0x2, %edx
jne 0xd218
movq %r14, %rdi
callq 0x71a0
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd672
leaq 0x2d151(%rip), %rsi     # 0x3a358
movq 0x2dd72(%rip), %rdx     # 0x3af80
movq %r15, %rdi
callq 0x7950
jmp 0xd251
cmpl $0x1, %edx
jne 0xd27d
movq %r14, %rdi
callq 0x71a0
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd672
leaq 0x2d116(%rip), %rsi     # 0x3a358
movq 0x2dd37(%rip), %rdx     # 0x3af80
movq %r15, %rdi
callq 0x7950
movq %rax, %r14
jmp 0xd261
movq %rax, %r14
movq %r15, %rdi
callq 0x7390
callq 0x78e0
jmp 0xd27d
movq %rax, %r14
jmp 0xd278
movq %rax, %r14
movq %r15, %rdi
callq 0x7390
callq 0x78e0
movq %r14, %rdi
callq 0x7990
movq %rax, %rdi
callq 0x870a
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/server.cpp
// Function: yrmcds::server::server()
server::server(): m_syncer(m_workers) {
    auto finder = [this]() ->cybozu::worker* {
        std::size_t n_workers = m_workers.size();
        for( std::size_t i = 0; i < n_workers; ++i ) {
            cybozu::worker* pw = m_workers[m_worker_index].get();
            m_worker_index = (m_worker_index + 1) % n_workers;
            if( ! pw->is_running() )
                return pw;
        }
        return nullptr;
    };

    m_handlers.emplace_back(new memcache::handler(finder, m_reactor, m_syncer));
    if( g_config.counter().enable() )
        m_handlers.emplace_back(new counter::handler(finder, m_reactor));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movb $0x0, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x970c
leaq 0xe0(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xec(%r14)
movups %xmm0, 0xe0(%r14)
movq %rax, 0x8(%rsp)
movq %rax, 0x100(%r14)
leaq 0x120(%r14), %rax
movq %rax, (%rsp)
movups %xmm0, 0x108(%r14)
movups %xmm0, 0x118(%r14)
movups %xmm0, 0x128(%r14)
movl $0xb0, %edi
callq 0x7510
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
andq $0x0, 0x8(%rsi)
leaq 0x100(%r14), %rcx
movq %r14, (%rsi)
leaq 0x665(%rip), %r13       # 0xe846
movq %r13, 0x18(%rsi)
leaq 0x6a8(%rip), %r15       # 0xe894
movq %r15, 0x10(%rsi)
movb $0x1, %r12b
movq %rax, %rdi
movq %rbx, %rdx
callq 0x13dcc
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
xorl %r12d, %r12d
movq (%rsp), %rdi
callq 0xec1a
leaq 0x18(%rsp), %rdi
callq 0x8d90
leaq 0x2d99d(%rip), %rax     # 0x3bbc0
cmpb $0x1, 0x110(%rax)
jne 0xe278
pushq $0x60
popq %rdi
callq 0x7510
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %r14, (%rsi)
movq %r13, 0x18(%rsi)
movq %r15, 0x10(%rsi)
movb $0x1, %r15b
movq %rax, %rdi
movq %rbx, %rdx
callq 0x110d0
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
xorl %r15d, %r15d
movq (%rsp), %rdi
callq 0xec52
leaq 0x18(%rsp), %rdi
callq 0x8d90
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe2a0
movq %rax, %r13
leaq 0x18(%rsp), %rdi
callq 0x8d90
testb %r15b, %r15b
je 0xe2c4
pushq $0x60
popq %rsi
jmp 0xe2bc
movq %rax, %r13
jmp 0xe2c4
movq %rax, %r13
leaq 0x18(%rsp), %rdi
callq 0x8d90
testb %r12b, %r12b
je 0xe2c4
movl $0xb0, %esi
movq %rbp, %rdi
callq 0x7520
addq $0x108, %r14            # imm = 0x108
movq (%rsp), %rdi
callq 0x8b72
movq %r14, %rdi
callq 0x8c28
movq 0x8(%rsp), %rdi
callq 0x8b94
movq %rbx, %rdi
callq 0x986e
movq %r13, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/server.cpp
// Function: yrmcds::server::serve_slave()
void server::serve_slave() {
    for( auto it1 = m_handlers.begin(); it1 != m_handlers.end(); ++it1 ) {
        if( ! (*it1)->on_slave_start() ) {
            // failed to start. stop already started handlers.
            for( auto it2 = m_handlers.begin(); it2 != it1; ++it2 )
                (*it2)->on_slave_end();
            return;
        }
    }

    cybozu::logger::info() << "Slave start";

    m_reactor.run([this](cybozu::reactor& r) {
            if( is_master() ) {
                cybozu::logger::info() << "Detected that this node is eligible to be master. Exit slave mode.";
                r.quit();
                return;
            }

            std::time_t now = std::time(nullptr);
            g_current_time.store(now, std::memory_order_relaxed);

            for( auto& handler: m_handlers )
                handler->on_slave_interval();

            r.fix_garbage();
            r.gc();
        });
    for( auto& handler: m_handlers )
        handler->on_slave_end();

    cybozu::logger::info() << "Slave end";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x120(%rdi), %r14
cmpq 0x128(%rbx), %r14
je 0xe50b
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
je 0xe5ba
addq $0x8, %r14
jmp 0xe4eb
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xec96
leaq 0x184d4(%rip), %rsi     # 0x269f3
movq %r14, %rdi
callq 0xed42
leaq 0x8(%rsp), %rdi
callq 0x86e4
leaq 0x8(%rbx), %rdi
leaq 0x18(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rbx, (%rsi)
leaq 0x495(%rip), %rax       # 0xe9de
movq %rax, 0x18(%rsi)
leaq 0x532(%rip), %rax       # 0xea86
movq %rax, 0x10(%rsi)
pushq $0x1
popq %rdx
callq 0x99c6
leaq 0x18(%rsp), %rdi
callq 0x8d90
movq 0x120(%rbx), %r14
movq 0x128(%rbx), %rbx
cmpq %rbx, %r14
je 0xe58c
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
addq $0x8, %r14
jmp 0xe578
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xec96
leaq 0x1845f(%rip), %rsi     # 0x269ff
movq %rbx, %rdi
callq 0xed5a
leaq 0x8(%rsp), %rdi
callq 0x86e4
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0x120(%rbx), %rbx
cmpq %rbx, %r14
je 0xe5b2
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
addq $0x8, %rbx
jmp 0xe5c1
jmp 0xe5e6
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8d90
jmp 0xe5f3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x86e4
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::_malloc(unsigned long)
static char* _malloc(std::size_t len) {
#ifdef USE_TCMALLOC
        char* p = (char*)tc_malloc(len);
#else
        char* p = (char*)std::malloc(len);
#endif
        if( p == nullptr )
            throw std::runtime_error("failed to allocate memory.");
        return p;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x76f0
testq %rax, %rax
je 0xeffa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x17a3a(%rip), %rsi     # 0x26a46
movq %rax, %rdi
callq 0x7190
movq 0x2bfd5(%rip), %rsi     # 0x3aff0
movq 0x2bf4e(%rip), %rdx     # 0x3af70
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/worker.hpp
// Function: cybozu::worker::stop()
void stop() {
        m_exit = true;
        m_running.store(true, std::memory_order_release);
        notify();
        m_thread.join();
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x41(%rdi)
movb $0x1, 0x40(%rdi)
callq 0xf0b6
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7940
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/reactor.hpp
// Function: cybozu::resource::invalidate()
bool invalidate() {
        bool expected = true;
        if( ! m_valid.compare_exchange_strong(expected, false) ) {
            return true;
        }

        // no need to read-lock `m_lock` because this is on the reactor thread.
        on_invalidate(m_fd);
        return false;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7(%rsp), %rsi
movb $0x1, (%rsi)
addq $0x10, %rdi
pushq $0x5
popq %rcx
xorl %edx, %edx
callq 0x9d70
movl %eax, %ebp
testb %al, %al
je 0xf0a8
movl 0x50(%rbx), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
xorb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/worker.hpp
// Function: cybozu::worker::notify()
void notify() {
        std::uint64_t i = 1;
        ssize_t n = ::write(m_event, &i, sizeof(i));
        if( n == -1 )
            throw_unix_error(errno, "write(eventfd)");
    }

// Assembly:
pushq %rax
movq %rsp, %rsi
movq $0x1, (%rsi)
movl 0x44(%rdi), %edi
pushq $0x8
popq %rdx
callq 0x7150
cmpq $-0x1, %rax
je 0xf0d4
popq %rax
retq
callq 0x7030
movl (%rax), %edi
leaq 0x1797f(%rip), %rsi     # 0x26a61
callq 0x8513
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/logger.hpp
// Function: cybozu::logger::reopen()
void reopen() {
        lock_guard g(m_lock);
        if( m_fd == STDERR_FILENO ) return;
        close_nolock();
        open_nolock(m_path);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
movq %rbx, %rdi
callq 0x8b5e
cmpl $0x2, (%r14)
je 0xf35f
movq %r14, %rdi
callq 0x8b3c
leaq 0x8(%r14), %rsi
movq %r14, %rdi
callq 0x9556
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x73e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x73e0
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/thread.hpp
// Function: cybozu::thread_base<cybozu::worker, 1>::run_in_try()
void run_in_try() {
        try {
            static_cast<Derived*>(this)->run();
            m_done.store(true, std::memory_order_release);

        } catch( const std::system_error& e ) {
            demangler t(typeid(e).name());
            logger::error() << "[" << t.name() << "] "
                            << "(" << e.code() << ") "
                            << e.what();
            if( exit_on_exception != 0 )
                ::exit(exit_on_exception);

        } catch( const std::exception& e ) {
            demangler t(typeid(e).name());
            logger::error() << "[" << t.name() << "] "
                            << e.what();
            if( exit_on_exception != 0 )
                ::exit(exit_on_exception);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
callq 0xf9ba
movb $0x1, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0xf8c8
movq %rbx, %rdi
callq 0x71a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
xorl %esi, %esi
cmpb $0x2a, (%rax)
sete %sil
addq %rax, %rsi
leaq 0x18(%rsp), %rdi
callq 0xb294
movq %rsp, %rdi
callq 0x865e
leaq 0x16873(%rip), %rsi     # 0x260cc
movq %rsp, %rdi
callq 0x8682
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x869a
leaq 0x1684a(%rip), %rsi     # 0x260bf
movq %rax, %rdi
callq 0x86b2
leaq 0x18f14(%rip), %rsi     # 0x28798
movq %rax, %rdi
callq 0x8682
leaq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x872e
leaq 0x16833(%rip), %rsi     # 0x260d2
movq %rax, %rdi
callq 0x86b2
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x86ca
jmp 0xf94c
cmpl $0x1, %edx
jne 0xf9aa
movq %rbx, %rdi
callq 0x71a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
xorl %esi, %esi
cmpb $0x2a, (%rax)
sete %sil
addq %rax, %rsi
leaq 0x18(%rsp), %rdi
callq 0xb294
movq %rsp, %rdi
callq 0x865e
leaq 0x167c0(%rip), %rsi     # 0x260cc
movq %rsp, %rdi
callq 0x8682
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x869a
leaq 0x16797(%rip), %rsi     # 0x260bf
movq %rax, %rdi
callq 0x86b2
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x86ca
movq %rsp, %rdi
callq 0x86e4
pushq $0x1
popq %rdi
callq 0x75c0
jmp 0xf97c
jmp 0xf960
movq %rax, %rbx
movq %rsp, %rdi
callq 0x86e4
jmp 0xf970
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x71d0
jmp 0xf98c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x86e4
jmp 0xf996
movq %rax, %rbx
callq 0x78e0
jmp 0xf9aa
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x71d0
jmp 0xf9a5
movq %rax, %rbx
callq 0x78e0
movq %rbx, %rdi
callq 0x7990
movq %rax, %rdi
callq 0x870a
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/worker.hpp
// Function: cybozu::worker::run()
void run() {
        while ( true ) {
            // wait a new job or an exit signal
            m_running.store(false, std::memory_order_release);
            std::uint64_t i;
            ssize_t n = ::read(m_event, &i, sizeof(i));
            if( n == -1 )
                throw_unix_error(errno, "read(eventfd)");
            while( ! m_running.load(std::memory_order_acquire) );

            if( m_exit ) return;

            m_job(m_buffer);
            m_buffer.reset();
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
leaq 0x48(%rdi), %r15
leaq 0x8(%rsp), %r12
pushq $0x8
popq %r13
movb $0x0, 0x40(%rbx)
movl 0x44(%rbx), %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x7790
cmpq $-0x1, %rax
je 0xfa23
movb 0x40(%rbx), %al
testb $0x1, %al
je 0xf9f3
cmpb $0x0, 0x41(%rbx)
jne 0xfa15
movq %r14, %rdi
movq %r15, %rsi
callq 0xfa36
movq %r15, %rdi
callq 0xfa4a
jmp 0xf9db
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x7030
movl (%rax), %edi
leaq 0x1711c(%rip), %rsi     # 0x26b4d
callq 0x8513
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/./cybozu/dynbuf.hpp
// Function: cybozu::dynbuf::reset()
void reset() {
        if( m_used && m_erase )
            clear_memory(m_p, m_used);
        m_used = 0;
        if( m_default_capacity == m_capacity )
            return;
        char* new_p = nullptr;
        if( m_default_capacity != 0 )
            new_p = _malloc(m_default_capacity);
        _free(m_p);
        m_p = new_p;
        m_capacity = m_default_capacity;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xfa6f
cmpb $0x1, 0x18(%rbx)
jne 0xfa6f
leaq 0x2a8d1(%rip), %rax     # 0x3a338
movq (%rax), %rax
movq (%rbx), %rdi
callq *%rax
andq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rdi
cmpq 0x10(%rbx), %rdi
je 0xfaa3
testq %rdi, %rdi
je 0xfa8d
callq 0xefe4
movq %rax, %r14
jmp 0xfa90
xorl %r14d, %r14d
movq (%rbx), %rdi
callq 0x75b0
movq %r14, (%rbx)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/src/memcache/../sync.hpp
// Function: yrmcds::syncer::check()
void check() {
        const std::size_t n = m_workers.size();
        for( std::size_t i = 0; i < n; ++i ) {
            if( ! m_workers[i]->is_running() ) {
                for( auto& req: m_requests )
                    req->set(i);
            }
        }
        for( auto it = m_requests.begin(); it != m_requests.end(); ) {
            if( (*it)->check() ) {
                it = m_requests.erase(it);
            } else {
                ++it;
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
leaq 0x8(%rdi), %r14
xorl %ecx, %ecx
pushq $0x1
popq %rdx
cmpq %rax, %rcx
je 0xfb1d
movq (%rbx), %rsi
movq (%rsi), %rsi
movq (%rsi,%rcx,8), %rsi
movb 0x40(%rsi), %sil
testb $0x1, %sil
je 0xfafd
incq %rcx
jmp 0xfadf
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
movq %rdx, %r8
shlq %cl, %r8
cmpq %rdi, %rsi
je 0xfaf8
movq (%rsi), %r9
orq %r8, 0x20(%r9)
addq $0x8, %rsi
jmp 0xfb0b
movq (%r14), %r15
cmpq 0x10(%rbx), %r15
je 0xfb48
movq (%r15), %rdi
callq 0xfc22
testb %al, %al
je 0xfb42
movq %r14, %rdi
movq %r15, %rsi
callq 0xfc3c
movq %rax, %r15
jmp 0xfb20
addq $0x8, %r15
jmp 0xfb20
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
movq %rsi, %r14
sarq $0x3, %rax
xorl %ecx, %ecx
pushq $0x1
popq %rdx
cmpq %rcx, %rax
je 0xfbd0
movq (%rbx), %rsi
movq (%rsi), %rsi
movq (%rsi,%rcx,8), %rsi
movb 0x40(%rsi), %sil
testb $0x1, %sil
jne 0xfbcb
movq %rdx, %rsi
shlq %cl, %rsi
movq (%r14), %rdi
orq %rsi, 0x20(%rdi)
incq %rcx
jmp 0xfba5
movq (%r14), %rdi
cmpq $0x40, %rax
jae 0xfbea
movq %rdx, %rsi
movl %eax, %ecx
shlq %cl, %rsi
orq %rsi, 0x20(%rdi)
incq %rax
jmp 0xfbd3
callq 0xfc22
testb %al, %al
je 0xfbfb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfde4
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x104ba
testq %rax, %rax
je 0x103ea
addq $0x28, %rax
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7290
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x104e8
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
andq $0x0, 0x28(%rdx)
movups %xmm0, 0x18(%rdx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, (%rdx)
movq (%rsi), %rdi
xorl %esi, %esi
callq 0x7640
cmpl $-0x9, %eax
je 0x108ab
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x108ab
testl %ebp, %ebp
jne 0x1096b
pushq $0x1
jmp 0x108cc
leaq 0x30(%rsp), %rdx
movl $0xa, 0x4(%rdx)
movq (%r14), %rdi
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x7640
testl %eax, %eax
jne 0x108f9
pushq $0x2
popq %rax
movl %eax, (%rbx)
addq $0x4, %rbx
movq 0x8(%rsp), %r14
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq %rbx, %rdi
callq 0x7420
movq %r14, %rdi
callq 0x7680
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
cmpl $-0x9, %eax
je 0x10905
cmpl $-0x2, %ebp
jne 0x1094c
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x1632c(%rip), %rsi     # 0x26c43
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x9655
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c84
xorl %ebp, %ebp
leaq 0x29b93(%rip), %rsi     # 0x3a4d0
movq 0x2a63c(%rip), %rdx     # 0x3af80
movq %rbx, %rdi
callq 0x7950
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
movl %ebp, %edi
callq 0x7750
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
jmp 0x10988
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
movl %ebp, %edi
callq 0x7750
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x2a661(%rip), %rsi     # 0x3aff0
movq 0x2a5da(%rip), %rdx     # 0x3af70
movq %rbx, %rdi
callq 0x7950
jmp 0x109b6
jmp 0x109b6
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x71d0
testb %bpl, %bpl
jne 0x109b9
jmp 0x109c1
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/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 %r14
pushq %rbx
subq $0x30, %rsp
andl $0x0, (%rdi)
movzwl (%rsi), %eax
cmpl $0xa, %eax
je 0x109f9
cmpl $0x2, %eax
jne 0x10a17
movl $0x1, (%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x4(%rdi)
jmp 0x10a0e
movl $0x2, (%rdi)
movups (%rsi), %xmm0
movups 0xc(%rsi), %xmm1
movups %xmm0, 0x4(%rdi)
movups %xmm1, 0x10(%rdi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x1622c(%rip), %rsi     # 0x26c55
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x84d8
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c84
xorl %ebp, %ebp
leaq 0x29a7f(%rip), %rsi     # 0x3a4d0
movq 0x2a528(%rip), %rdx     # 0x3af80
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x71d0
testb %bpl, %bpl
jne 0x10a77
jmp 0x10a7f
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/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 0x10ac5
testl %eax, %eax
je 0x10a9f
cmpl $0x1, %eax
jne 0x10aa2
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jmp 0x10ac1
movb $0x1, %al
retq
movl 0x1c(%rdi), %eax
cmpl 0x1c(%rsi), %eax
jne 0x10ac5
movdqu 0xc(%rsi), %xmm0
movdqu 0xc(%rdi), %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_O2/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 0x10b1a
addq $0x4, %rsi
cmpl $0x1, %eax
pushq $0x10
popq %rcx
pushq $0x1c
popq %rax
cmovel %ecx, %eax
movl $0x1, (%rsp)
leaq 0x10(%rsp), %rdx
pushq $0x65
popq %rcx
movq %rsi, %rdi
movl %eax, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7320
testl %eax, %eax
jne 0x10b3d
leaq 0x10(%rsp), %rsi
jmp 0x10b21
leaq 0x1835f(%rip), %rsi     # 0x28e80
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x84d8
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
movl %ebp, %edi
callq 0x7750
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x2a48d(%rip), %rsi     # 0x3aff0
movq 0x2a406(%rip), %rdx     # 0x3af70
movq %rbx, %rdi
callq 0x7950
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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 0x73a0
testl %eax, %eax
jne 0x10c70
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x109d2
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
retq
callq 0x7030
movl (%rax), %edi
leaq 0x15fee(%rip), %rsi     # 0x26c6c
callq 0x8513
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
callq 0x7610
shlq $0x2, %r14
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x10cf7
movl (%r15,%r13), %esi
movq %r12, %rdi
callq 0x7830
addq $0x4, %r13
jmp 0x10ce0
leaq 0xa0(%rsp), %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x70f0
testl %eax, %eax
jne 0x10dc3
leaq 0x10(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x72a0
movq $0x1, -0x8(%r14)
pushq $0xd
popq %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x7630
cmpl $-0x1, %eax
je 0x10db0
leaq 0x10(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x72a0
leaq 0x8c(%rip), %rax        # 0x10de7
movq %rax, -0x8(%r14)
movl $0x80000000, 0x80(%r14) # imm = 0x80000000
pushq $0x6
popq %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x7630
cmpl $-0x1, %eax
je 0x10db0
pushq $0x78
popq %rdi
callq 0x7510
movq %rax, %r14
leaq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x10e04
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x7030
movl (%rax), %edi
leaq 0x15ef8(%rip), %rsi     # 0x26cb6
callq 0x8513
leaq 0x15edc(%rip), %rsi     # 0x26ca6
movl %eax, %edi
callq 0x8513
movq %rax, %rbx
pushq $0x78
popq %rsi
movq %r14, %rdi
callq 0x7520
movq %rbx, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $-0x1
popq %rdi
movl $0x80800, %edx          # imm = 0x80800
callq 0x72d0
andq $0x0, 0x8(%rbx)
movw $0x1, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
andq $0x0, 0x48(%rbx)
movl $0x2, 0x48(%rbx)
movl %eax, 0x50(%rbx)
leaq 0x29698(%rip), %rax     # 0x3a520
movq %rax, (%rbx)
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xef66
leaq 0xf(%rsp), %rsi
movq %rbx, %rdi
callq 0x10ed2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x8d90
jmp 0x10ec1
movq %rax, %r15
movq %rbx, %rdi
callq 0x11048
movq %r15, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/cybozu[P]yrmcds/cybozu/reactor.hpp
// Function: bool cybozu::resource::with_fd<cybozu::signal_reader::signal_reader(__sigset_t const*, std::function<void (signalfd_siginfo const&, cybozu::reactor&)>)::'lambda'(int)>(cybozu::signal_reader::signal_reader(__sigset_t const*, std::function<void (signalfd_siginfo const&, cybozu::reactor&)>)::'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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rdi
movq %rdi, (%rsp)
movb $0x1, 0x8(%rsp)
callq 0x1109a
movb 0x10(%rbx), %al
testb $0x1, %al
je 0x10f13
movl 0x50(%rbx), %esi
movq %r14, %rdi
callq 0x1106e
movb $0x1, %bpl
testb %al, %al
jne 0x10f15
movq %rbx, %rdi
callq 0x96cc
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x1108a
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1108a
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7790
cmpq $0x80, %rax
je 0x10fbb
cmpq $-0x1, %rax
jne 0x10fe9
callq 0x7030
movl (%rax), %edi
cmpl $0x4, %edi
je 0x10f90
jmp 0x10fd3
cmpq $0x0, 0x68(%r14)
je 0x10f90
movq 0x8(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x110ba
jmp 0x10f90
cmpl $0xb, %edi
jne 0x11019
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x7240
movq %rax, %rbx
leaq 0x15cce(%rip), %rsi     # 0x26cc9
movq %rax, %rdi
callq 0x7190
movq 0x29fe6(%rip), %rsi     # 0x3aff0
movq 0x29f5f(%rip), %rdx     # 0x3af70
movq %rbx, %rdi
callq 0x7950
leaq 0x15b5b(%rip), %rsi     # 0x26b7b
callq 0x8513
movq %rax, %r14
movq %rbx, %rdi
callq 0x7390
movq %r14, %rdi
callq 0x7990
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2ad46(%rip), %rax     # 0x3be80
movq (%rax), %r14
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x1115b
movb (%rax), %al
testb $0x1, %al
je 0x1117c
leaq 0x58(%rbx), %rdi
movq %r14, 0x50(%rbx)
xorl %esi, %esi
callq 0x11a46
leaq 0x2aa5e(%rip), %rax     # 0x3bbc0
movl 0x11c(%rax), %ecx
movq %r14, %rax
cqto
idivq %rcx
subq %rdx, %r14
cmpq %r14, 0x50(%rbx)
setl %al
jmp 0x1117e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %rdi, %rbx
leaq 0x2a742(%rip), %rax     # 0x3bbc0
movl 0x114(%rax), %eax
testq %rax, %rax
je 0x1149c
leaq 0x2a870(%rip), %rcx     # 0x3bd00
movq 0x80(%rcx), %rcx
cmpq %rax, %rcx
jae 0x114c3
pushq $0x40
popq %rsi
movl $0x1c0, %edi            # imm = 0x1C0
callq 0x7550
movq %rax, %r15
leaq 0x8(%r14), %rdx
addq $0x30, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rcx
callq 0x11eb0
jmp 0x114c6
xorl %r15d, %r15d
movq %r15, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r15, %rdi
callq 0x76a0
movq %rbx, %rdi
callq 0x7990
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
andq $0x0, (%rsp)
xorl %eax, %eax
leaq 0x2a755(%rip), %r14     # 0x3bd00
xorl %ecx, %ecx
cmpq $0x98, %rax
je 0x115ca
movq 0xc0(%r14,%rax), %rdx
addq %rdx, %rcx
movq %rcx, (%rsp)
addq $0x8, %rax
jmp 0x115ad
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xec96
leaq 0x15747(%rip), %rsi     # 0x26d25
movq %rbx, %rdi
callq 0xed5a
movl (%r14), %ecx
leaq 0xc(%rsp), %rsi
movl %ecx, (%rsi)
movq %rax, %rdi
callq 0xf382
leaq 0x15730(%rip), %rsi     # 0x26d2f
movq %rax, %rdi
callq 0x11924
movq 0x80(%r14), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0xf538
leaq 0x15715(%rip), %rsi     # 0x26d3a
movq %rax, %rdi
callq 0x11924
movq %rsp, %rsi
movq %rax, %rdi
callq 0xf538
leaq 0x15706(%rip), %rsi     # 0x26d45
movq %rax, %rdi
callq 0xed42
leaq 0x10(%rsp), %rdi
callq 0x86e4
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x1165d
jmp 0x1165d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x86e4
movq %rbx, %rdi
callq 0x7990