// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
cmpl $0x1, %edi
jg 0x57a1
movl $0x1, %ebx
movq 0x14865(%rip), %rdi     # 0x19ff0
leaq 0xb882(%rip), %rsi      # 0x11014
movl $0x27, %edx
callq 0x5360
jmp 0x58db
movq %rsi, %rbx
movl %edi, %ebp
movq %rsp, %rdi
callq 0x5bf4
leaq 0x60(%rsp), %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
movl %ebp, %r12d
movl $0x1, %r13d
leaq 0x10(%rsp), %rbp
movq (%rbx,%r13,8), %rdi
callq 0x54a0
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movups %xmm0, 0x2c(%rsp)
movw $0x2, 0x20(%rsp)
rolw $0x8, %ax
movw %ax, 0x22(%rsp)
movl $0x0, 0x24(%rsp)
movl $0xd8, %edi
callq 0x52f0
movq %rax, %r15
movq %rax, %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x5d94
movq %rbp, %rdi
movq %r15, %rsi
callq 0x5e54
movq %r14, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x10056
leaq 0x18(%rsp), %rdi
callq 0xc016
incq %r13
cmpq %r13, %r12
jne 0x57d0
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0x137f4(%rip), %rax     # 0x19050
movq %rax, 0x8(%rsi)
movq 0x8(%rsp), %rdi
callq 0x77e2
cmpb $0x1, 0x14(%rsp)
je 0x58ec
leaq 0x60(%rsp), %rdi
callq 0xff0a
movq (%rsp), %rax
movq 0x38(%rax), %rbx
testq %rbx, %rbx
je 0x5897
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x20(%rbx), %rbx
jmp 0x5883
movq (%rsp), %rbx
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x58ba
movq (%rdi), %rax
movq 0x20(%rdi), %r14
callq *0x8(%rax)
movq %r14, 0x38(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x58a4
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x58d9
leaq 0x8(%rbx), %rdi
callq 0x5380
movl $0x40, %esi
movq %rbx, %rdi
callq 0x5300
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
leaq 0xb73e(%rip), %rsi      # 0x1103b
leaq 0x20(%rsp), %rdi
callq 0x5570
leaq 0x13712(%rip), %rax     # 0x19020
leaq 0x50(%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 0x20(%rsp), %rdi
callq 0x63a7
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6078
jmp 0x598b
jmp 0x594c
movq %rdx, %r14
movq %rax, %rbx
jmp 0x599d
jmp 0x5985
movq %rax, %rdi
callq 0x5afb
movq %rdx, %r14
movq %rax, %rbx
movl $0xd8, %esi
movq %r15, %rdi
callq 0x5300
jmp 0x598b
movq %rdx, %r14
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xc016
jmp 0x598b
movq %rdx, %r14
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xff0a
movq %rsp, %rdi
callq 0x5ea2
cmpl $0x1, %r14d
jne 0x5a04
movq %rbx, %rdi
callq 0x5160
movq %rax, %rbx
movq 0x1463b(%rip), %rdi     # 0x19ff0
leaq 0xb680(%rip), %rsi      # 0x1103c
movl $0xb, %edx
callq 0x5360
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x1461a(%rip), %rdi     # 0x19ff0
movq %rax, %rsi
callq 0x52e0
leaq 0xb655(%rip), %rsi      # 0x1103a
movl $0x1, %edx
movq %rax, %rdi
callq 0x5360
callq 0x54c0
jmp 0x58d9
movq %rax, %rbx
callq 0x54c0
movq %rbx, %rdi
callq 0x54f0
jmp 0x5956
nop