// File: /workspace/github_cpp_makefile_star2_O3/cybozu[P]yrmcds/src/memcache/handler.cpp
// Function: yrmcds::memcache::handler::on_master_start()
void handler::on_master_start() {
    m_is_slave = false;
    cybozu::tcp_server_socket::wrapper w =
        [this](int s, const cybozu::ip_address&) {
        return make_repl_socket(s);
    };
    if( g_config.bind_ip().empty() ) {
        m_reactor.add_resource(
            make_server_socket(nullptr, g_config.repl_port(), w),
            cybozu::reactor::EVENT_IN);
    } else {
        m_reactor.add_resource(
            make_server_socket(g_config.vip(), g_config.repl_port(), w, true),
            cybozu::reactor::EVENT_IN);
        for( auto& s: g_config.bind_ip() ) {
            m_reactor.add_resource(
                make_server_socket(s, g_config.repl_port(), w),
                cybozu::reactor::EVENT_IN);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movb $0x0, 0x38(%rdi)
movq $0x0, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0xffe(%rip), %rax       # 0x16fda
movq %rax, 0x50(%rsp)
leaq 0x1006(%rip), %rax      # 0x16fee
movq %rax, 0x48(%rsp)
leaq 0x30bcc(%rip), %rax     # 0x46bc0
movq 0x28(%rax), %rcx
movq 0x28(%rdi), %r15
cmpq 0x30(%rax), %rcx
je 0x1617b
movq %rdi, %rbx
movzwl 0x22(%rax), %ebp
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x130d6
movzwl %bp, %edx
leaq 0x30b9a(%rip), %rsi     # 0x46bc0
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movl $0x1, %r8d
callq 0x13134
movq 0x18(%rsp), %rax
movq $0x0, 0x18(%rsp)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
movl $0x1, %edx
callq 0xa31a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1606e
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x16087
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rsp)
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x160a9
leaq 0x58(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x30b10(%rip), %rax     # 0x46bc0
movq 0x28(%rax), %r15
movq 0x30(%rax), %rbp
cmpq %rbp, %r15
je 0x16222
leaq 0x98(%rsp), %r12
movq 0x28(%rbx), %r13
leaq 0x30aec(%rip), %rax     # 0x46bc0
movzwl 0x22(%rax), %r14d
movq %r12, %rdi
leaq 0x38(%rsp), %rsi
callq 0x130d6
movzwl %r14w, %edx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x13134
movq 0x18(%rsp), %rax
movq $0x0, 0x18(%rsp)
movq %rax, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
movl $0x1, %edx
callq 0xa31a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1612e
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x16146
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rsp)
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x16169
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %r15
cmpq %rbp, %r15
jne 0x160c9
jmp 0x16222
movzwl 0x22(%rax), %ebx
leaq 0x78(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x130d6
movl $0x78, %edi
callq 0x74f0
movq %rax, %r14
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x130d6
movzwl %bx, %edx
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1341a
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x161d8
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %r15, %rdi
movl $0x1, %edx
callq 0xa31a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x161fd
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x10(%rsp)
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x16222
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x1623b
leaq 0x38(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16396
jmp 0x16396
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1626a
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x10(%rsp)
jmp 0x162ad
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x1629b
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1629b
jmp 0x16396
movq %rax, %rbx
movl $0x78, %esi
movq %r14, %rdi
callq 0x7500
jmp 0x162ad
movq %rax, %rbx
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x16373
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x16373
jmp 0x16396
jmp 0x1632b
jmp 0x16396
jmp 0x16396
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x162f6
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x7e2b
jmp 0x1630a
movq %rax, %rbx
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x16373
leaq 0x58(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x16373
jmp 0x16396
jmp 0x1632b
jmp 0x16396
movq %rax, %rbx
jmp 0x16373
movq %rax, %rbx
jmp 0x16354
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x16347
movq (%rdi), %rax
callq *0x8(%rax)
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x7e47
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x16373
leaq 0x98(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x1638c
leaq 0x38(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79a0
jmp 0x16396
movq %rax, %rdi
callq 0x8f80