// File: /workspace/github_cpp_makefile_star2_O1/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::dump_stats()
void handler::dump_stats() {
    using logger = cybozu::logger;

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x38(%rdi)
je 0x16b54
leaq 0x30032(%rip), %rax     # 0x46a98
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
leaq 0x1dfa1(%rip), %rdx     # 0x34a19
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x9718
cmpb $0x1, (%rbx)
jne 0x16aa0
movq 0x10(%rsp), %rdi
leaq 0x1e8b3(%rip), %rsi     # 0x35349
movl $0x1c, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0x16abc
movq 0x10(%rsp), %rdi
leaq 0x3040d(%rip), %rax     # 0x46ec0
movq 0x68(%rax), %rsi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16ad9
movq 0x10(%rsp), %rdi
leaq 0x1e897(%rip), %rsi     # 0x35366
movl $0xa, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0x16af5
movq 0x10(%rsp), %rdi
leaq 0x303d4(%rip), %rax     # 0x46ec0
movq 0x70(%rax), %rsi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16b12
movq 0x10(%rsp), %rdi
leaq 0x1e869(%rip), %rsi     # 0x35371
movl $0xa, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0x16b2e
movq 0x10(%rsp), %rdi
leaq 0x3039b(%rip), %rax     # 0x46ec0
movq 0x78(%rax), %rsi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16ca8
movq 0x10(%rsp), %rdi
leaq 0x1e837(%rip), %rsi     # 0x3537c
movl $0x9, %edx
callq 0x7580
jmp 0x16ca8
movq %rdi, %r14
movq $-0xb8, %rax
xorl %ebx, %ebx
leaq 0x30359(%rip), %r12     # 0x46ec0
movq 0x1f8(%r12,%rax), %rcx
addq %rcx, %rbx
addq $0x8, %rax
jne 0x16b67
movq $-0x290, %rax           # imm = 0xFD70
movq 0x488(%r12,%rax), %rcx
addq %rcx, %rbx
addq $0x8, %rax
jne 0x16b7f
leaq 0x2ff01(%rip), %rax     # 0x46a98
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
leaq 0x1de70(%rip), %rdx     # 0x34a19
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x9718
cmpb $0x1, (%r15)
jne 0x16bd2
movq 0x10(%rsp), %rdi
leaq 0x1e7be(%rip), %rsi     # 0x35386
movl $0x11, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0x16bf2
movq 0x80(%r14), %rsi
subq 0x78(%r14), %rsi
sarq $0x3, %rsi
movq 0x10(%rsp), %rdi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16c0f
movq 0x10(%rsp), %rdi
leaq 0x1e793(%rip), %rsi     # 0x35398
movl $0x9, %edx
callq 0x7580
movl (%r12), %esi
cmpb $0x1, 0x8(%rsp)
jne 0x16c24
movq 0x10(%rsp), %rdi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16c41
movq 0x10(%rsp), %rdi
leaq 0x1e123(%rip), %rsi     # 0x34d5a
movl $0xa, %edx
callq 0x7580
movq 0x100(%r12), %rsi
cmpb $0x1, 0x8(%rsp)
jne 0x16c5a
movq 0x10(%rsp), %rdi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16c77
movq 0x10(%rsp), %rdi
leaq 0x1e0f8(%rip), %rsi     # 0x34d65
movl $0xa, %edx
callq 0x7580
cmpb $0x1, 0x8(%rsp)
jne 0x16c8b
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x7330
cmpb $0x1, 0x8(%rsp)
jne 0x16ca8
movq 0x10(%rsp), %rdi
leaq 0x1e0d2(%rip), %rsi     # 0x34d70
movl $0xb, %edx
callq 0x7580
leaq 0x8(%rsp), %rdi
callq 0x8f94
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x16cc6
jmp 0x16cc6
jmp 0x16cc6
jmp 0x16cc6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8f94
movq %rbx, %rdi
callq 0x79b0
nop