// File: /workspace/github_cpp_makefile_star2_O2/plasma-umass[P]simplesocket/client.cpp
// Function: main
int main (int argc, char * argv[])
{
  if (argc < 3) {
    cerr << "Usage: " << argv[0] << " <port> <id>" << endl;
    exit (-1);
  }
  int port;
  int id;
  stringstream (argv[1]) >> port;
  stringstream (argv[2]) >> id;
  clientsocket * s = new clientsocket("127.0.0.1", port);
  s->connect();
  stringstream output;
  output << "CLIENT MESSAGE FROM " << id;
  cout << "client about to send: " << output.str().c_str() << endl;
  *s << output.str();
  string result;
  *s >> result;
  cout << "Received: {" << result << "}" << endl;

  s->close();
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rsi, %rbx
cmpl $0x2, %edi
jle 0x2684
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x272e
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x22b0
leaq 0x58(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x2120
leaq 0x58(%rsp), %rdi
callq 0x2160
leaq 0x10(%rsp), %rdi
callq 0x20d0
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x272e
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x22b0
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2120
leaq 0x58(%rsp), %rdi
callq 0x2160
leaq 0x10(%rsp), %rdi
callq 0x20d0
movl $0x1e0, %edi            # imm = 0x1E0
callq 0x21f0
movq %rax, %rbx
movl 0x34(%rsp), %edx
leaq 0x1abd(%rip), %rsi      # 0x4019
pushq $-0x1
popq %rcx
movq %rax, %rdi
xorl %r8d, %r8d
callq 0x276a
movq %rbx, %rdi
callq 0x3028
leaq 0x58(%rsp), %rdi
callq 0x2140
leaq 0x68(%rsp), %rdi
leaq 0x1a9b(%rip), %rsi      # 0x4023
callq 0x21e0
movl 0x30(%rsp), %esi
movq %rax, %rdi
callq 0x22e0
movq 0x3a28(%rip), %rdi      # 0x5fc8
leaq 0x1a91(%rip), %rsi      # 0x4038
callq 0x21e0
movq %rax, %r15
leaq 0x70(%rsp), %r14
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x22a0
movq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20e0
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x22a0
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x27a4
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2836
movq 0x399f(%rip), %rdi      # 0x5fc8
leaq 0x1a1f(%rip), %rsi      # 0x404f
callq 0x21e0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x21c0
leaq 0x1a12(%rip), %rsi      # 0x405b
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2cc2
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x2160
xorl %eax, %eax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbx
popq %r14
popq %r15
retq
movq 0x3965(%rip), %rdi      # 0x5ff0
leaq 0x1972(%rip), %rsi      # 0x4004
callq 0x21e0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x21e0
leaq 0x1963(%rip), %rsi      # 0x400c
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20e0
pushq $-0x1
popq %rdi
callq 0x2230
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0x2717
jmp 0x270a
movq %rax, %r14
movl $0x1e0, %esi            # imm = 0x1E0
movq %rbx, %rdi
callq 0x2200
jmp 0x2726
jmp 0x26e5
jmp 0x26f4
jmp 0x2703
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x2160
jmp 0x26f7
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20d0
jmp 0x2726
movq %rax, %r14
jmp 0x2726
jmp 0x270f
movq %rax, %r14
jmp 0x271c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x2160
movq %r14, %rdi
callq 0x22f0