// File: /workspace/github_cpp_makefile_star2_O1/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 $0xc8, %rsp
movb $0x0, 0x38(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
leaq 0xff0(%rip), %rax       # 0x170b0
movq %rax, 0x58(%rsp)
leaq 0xff8(%rip), %rax       # 0x170c4
movq %rax, 0x50(%rsp)
leaq 0x30ae8(%rip), %rax     # 0x46bc0
movq 0x28(%rax), %rcx
movq 0x28(%rdi), %r15
cmpq 0x30(%rax), %rcx
je 0x16264
movq %rdi, %rbx
movzwl 0x22(%rax), %ebp
leaq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x130b0
movzwl %bp, %edx
leaq 0x30ab6(%rip), %rsi     # 0x46bc0
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rcx
movl $0x1, %r8d
callq 0x13115
movq 0x20(%rsp), %rax
movq $0x0, 0x20(%rsp)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
movl $0x1, %edx
callq 0xa33e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16152
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1616b
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x20(%rsp)
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x1618d
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x30a2c(%rip), %rax     # 0x46bc0
movq 0x28(%rax), %r15
movq 0x30(%rax), %rbp
cmpq %rbp, %r15
je 0x16314
leaq 0xa8(%rsp), %r12
movq 0x28(%rbx), %r13
leaq 0x30a08(%rip), %rax     # 0x46bc0
movzwl 0x22(%rax), %r14d
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0x130b0
movzwl %r14w, %edx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x13115
movq 0x20(%rsp), %rax
movq $0x0, 0x20(%rsp)
movq %rax, 0x8(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
callq 0xa33e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x16216
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1622f
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x20(%rsp)
movq 0xb8(%rsp), %rax
testq %rax, %rax
je 0x16252
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %r15
cmpq %rbp, %r15
jne 0x161ad
jmp 0x16314
movzwl 0x22(%rax), %ebx
leaq 0x88(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x130b0
movl $0x78, %edi
callq 0x7500
movq %rax, %r14
leaq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x130b0
movzwl %bx, %edx
leaq 0x20(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x133fc
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x162c7
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x18(%rsp), %rsi
movq %r14, (%rsi)
movq %r15, %rdi
movl $0x1, %edx
callq 0xa33e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x162ec
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rsp)
movq 0x98(%rsp), %rax
testq %rax, %rax
je 0x16314
leaq 0x88(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x1632d
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1648e
jmp 0x1648e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1635c
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rsp)
jmp 0x1639f
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x1638d
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1638d
jmp 0x1648e
movq %rax, %rbx
movl $0x78, %esi
movq %r14, %rdi
callq 0x7510
jmp 0x1639f
movq %rax, %rbx
movq 0x98(%rsp), %rax
testq %rax, %rax
je 0x1646b
leaq 0x88(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1646b
jmp 0x1648e
jmp 0x16420
jmp 0x1648e
jmp 0x1648e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x163eb
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7e3b
jmp 0x163ff
movq %rax, %rbx
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x1646b
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1646b
jmp 0x1648e
jmp 0x16420
jmp 0x1648e
movq %rax, %rbx
jmp 0x1646b
movq %rax, %rbx
jmp 0x1644c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1643d
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7e57
movq 0xb8(%rsp), %rax
testq %rax, %rax
je 0x1646b
leaq 0xa8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x16484
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x79b0
jmp 0x1648e
movq %rax, %rdi
callq 0x8fc6