// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x20, %edi
callq 0x2230
movq %rax, %rbx
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq %rax, %rdi
movl %ebp, %esi
callq 0x3bf0
testb %al, %al
je 0x37b8
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3dde(%rip), %rsi      # 0x73fc
leaq 0x3df6(%rip), %rdx      # 0x741b
leaq 0x60(%rsp), %rdi
callq 0x3b5e
leaq 0x60(%rsp), %rdi
callq 0x34e5
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3648
callq 0x21f0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x3ace
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x3ace
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x258c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x369e
callq 0x21f0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x36ad
callq 0x21f0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x3d91(%rip), %rsi      # 0x744d
leaq 0x3da6(%rip), %rdx      # 0x7469
callq 0x3b5e
leaq 0x60(%rsp), %rdi
callq 0x34e5
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x36e1
callq 0x21f0
movq 0x68f0(%rip), %r14      # 0x9fd8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq %rax, %r15
leaq 0x3d51(%rip), %rsi      # 0x746a
movl $0xc, %edx
movq %rax, %rdi
callq 0x2290
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
leaq 0x3d14(%rip), %rsi      # 0x7477
movl $0x10, %edx
movq %r14, %rdi
callq 0x2290
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x3aaa
movq %rbx, %rdi
callq 0x21f0
jmp 0x382f
leaq 0x60(%rsp), %rdi
callq 0x2160
leaq 0x70(%rsp), %rbx
leaq 0x3c4e(%rip), %rsi      # 0x741c
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 0x34e5
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3811
callq 0x21f0
movq 0x6798(%rip), %rsi      # 0x9fb0
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 0x3881
jmp 0x3895
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x389d
callq 0x21f0
jmp 0x389d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3875
callq 0x21f0
jmp 0x3875
jmp 0x389a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
jne 0x388e
jmp 0x38bb
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x38bb
callq 0x21f0
jmp 0x38bb
movq %rax, %rbx
jmp 0x38bb
movq %rax, %rbx
movq 0x670c(%rip), %rsi      # 0x9fb0
leaq 0x60(%rsp), %rdi
callq 0x2180
leaq 0xe0(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x23a0