// File: /workspace/github_cpp_makefile_star2_O3/jBlinden[P]private-codis/ProtocolServer.cpp
// Function: StartServer(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void StartServer(int port, string pArgsFile, string serverDataDir)
{
  CSocket *socket = new CSocket();
  if (Listen(socket, port))
  {
    ServerLog("accepted connection from client");
  }
  else
  {
    stringstream ss;
    ss << "failed to listen for client connections on port " << port;
    ServerLog(ss.str());
    return;
  }

  RunServerProtocol(socket, pArgsFile, serverDataDir);

  ServerLog("protocol execution completed");

  cout << endl
       << "bytes sent: " << socket->GetBytesSent() << endl;
  cout << "bytes received: " << socket->GetBytesReceived() << endl;

  socket->Close();

  delete socket;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movl %edi, %ebp
movl $0x20, %edi
movq %rdx, %r14
movq %rsi, %r15
callq 0x2230
vxorps %xmm0, %xmm0, %xmm0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rax, %rbx
movq $0x0, 0x18(%rax)
movq %rax, %rdi
movl %ebp, %esi
vmovups %xmm0, 0x8(%rax)
callq 0x3b3c
testb %al, %al
je 0x36f8
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2e9e(%rip), %rsi      # 0x63fc
leaq 0x2eb6(%rip), %rdx      # 0x641b
leaq 0x60(%rsp), %rdi
callq 0x3aa4
leaq 0x60(%rsp), %rdi
callq 0x3425
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3588
callq 0x21f0
leaq 0x30(%rsp), %r13
leaq 0x20(%rsp), %rdi
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x3a0e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x3a0e
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x258c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x35de
callq 0x21f0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x35ed
callq 0x21f0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2e51(%rip), %rsi      # 0x644d
leaq 0x2e66(%rip), %rdx      # 0x6469
callq 0x3aa4
leaq 0x60(%rsp), %rdi
callq 0x3425
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3621
callq 0x21f0
movq 0x59b0(%rip), %r14      # 0x8fd8
movl $0xa, %esi
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
leaq 0x2e14(%rip), %rsi      # 0x646a
movl $0xc, %edx
movq %rax, %rdi
movq %rax, %r15
callq 0x2290
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
movq (%rax), %rax
movl $0xa, %esi
movq -0x18(%rax), %rdi
addq %r15, %rdi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
leaq 0x2dd4(%rip), %rsi      # 0x6477
movl $0x10, %edx
movq %r14, %rdi
callq 0x2290
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movq (%rax), %rax
movl $0xa, %esi
movq -0x18(%rax), %rdi
addq %r14, %rdi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x39ea
movq %rbx, %rdi
callq 0x21f0
jmp 0x376f
leaq 0x60(%rsp), %rdi
callq 0x2160
leaq 0x70(%rsp), %rbx
leaq 0x2d0e(%rip), %rsi      # 0x641c
movl $0x30, %edx
movq %rbx, %rdi
callq 0x2290
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2380
leaq 0x78(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x2340
leaq 0x40(%rsp), %rdi
callq 0x3425
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3751
callq 0x21f0
movq 0x5858(%rip), %rsi      # 0x8fb0
leaq 0x60(%rsp), %rdi
callq 0x2180
leaq 0xe0(%rsp), %rdi
callq 0x20d0
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37c1
jmp 0x37d5
leaq 0x50(%rsp), %rcx
movq %rax, %rbx
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x37dd
callq 0x21f0
jmp 0x37dd
movq (%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x37b5
callq 0x21f0
jmp 0x37b5
jmp 0x37da
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
jne 0x37ce
jmp 0x37fb
movq 0x60(%rsp), %rdi
movq %rax, %rbx
cmpq %r12, %rdi
je 0x37fb
callq 0x21f0
jmp 0x37fb
movq %rax, %rbx
jmp 0x37fb
movq %rax, %rbx
movq 0x57cc(%rip), %rsi      # 0x8fb0
leaq 0x60(%rsp), %rdi
callq 0x2180
leaq 0xe0(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x23a0