// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: main
int main(int argc, char* argv[])
{
  try
  {
    if (argc < 2)
    {
      std::cerr << "Usage: chat_server <port> [<port> ...]\n";
      return 1;
    }

    boost::asio::io_service io_service;

    chat_server_list servers;
    for (int i = 1; i < argc; ++i)
    {
      using namespace std; // For atoi.
      tcp::endpoint endpoint(tcp::v4(), atoi(argv[i]));
      chat_server_ptr server(new chat_server(io_service, endpoint));
      servers.push_back(server);
    }

    io_service.run();
  }
  catch (std::exception& e)
  {
    std::cerr << "Exception: " << e.what() << "\n";
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x28(%rsp)
cmpl $0x1, %edi
jg 0x57a9
movl $0x1, %ebx
movq 0x13855(%rip), %rdi     # 0x18fe8
leaq 0xa896(%rip), %rsi      # 0x10030
movl $0x27, %edx
callq 0x5360
jmp 0x58f4
movl %edi, %ebp
leaq 0x8(%rsp), %rdi
callq 0x5c16
leaq 0x70(%rsp), %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
movl %ebp, %r13d
movl $0x1, %ebx
xorl %r12d, %r12d
leaq 0x18(%rsp), %rbp
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x54a0
leaq 0x38(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
rolw $0x8, %ax
movl %r12d, 0x10(%rcx)
movw $0x2, 0x30(%rsp)
movw %ax, 0x32(%rsp)
movl %r12d, 0x34(%rsp)
movl $0xd8, %edi
callq 0x52f0
movq %rax, %r15
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x5dbc
movq %rbp, %rdi
movq %r15, %rsi
callq 0x5e7c
movq %r14, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0xfb6a
leaq 0x20(%rsp), %rdi
callq 0xbe30
incq %rbx
cmpq %rbx, %r13
jne 0x57d9
leaq 0x18(%rsp), %rsi
movl $0x0, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0x12855(%rip), %rax     # 0x180c0
movq %rax, 0x8(%rsi)
movq 0x10(%rsp), %rdi
callq 0x77ca
cmpb $0x1, 0x1c(%rsp)
je 0x590c
leaq 0x70(%rsp), %rdi
callq 0xfa28
movq 0x8(%rsp), %rbx
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x58dc
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x589c
movq 0x8(%rsp), %rbx
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x58dc
movq (%rdi), %rax
movq 0x20(%rdi), %r14
callq *0x8(%rax)
movq %r14, 0x38(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x58bc
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
je 0x5908
leaq 0x8(%rbx), %rdi
callq 0x5380
movl $0x40, %esi
movq %rbx, %rdi
callq 0x5300
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x58e5
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r14
leaq 0xa73a(%rip), %rsi      # 0x10057
leaq 0x30(%rsp), %rdi
callq 0x5570
leaq 0x12762(%rip), %rax     # 0x18090
leaq 0x60(%rsp), %rcx
movq %rax, -0x30(%rcx)
movq %rbx, -0x20(%rcx)
movq %r14, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rdi
callq 0x63da
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x60a2
jmp 0x59ab
jmp 0x596c
movq %rdx, %r14
movq %rax, %rbx
jmp 0x59bf
jmp 0x59a5
movq %rax, %rdi
callq 0x5b1d
movq %rdx, %r14
movq %rax, %rbx
movl $0xd8, %esi
movq %r15, %rdi
callq 0x5300
jmp 0x59ab
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbe30
jmp 0x59ab
movq %rdx, %r14
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xfa28
leaq 0x8(%rsp), %rdi
callq 0x5eca
cmpl $0x1, %r14d
jne 0x5a26
movq %rbx, %rdi
callq 0x5160
movq %rax, %rbx
movq 0x13611(%rip), %rdi     # 0x18fe8
leaq 0xa67a(%rip), %rsi      # 0x10058
movl $0xb, %edx
callq 0x5360
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x135f0(%rip), %rdi     # 0x18fe8
movq %rax, %rsi
callq 0x52e0
leaq 0xa64f(%rip), %rsi      # 0x10056
movl $0x1, %edx
movq %rax, %rdi
callq 0x5360
callq 0x54c0
jmp 0x58f2
movq %rax, %rbx
callq 0x54c0
movq %rbx, %rdi
callq 0x54f0
jmp 0x5976
nop