LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/logger.cpp
// Function: cybozu::logger::log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void logger::log(const std::string& msg) {
    lock_guard g(m_lock);
    std::size_t to_write = msg.size();
    const char* ptr = msg.data();
    while( to_write != 0 ) {
        ssize_t n = ::write(m_fd, ptr, to_write);
        if( n == -1 ) {
            if( errno == EAGAIN || errno == EINTR ) continue;
            throw_unix_error(errno, "<logger::log> write");
        }
        ptr += n;
        to_write -= n;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
movq %rbx, %rdi
callq 0x77e0
testl %eax, %eax
jne 0x9f25
movq 0x8(%r12), %r15
testq %r15, %r15
je 0x9f06
movq (%r12), %r12
movl (%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7150
cmpq $-0x1, %rax
je 0x9ef0
addq %rax, %r12
subq %rax, %r15
jmp 0x9f01
callq 0x7040
movl (%rax), %edi
cmpl $0x4, %edi
je 0x9f01
cmpl $0xb, %edi
jne 0x9f19
testq %r15, %r15
jne 0x9ed4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x73c0
leaq 0x2a35c(%rip), %rsi     # 0x3427c
callq 0x8dd3
movl %eax, %edi
callq 0x7320
jmp 0x9f2e
movq %rax, %r14
movq %rbx, %rdi
callq 0x73c0
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/logger.cpp
// Function: cybozu::logger::open_nolock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void logger::open_nolock(const std::string& path) {
    if( m_fd != -1 && m_fd != STDERR_FILENO )
        throw std::logic_error("<logger::open> double open.");
    m_fd = ::open(path.c_str(), O_WRONLY|O_APPEND|O_CREAT, 0644);
    if( m_fd == -1 ) {
        m_fd = STDERR_FILENO;
        throw_unix_error(errno, ("open(" + path + ")").c_str());
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $-0x1, %eax
je 0x9f5d
cmpl $0x2, %eax
jne 0x9fd6
movq (%r14), %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x7390
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x9f82
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x2, (%rbx)
callq 0x7040
movl (%rax), %ebx
leaq 0x2a2e0(%rip), %rsi     # 0x34276
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xa085
leaq 0x2adfe(%rip), %rsi     # 0x34dab
movq %r15, %rdi
callq 0x7a80
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xa008
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0xa014
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x2a270(%rip), %rsi     # 0x3425a
movq %rax, %rdi
callq 0x77a0
movq 0x3bfbf(%rip), %rsi     # 0x45fb8
movq 0x3bf90(%rip), %rdx     # 0x45f90
movq %r14, %rdi
callq 0x7970
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movl %ebx, %edi
callq 0x8dd3
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
jmp 0xa07d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xa062
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0xa062
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa07d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/reactor.cpp
// Function: cybozu::resource::invalidate_and_close_()
void resource::invalidate_and_close_() {
    bool expected = true;
    if( ! m_valid.compare_exchange_strong(expected, false) )
        return;

    // no need to read-lock `m_lock` here because `m_fd` will not be
    // closed before this function calls `reactor::request_removal`.
    on_invalidate(m_fd);
    m_reactor->request_removal(*this);
}

// Assembly:
xorl %ecx, %ecx
movb $0x1, %al
lock
cmpxchgb %cl, 0x10(%rdi)
jne 0xa135
pushq %rbx
movq %rdi, %rbx
movl 0x50(%rdi), %esi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rbx), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0xa8ec
retq
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/reactor.cpp
// Function: cybozu::reactor::reactor()
reactor::reactor():
    m_fd( epoll_create1(EPOLL_CLOEXEC) ), m_running(true)
{
    if( m_fd == -1 )
        throw_unix_error(errno, "epoll_create1");
    m_resources.max_load_factor(1.0);
    m_resources.reserve(100000);
    m_readables.reserve(256);
    m_readables_copy.reserve(256);
    m_drop_req.reserve(256);
    m_drop_req_copy.reserve(256);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x80000, %edi          # imm = 0x80000
callq 0x76b0
movl %eax, (%rbx)
movb $0x1, 0x4(%rbx)
leaq 0x8(%rbx), %r14
leaq 0x38(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl $0x3f800000, 0x28(%rbx) # imm = 0x3F800000
leaq 0x40(%rbx), %r15
leaq 0x58(%rbx), %r12
leaq 0x78(%rbx), %r13
leaq 0x90(%rbx), %rbp
leaq 0xa8(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0xc0(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movb $0x0, 0x70(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
cmpl $-0x1, %eax
je 0xa243
movl $0x3f800000, 0x28(%rbx) # imm = 0x3F800000
movq $0x0, 0x30(%rbx)
movl $0x186a0, %esi          # imm = 0x186A0
movq %r14, %rdi
callq 0xace8
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0xa946
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
callq 0xa946
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
callq 0xa946
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
callq 0xa946
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7040
movl (%rax), %edi
leaq 0x2a067(%rip), %rsi     # 0x342b8
callq 0x8dd3
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
callq 0xa9dc
movq 0x10(%rsp), %rdi
callq 0xa9dc
movq (%rbp), %rdi
testq %rdi, %rdi
je 0xa286
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x7510
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x7bd5
movq %r14, %rdi
callq 0xac02
movq (%rsp), %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/reactor.cpp
// Function: cybozu::reactor::modify_events(cybozu::resource const&, int)
void reactor::modify_events(const resource& res, int events) {
    const int fd = res.m_fd;
    struct epoll_event ev;
    ev.events = events | EPOLLET;
    ev.data.fd = fd;
    if( epoll_ctl(m_fd, EPOLL_CTL_MOD, fd, &ev) == -1 )
        throw_unix_error(errno, "epoll_ctl");
}

// Assembly:
subq $0x18, %rsp
movl 0x50(%rsi), %eax
orl $0x80000000, %edx       # imm = 0x80000000
leaq 0xc(%rsp), %rcx
movl %edx, (%rcx)
movl %eax, 0x4(%rcx)
movl (%rdi), %edi
movl $0x3, %esi
movl %eax, %edx
callq 0x7720
cmpl $-0x1, %eax
je 0xa429
addq $0x18, %rsp
retq
callq 0x7040
movl (%rax), %edi
leaq 0x29eb6(%rip), %rsi     # 0x342ed
callq 0x8dd3
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/cybozu/reactor.cpp
// Function: cybozu::reactor::run(std::function<void (cybozu::reactor&)>, int)
void reactor::run(std::function<void(reactor& r)> callback, int interval) {
    namespace crn = std::chrono;
    const int milli_interval = interval * 1000;
    auto last = crn::steady_clock::now();

    m_running = true;
    while( m_running ) {
        poll();
        auto now = crn::steady_clock::now();
        auto diff = crn::duration_cast<crn::milliseconds>(now - last).count();
        if( diff > milli_interval ) {
            callback(*this);
            last = now;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x76d0
movq %rax, %r15
movb $0x1, 0x4(%r14)
imull $0x3e8, %ebp, %eax      # imm = 0x3E8
movslq %eax, %r13
movabsq $0x431bde82d7b634db, %rbp # imm = 0x431BDE82D7B634DB
movq %r14, %rdi
callq 0xa4c6
callq 0x76d0
movq %rax, %r12
subq %r15, %rax
imulq %rbp
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
cmpq %r13, %rdx
jle 0xa4ab
cmpq $0x0, 0x10(%rbx)
je 0xa4c1
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rbx)
movq %r12, %r15
cmpb $0x0, 0x4(%r14)
jne 0xa46f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7170
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, 0x4(%rsp)
movslq %esi, %rax
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %r8
xorl %r10d, %r10d
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0xa783
movq (%rax), %r9
movq %rax, %r10
cmpl %esi, 0x8(%r9)
je 0xa783
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0xa780
movslq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0xa783
movq %r11, %r10
cmpl %esi, %edi
jne 0xa755
jmp 0xa783
xorl %r10d, %r10d
testq %r10, %r10
je 0xa78d
movq (%r10), %r15
jmp 0xa790
xorl %r15d, %r15d
testq %r15, %r15
je 0xa880
leaq 0x8(%rbx), %r12
leaq 0x10(%r15), %rsi
movq 0x10(%r15), %r14
leaq 0xa8(%rbx), %rdi
callq 0xaa2a
movq %r12, %rdi
movq %r15, %rsi
callq 0xb22e
movl (%rbx), %edi
movl 0x4(%rsp), %edx
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x7720
cmpl $-0x1, %eax
je 0xa8b7
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
leaq 0x4(%rsp), %rdx
callq 0xb307
movq 0x48(%rbx), %rcx
cmpq %rcx, %rax
je 0xa808
movq 0x48(%rbx), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0xa808
movq %rax, 0x48(%rbx)
movq %r14, %rdi
callq 0xaa62
testb %al, %al
jne 0xa874
leaq 0x3c27d(%rip), %rax     # 0x46a98
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x3, %eax
setge %sil
leaq 0x29a1a(%rip), %rdx     # 0x34247
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x9718
cmpb $0x1, (%rbx)
jne 0xa855
movq 0x10(%rsp), %rdi
leaq 0x29adc(%rip), %rsi     # 0x34327
movl $0x2b, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0xa86a
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x7990
leaq 0x8(%rsp), %rdi
callq 0x8f94
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xbb8e
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x29a5e(%rip), %rsi     # 0x342f7
movq %rax, %rdi
callq 0x77a0
movq 0x3b710(%rip), %rsi     # 0x45fb8
movq 0x3b6e1(%rip), %rdx     # 0x45f90
movq %rbx, %rdi
callq 0x7970
callq 0x7040
movl (%rax), %edi
leaq 0x29a49(%rip), %rsi     # 0x3430e
callq 0x8dd3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8f94
jmp 0xa8e4
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
addq $0x18, %rdi
movq %rdi, 0x8(%rsp)
callq 0x7a10
movl %eax, %ebp
cmpl $0x10, %eax
setne 0x10(%rsp)
je 0xaa97
cmpb $0x0, 0x11(%rbx)
jne 0xaa97
movl 0x50(%rbx), %edi
callq 0x7a90
movb $0x1, 0x11(%rbx)
cmpl $0x10, %ebp
setne %bl
leaq 0x8(%rsp), %rdi
callq 0xacaa
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xacaa
movq %rbx, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7430
cmpl $0x0, 0xc(%rsp)
movq 0x8(%rbx), %r12
je 0xbb3b
movq %r14, %rdi
callq 0x71b0
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7860
jmp 0xbb61
movq %rax, %r15
movq %rax, %rdi
callq 0x71b0
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x7860
movq %r15, %rdi
callq 0x75b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xbb86
movq (%r13), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x74a0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x75a0
movq %rax, %rdi
callq 0x71b0
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x7150
leaq 0x30(%rsp), %rdi
movl $0x64, %esi
callq 0x77f0
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movl $0x2, %edx
callq 0x7890
addq $0x350, %rsp            # imm = 0x350
popq %rbx
retq
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
addq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
je 0xbc8a
movl %edx, %ebp
movq %rsp, %r14
leaq 0x8(%rsp), %r15
movq (%rsp), %rdx
cmpb %bpl, (%rax)
jne 0xbc65
cmpq %rcx, %rdx
je 0xbc73
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbcd8
movq 0x10(%rsp), %rax
jmp 0xbc6f
cmpq %rcx, %rdx
jne 0xbc73
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0xbc42
cmpq %rcx, (%rsp)
je 0xbca0
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0xbcd8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbcb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x9080
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movzbl -0x1(%rax,%rcx), %ecx
movl $0x1, %r13d
movb $0x1, %al
addl $-0x47, %ecx
cmpl $0x26, %ecx
ja 0xde72
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0xde6a
movabsq $0x1000000010, %rdx     # imm = 0x1000000010
btq %rcx, %rdx
jb 0xde62
movabsq $0x4000000040, %rdx     # imm = 0x4000000040
btq %rcx, %rdx
jae 0xde72
movl $0x100000, %r13d        # imm = 0x100000
jmp 0xde70
movl $0x400, %r13d           # imm = 0x400
jmp 0xde70
movl $0x40000000, %r13d      # imm = 0x40000000
xorl %eax, %eax
testb %al, %al
jne 0xde7e
movq %r14, %rdi
callq 0x75d0
movq (%r14), %r15
callq 0x7040
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x7770
cmpq %r15, (%r12)
je 0xdedf
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xdeeb
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0xdeeb
testl %ecx, %ecx
jne 0xdec3
movl %ebp, (%r14)
testl %eax, %eax
jle 0xdef7
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
imulq %r13, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x266b0(%rip), %rdi     # 0x34596
callq 0x72f0
leaq 0x266a4(%rip), %rdi     # 0x34596
callq 0x77b0
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x265fd(%rip), %rsi     # 0x34511
leaq 0x26602(%rip), %rdx     # 0x3451d
leaq 0x8(%rsp), %rdi
callq 0x97a0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0xe3b5
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x7620
leaq 0x3749a(%rip), %rax     # 0x453e8
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x373e6(%rip), %rsi     # 0x45340
movq 0x38027(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdf8f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0xdf8f
movq %rax, %rbx
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xdfae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0xdfae
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0xdfc9
movq %r14, %rdi
callq 0x7370
jmp 0xdfc9
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0xdfc9
movl %ebp, (%r14)
movq %rbx, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe19e
movq %rax, %r14
leaq 0x2658a(%rip), %rsi     # 0x34578
movq %rax, %rdi
callq 0x70f0
movl %eax, %ebp
testl %eax, %eax
je 0xe00f
leaq 0x2657a(%rip), %rsi     # 0x3457d
movq %r14, %rdi
callq 0x70f0
testl %eax, %eax
jne 0xe019
testl %ebp, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe8a6
leaq 0x37320(%rip), %rsi     # 0x45358
movq 0x37f49(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
movq %rbx, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
callq 0xe19e
movq (%rax), %r14
callq 0x7040
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x7770
cmpq %r14, (%r12)
je 0xe0c0
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xe0cc
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0xe0cc
testl %ecx, %ecx
jne 0xe0b3
movl %ebp, (%r15)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x264cf(%rip), %rdi     # 0x34596
callq 0x72f0
leaq 0x264c3(%rip), %rdi     # 0x34596
callq 0x77b0
movq %rax, %r14
jmp 0xe0e9
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0xe0e9
movl %ebp, (%r15)
cmpl $0x2, %edx
jne 0xe126
movq %r14, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe8a6
leaq 0x37243(%rip), %rsi     # 0x45358
movq 0x37e6c(%rip), %rdx     # 0x45f88
movq %r15, %rdi
callq 0x7970
jmp 0xe161
cmpl $0x1, %edx
jne 0xe18d
movq %r14, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe8a6
leaq 0x37206(%rip), %rsi     # 0x45358
movq 0x37e2f(%rip), %rdx     # 0x45f88
movq %r15, %rdi
callq 0x7970
movq %rax, %r14
jmp 0xe171
movq %rax, %r14
movq %r15, %rdi
callq 0x7370
callq 0x78f0
jmp 0xe18d
movq %rax, %r14
jmp 0xe188
movq %rax, %r14
movq %r15, %rdi
callq 0x7370
callq 0x78f0
movq %r14, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe78e
testq %rax, %rax
je 0xe1bb
addq $0x28, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe93e
leaq 0x371be(%rip), %rsi     # 0x45398
movq 0x37da7(%rip), %rdx     # 0x45f88
movq %r14, %rdi
callq 0x7970
movq %rax, %rbx
movq %r14, %rdi
callq 0x7370
movq %rbx, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
callq 0xe19e
movq (%rax), %r14
callq 0x7040
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x76f0
cmpq %r14, (%r12)
je 0xe2e4
movl (%r15), %ecx
testl %ecx, %ecx
je 0xe2d4
cmpl $0x22, %ecx
jne 0xe2d7
leaq 0x262e1(%rip), %rdi     # 0x345b0
callq 0x77b0
movl %ebp, (%r15)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x262c5(%rip), %rdi     # 0x345b0
callq 0x72f0
movq %rax, %r14
jmp 0xe301
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0xe301
movl %ebp, (%r15)
cmpl $0x2, %edx
jne 0xe33e
movq %r14, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe8a6
leaq 0x3702b(%rip), %rsi     # 0x45358
movq 0x37c54(%rip), %rdx     # 0x45f88
movq %r15, %rdi
callq 0x7970
jmp 0xe379
cmpl $0x1, %edx
jne 0xe3a5
movq %r14, %rdi
callq 0x71a0
movl $0x10, %edi
callq 0x7220
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe8a6
leaq 0x36fee(%rip), %rsi     # 0x45358
movq 0x37c17(%rip), %rdx     # 0x45f88
movq %r15, %rdi
callq 0x7970
movq %rax, %r14
jmp 0xe389
movq %rax, %r14
movq %r15, %rdi
callq 0x7370
callq 0x78f0
jmp 0xe3a5
movq %rax, %r14
jmp 0xe3a0
movq %rax, %r14
movq %r15, %rdi
callq 0x7370
callq 0x78f0
movq %r14, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movq %rdi, %r14
movb $0x0, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xa136
leaq 0xe0(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xec(%r14)
movups %xmm0, 0xe0(%r14)
movq %rax, 0x38(%rsp)
movq %rax, 0x100(%r14)
leaq 0x120(%r14), %rax
movq %rax, 0x8(%rsp)
movups %xmm0, 0x108(%r14)
movups %xmm0, 0x118(%r14)
movups %xmm0, 0x128(%r14)
movl $0xb0, %edi
callq 0x7500
movq %rax, %rbp
leaq 0x100(%r14), %rcx
leaq 0x10(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
leaq 0x983(%rip), %r13       # 0xfc96
movq %r13, 0x18(%rsi)
leaq 0x9d4(%rip), %r15       # 0xfcf2
movq %r15, 0x10(%rsi)
movb $0x1, %r12b
movq %rax, %rdi
movq %rbx, %rdx
callq 0x15ab4
leaq 0x40(%rsp), %rsi
movq %rbp, (%rsi)
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
callq 0x101ac
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xf35e
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x3785b(%rip), %rax     # 0x46bc0
cmpb $0x1, 0x110(%rax)
jne 0xf3d1
movl $0x60, %edi
callq 0x7500
movq %rax, %rbp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
movq %r13, 0x18(%rsi)
movq %r15, 0x10(%rsi)
movb $0x1, %r15b
movq %rax, %rdi
movq %rbx, %rdx
callq 0x128ac
leaq 0x40(%rsp), %rsi
movq %rbp, (%rsi)
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
callq 0x101dc
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xf3d1
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf47c
jmp 0xf416
jmp 0xf47c
movq %rax, %r13
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xf408
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
testb %r15b, %r15b
je 0xf449
movl $0x60, %esi
jmp 0xf441
jmp 0xf47c
movq %rax, %r13
jmp 0xf449
movq %rax, %r13
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xf437
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
testb %r12b, %r12b
je 0xf449
movl $0xb0, %esi
movq %rbp, %rdi
callq 0x7510
addq $0x108, %r14            # imm = 0x108
movq 0x8(%rsp), %rdi
callq 0x954c
movq %r14, %rdi
callq 0x95ca
movq 0x38(%rsp), %rdi
callq 0x959a
movq %rbx, %rdi
callq 0xa2a8
movq %r13, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x8fc6
// File: /workspace/github_cpp_makefile_star2_O1/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 0x76e0
testq %rax, %rax
je 0x104b6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x2455c(%rip), %rsi     # 0x34a26
movq %rax, %rdi
callq 0x7190
movq 0x35b17(%rip), %rsi     # 0x45ff0
movq 0x35a90(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/./cybozu/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
movl $0x8, %edx
callq 0x7150
cmpq $-0x1, %rax
je 0x1051c
popq %rax
retq
callq 0x7040
movl (%rax), %edi
leaq 0x24517(%rip), %rsi     # 0x34a41
callq 0x8dd3
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x77e0
testl %eax, %eax
jne 0x107b8
cmpl $0x2, (%r14)
je 0x107a9
movq %r14, %rdi
callq 0x9528
leaq 0x8(%r14), %rsi
movq %r14, %rdi
callq 0x9f42
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x73c0
movl %eax, %edi
callq 0x7320
movq %rax, %r14
movq %rbx, %rdi
callq 0x73c0
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
leaq 0x48(%rdi), %r15
leaq 0x8(%rsp), %r12
movb $0x0, 0x40(%rbx)
movl 0x44(%rbx), %edi
movl $0x8, %edx
movq %r12, %rsi
callq 0x7790
cmpq $-0x1, %rax
je 0x10ef4
movb 0x40(%rbx), %al
testb $0x1, %al
je 0x10eb4
movb 0x41(%rbx), %bpl
testb %bpl, %bpl
jne 0x10ee7
cmpq $0x0, 0x80(%rbx)
je 0x10f07
movq %r14, %rdi
movq %r15, %rsi
callq *0x88(%rbx)
movq %r15, %rdi
callq 0x10f0c
testb %bpl, %bpl
je 0x10e9a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x7040
movl (%rax), %edi
leaq 0x23c2b(%rip), %rsi     # 0x34b2d
callq 0x8dd3
callq 0x7170
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10f31
cmpb $0x1, 0x18(%rbx)
jne 0x10f31
leaq 0x3440f(%rip), %rax     # 0x45338
movq (%rax), %rax
movq (%rbx), %rdi
callq *%rax
movq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rdi
cmpq 0x10(%rbx), %rdi
je 0x10f68
testq %rdi, %rdi
je 0x10f52
callq 0x104a0
movq %rax, %r14
jmp 0x10f55
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_O1/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
je 0x10fd4
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq (%rdx), %rdx
movq (%rdx,%rcx,8), %rdx
movb 0x40(%rdx), %dl
testb $0x1, %dl
jne 0x10fcc
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
cmpq %rsi, %rdx
je 0x10fcc
movl $0x1, %edi
shlq %cl, %rdi
movq (%rdx), %r8
orq %rdi, 0x20(%r8)
addq $0x8, %rdx
cmpq %rsi, %rdx
jne 0x10fbc
incq %rcx
cmpq %rax, %rcx
jne 0x10f95
movq 0x8(%rbx), %r14
cmpq 0x10(%rbx), %r14
je 0x1101b
leaq 0x8(%rbx), %r15
movq (%r14), %rdi
movq 0x20(%rdi), %r12
cmpq $-0x1, %r12
jne 0x10fff
cmpq $0x0, 0x10(%rdi)
je 0x11027
callq *0x18(%rdi)
cmpq $-0x1, %r12
je 0x1100b
addq $0x8, %r14
cmpq 0x10(%rbx), %r14
jne 0x10fe2
jmp 0x1101b
movq %r15, %rdi
movq %r14, %rsi
callq 0x110e2
movq %rax, %r14
jmp 0x11003
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x7170
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rax), %rcx
movq (%rax), %rdx
movq %rcx, %rax
subq %rdx, %rax
sarq $0x3, %rax
cmpq %rdx, %rcx
je 0x11088
cmpq $0x1, %rax
movq %rax, %rdx
adcq $0x0, %rdx
xorl %ecx, %ecx
movq (%r14), %rsi
movq (%rsi), %rsi
movq (%rsi,%rcx,8), %rsi
movb 0x40(%rsi), %sil
testb $0x1, %sil
jne 0x11080
movl $0x1, %esi
shlq %cl, %rsi
movq (%rbx), %rdi
orq %rsi, 0x20(%rdi)
incq %rcx
cmpq %rcx, %rdx
jne 0x1105d
cmpq $0x3f, %rax
ja 0x110a6
movq (%rbx), %rcx
movq 0x20(%rcx), %rdx
btsq %rax, %rdx
incq %rax
cmpq $0x40, %rax
jne 0x11095
movq %rdx, 0x20(%rcx)
movq (%rbx), %rdi
movq 0x20(%rdi), %r15
cmpq $-0x1, %r15
jne 0x110c3
cmpq $0x0, 0x10(%rdi)
je 0x110dd
callq *0x18(%rdi)
cmpq $-0x1, %r15
je 0x110d7
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x11266
popq %rbx
popq %r14
popq %r15
retq
callq 0x7170
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11baa
testq %rax, %rax
je 0x11b7e
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 0x11be4
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, (%rdx)
movq (%rsi), %rdi
xorl %esi, %esi
callq 0x7640
cmpl $-0x9, %eax
je 0x11fed
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x11fed
movl $0x1, %eax
testl %ebp, %ebp
je 0x12013
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movl %ebp, %edi
callq 0x7740
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
jmp 0x120bb
leaq 0x30(%rsp), %rdx
movl $0xa, 0x4(%rdx)
movq (%r14), %rdi
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x7640
movl %eax, %ebp
movl $0x2, %eax
testl %ebp, %ebp
jne 0x1203f
movl %eax, (%rbx)
addq $0x4, %rbx
movq 0x8(%rsp), %r14
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movq %rbx, %rdi
callq 0x7410
movq %r14, %rdi
callq 0x7670
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $-0x9, %ebp
je 0x12049
cmpl $-0x2, %ebp
jne 0x1209c
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
leaq 0x22c11(%rip), %rsi     # 0x34c6e
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0xa085
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7620
leaq 0x33477(%rip), %rax     # 0x454f8
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x33443(%rip), %rsi     # 0x454d0
movq 0x33ef4(%rip), %rdx     # 0x45f88
movq %rbx, %rdi
callq 0x7970
movl $0x10, %edi
callq 0x7220
movq %rax, %rbx
movl %ebp, %edi
callq 0x7740
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x33f2e(%rip), %rsi     # 0x45ff0
movq 0x33ea7(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7970
jmp 0x120d3
movq %rax, %r14
jmp 0x12103
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x120fe
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0x120fe
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1210b
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1214c
cmpl $0x2, %eax
jne 0x1216c
movl $0x1, (%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x4(%rdi)
jmp 0x12161
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 0x22af7(%rip), %rsi     # 0x34c80
leaq 0x22b06(%rip), %rdx     # 0x34c96
leaq 0x8(%rsp), %rdi
callq 0x97a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7620
leaq 0x33347(%rip), %rax     # 0x454f8
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x33313(%rip), %rsi     # 0x454d0
movq 0x33dc4(%rip), %rdx     # 0x45f88
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x121ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7510
jmp 0x121ee
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x121fb
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12241
testl %eax, %eax
je 0x1221b
cmpl $0x1, %eax
jne 0x1221e
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jmp 0x1223d
movb $0x1, %al
retq
movl 0x1c(%rdi), %eax
cmpl 0x1c(%rsi), %eax
jne 0x12241
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_O1/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 0x122b9
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 0x122e1
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 0x122cd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x24bea(%rip), %rdx     # 0x36eb1
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x97a0
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 0x7740
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x33ce7(%rip), %rsi     # 0x45ff0
movq 0x33c60(%rip), %rdx     # 0x45f70
movq %rbx, %rdi
callq 0x7970
movq %rax, %r14
movq %rbx, %rdi
callq 0x7370
movq %r14, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12420
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x12120
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
retq
callq 0x7040
movl (%rax), %edi
leaq 0x22869(%rip), %rsi     # 0x34c97
callq 0x8dd3
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7610
testq %r14, %r14
je 0x12491
shlq $0x2, %r14
xorl %r13d, %r13d
movq %rsp, %r12
movl (%r15,%r13), %esi
movq %r12, %rdi
callq 0x7840
addq $0x4, %r13
cmpq %r13, %r14
jne 0x1247c
movq %rsp, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x70d0
testl %eax, %eax
jne 0x12559
leaq 0x88(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7290
movq $0x1, (%r14)
movl $0xd, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7630
cmpl $-0x1, %eax
je 0x12546
leaq 0x88(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7290
leaq 0x8a(%rip), %rax        # 0x1257f
movq %rax, (%r14)
movl $0x80000000, 0x88(%r14) # imm = 0x80000000
movl $0x6, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7630
cmpl $-0x1, %eax
je 0x12546
movl $0x78, %edi
callq 0x7500
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x125a0
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     # 0x34ce1
callq 0x8dd3
leaq 0x22771(%rip), %rsi     # 0x34cd1
movl %eax, %edi
callq 0x8dd3
movq %rax, %rbx
movl $0x78, %esi
movq %r14, %rdi
callq 0x7510
movq %rbx, %rdi
callq 0x79b0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x32ed2(%rip), %rax     # 0x45520
movq %rax, (%rbx)
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x1043a
leaq 0xf(%rsp), %rsi
movq %rbx, %rdi
callq 0x126ae
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x1269d
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1269d
movq %rax, %rdi
callq 0x8fc6
movq %rax, %r15
movq %rbx, %rdi
callq 0x12866
movq %r15, %rdi
callq 0x79b0
nop