// File: /workspace/github_cpp_makefile_star2_O3/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 0x16a77
leaq 0x30106(%rip), %rax     # 0x46a88
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
leaq 0x1e0c9(%rip), %rdx     # 0x34a5d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x96e6
movb (%rbx), %al
cmpb $0x1, %al
jne 0x169c1
movq 0x10(%rsp), %rdi
leaq 0x1e9da(%rip), %rsi     # 0x3538d
movl $0x1c, %edx
callq 0x7570
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x169de
movq 0x10(%rsp), %rdi
leaq 0x304ef(%rip), %rax     # 0x46ec0
movq 0x68(%rax), %rsi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x169fc
movq 0x10(%rsp), %rdi
leaq 0x1e9bc(%rip), %rsi     # 0x353aa
movl $0xa, %edx
callq 0x7570
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16a19
movq 0x10(%rsp), %rdi
leaq 0x304b4(%rip), %rax     # 0x46ec0
movq 0x70(%rax), %rsi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16a37
movq 0x10(%rsp), %rdi
leaq 0x1e98c(%rip), %rsi     # 0x353b5
movl $0xa, %edx
callq 0x7570
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16a54
movq 0x10(%rsp), %rdi
leaq 0x30479(%rip), %rax     # 0x46ec0
movq 0x78(%rax), %rsi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16bd4
movq 0x10(%rsp), %rdi
leaq 0x1e958(%rip), %rsi     # 0x353c0
movl $0x9, %edx
callq 0x7570
jmp 0x16bd4
movq %rdi, %r14
movq $-0xb8, %rax
xorl %ebx, %ebx
leaq 0x30436(%rip), %r12     # 0x46ec0
movq 0x1f8(%r12,%rax), %rcx
addq %rcx, %rbx
addq $0x8, %rax
jne 0x16a8a
movq $-0x290, %rax           # imm = 0xFD70
movq 0x488(%r12,%rax), %rcx
addq %rcx, %rbx
addq $0x8, %rax
jne 0x16aa2
leaq 0x2ffce(%rip), %rax     # 0x46a88
movl (%rax), %eax
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
leaq 0x1df91(%rip), %rdx     # 0x34a5d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x96e6
movb (%r15), %al
cmpb $0x1, %al
jne 0x16afa
movq 0x10(%rsp), %rdi
leaq 0x1e8de(%rip), %rsi     # 0x353ca
movl $0x11, %edx
callq 0x7570
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16b1b
movq 0x80(%r14), %rsi
subq 0x78(%r14), %rsi
sarq $0x3, %rsi
movq 0x10(%rsp), %rdi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16b39
movq 0x10(%rsp), %rdi
leaq 0x1e8b1(%rip), %rsi     # 0x353dc
movl $0x9, %edx
callq 0x7570
movb 0x8(%rsp), %al
movl (%r12), %esi
testb $0x1, %al
je 0x16b4f
movq 0x10(%rsp), %rdi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16b6d
movq 0x10(%rsp), %rdi
leaq 0x1e23f(%rip), %rsi     # 0x34d9e
movl $0xa, %edx
callq 0x7570
movb 0x8(%rsp), %al
movq 0x100(%r12), %rsi
testb $0x1, %al
je 0x16b87
movq 0x10(%rsp), %rdi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16ba5
movq 0x10(%rsp), %rdi
leaq 0x1e212(%rip), %rsi     # 0x34da9
movl $0xa, %edx
callq 0x7570
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16bba
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x7330
movb 0x8(%rsp), %al
testb $0x1, %al
je 0x16bd4
movq 0x10(%rsp), %rdi
leaq 0x1e1ea(%rip), %rsi     # 0x34db4
movl $0xb, %edx
callq 0x7570
leaq 0x8(%rsp), %rdi
callq 0x8f4e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x16bf2
jmp 0x16bf2
jmp 0x16bf2
jmp 0x16bf2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8f4e
movq %rbx, %rdi
callq 0x79a0
nop