// File: PepiJK[P]Mail-Server-Client/src/myclient.cpp
// Function: main
int main(int argc, char *argv[])
{
   MyHelper helper;
   helper.checkClientArguments(argc, argv);

   MySocket clientSocket(argv[1], stoi(argv[2]));
   clientSocket.createSocket();
   clientSocket.connectSocket();

   char buffer[BUF], command[BUF];

   cout << clientSocket.recvMessage() << endl;

   while (1)
   {
      fgets(command, BUF, stdin);
      buffer[strlen(command)] = '\0';
      clientSocket.sendMessage(command);

      if (strcmp(command, "SEND\n\0") == 0)
      {
         // sender, reveiver, subject
         for (int i = 0; i < 4; i++)
         {
            fgets(buffer, BUF, stdin);
            buffer[strlen(buffer)] = '\0';
            clientSocket.sendMessage(buffer);
         }
         // email message
         do
         {
            fgets(buffer, BUF, stdin);
            if (strncmp(buffer, ".\n", 2) == 0)
            {
               buffer[strlen(buffer)] = '\0';
            }
            clientSocket.sendMessage(buffer);
         } while (strcmp(buffer, ".\n\0") != 0);
         cout << clientSocket.recvMessage() << endl;
      }

      else if (strcmp(command, "LIST\n\0") == 0)
      {
         // user
         fgets(buffer, BUF, stdin);
         buffer[strlen(buffer)] = '\0';
         clientSocket.sendMessage(buffer);

         string mailSubject, numberOfMails;
         numberOfMails = clientSocket.recvMessage();
         cout << numberOfMails;

         int mailAmount = stoi(numberOfMails.substr(0, numberOfMails.find(' ')).c_str());
         if (mailAmount > 0)
         {
            for (int i = 1; i <= mailAmount; i++)
            {
               // tell the server to start sending the list of mails
               clientSocket.sendMessage("OK\0");
               mailSubject = clientSocket.recvMessage();
               mailSubject = mailSubject.substr(mailSubject.find('_') + 1, mailSubject.length()) + ' ' + to_string(i);
               cout << mailSubject << endl;
            }
         }
      }

      else if (strcmp(command, "READ\n\0") == 0)
      {
         // user
         fgets(buffer, BUF, stdin);
         buffer[strlen(buffer)] = '\0';
         clientSocket.sendMessage(buffer);

         // mail number
         fgets(buffer, BUF, stdin);
         buffer[strlen(buffer)] = '\0';
         clientSocket.sendMessage(buffer);

         string mailOutput;
         string resp = clientSocket.recvMessage();
         cout << resp << endl;

         if (resp == "OK")
         {
            while (1)
            {
               // send Server the ok to start receiving the mail
               clientSocket.sendMessage("OK\0");
               mailOutput = clientSocket.recvMessage();
               if (mailOutput == ".\n")
               {
                  break;
               }
               cout << mailOutput;
            }
         }
      }

      else if (strcmp(command, "DEL\n\0") == 0)
      {
         // user
         fgets(buffer, BUF, stdin);
         buffer[strlen(buffer)] = '\0';
         clientSocket.sendMessage(buffer);

         // mail number
         fgets(buffer, BUF, stdin);
         buffer[strlen(buffer)] = '\0';
         clientSocket.sendMessage(buffer);

         cout << clientSocket.recvMessage() << endl;
      }

      else if (strcmp(command, "QUIT\n\0") == 0)
      {
         break;
      }

      else
      {
         cout << "Unknown command!" << endl;
      }
   }
   return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf40, %rsp            # imm = 0xF40
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xe18(%rbp)
callq 0x36a0
movq -0xe18(%rbp), %rdi
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x3af0
jmp 0x5a6e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0xe30(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xe28(%rbp)
leaq -0x4a1(%rbp), %rdi
movq %rdi, -0xe20(%rbp)
callq 0x3470
movq -0xe28(%rbp), %rsi
movq -0xe20(%rbp), %rdx
leaq -0x4a0(%rbp), %rdi
callq 0x3380
jmp 0x5ab7
xorl %eax, %eax
movl %eax, %esi
leaq -0x4a0(%rbp), %rdi
movl $0xa, %edx
callq 0x4350
movl %eax, -0xe34(%rbp)
jmp 0x5ad4
movl -0xe34(%rbp), %edx
movq -0xe30(%rbp), %rsi
leaq -0x47c(%rbp), %rdi
callq 0x5530
jmp 0x5aef
leaq -0x4a0(%rbp), %rdi
callq 0x3190
leaq -0x4a1(%rbp), %rdi
callq 0x32f0
leaq -0x47c(%rbp), %rdi
callq 0x55a0
jmp 0x5b15
leaq -0x47c(%rbp), %rdi
callq 0x5620
jmp 0x5b23
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xe40(%rbp)
jmp 0x5b3d
movq -0xe40(%rbp), %rsi
movq 0x4485(%rip), %rdi      # 0x9fd0
callq 0x3280
movq %rax, -0xe48(%rbp)
jmp 0x5b59
movq -0xe48(%rbp), %rdi
movq 0x4451(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x5b6e
jmp 0x5b70
jmp 0x5b72
movq 0x444f(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0xcb0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x5b8f
leaq -0xcb0(%rbp), %rdi
movq %rdi, -0xe50(%rbp)
callq 0x3110
movq -0xe50(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x5bc4
leaq -0xcb0(%rbp), %rdi
leaq 0x15a9(%rip), %rsi      # 0x717b
callq 0x33a0
cmpl $0x0, %eax
jne 0x5d8d
movl $0x0, -0xcb4(%rbp)
cmpl $0x4, -0xcb4(%rbp)
jge 0x5cb5
movq 0x43ca(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x5c14
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xe58(%rbp)
callq 0x3110
movq -0xe58(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x5c49
jmp 0x5c4b
movl -0xcb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcb4(%rbp)
jmp 0x5bea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x65c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x3190
leaq -0x4a1(%rbp), %rdi
callq 0x32f0
jmp 0x65c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x65b5
jmp 0x5cb7
movq 0x430a(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x5cd4
leaq -0x8b0(%rbp), %rdi
leaq 0x14bb(%rip), %rsi      # 0x719d
movl $0x2, %edx
callq 0x3130
cmpl $0x0, %eax
jne 0x5d05
leaq -0x8b0(%rbp), %rdi
callq 0x3110
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
leaq -0x8b0(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x5d1f
jmp 0x5d21
leaq -0x8b0(%rbp), %rdi
leaq 0x1485(%rip), %rsi      # 0x71b4
callq 0x33a0
cmpl $0x0, %eax
jne 0x5cb7
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xe60(%rbp)
jmp 0x5d57
movq -0xe60(%rbp), %rsi
movq 0x426b(%rip), %rdi      # 0x9fd0
callq 0x3280
movq %rax, -0xe68(%rbp)
jmp 0x5d73
movq -0xe68(%rbp), %rdi
movq 0x4237(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x5d88
jmp 0x6588
leaq -0xcb0(%rbp), %rdi
leaq 0x13e7(%rip), %rsi      # 0x7182
callq 0x33a0
cmpl $0x0, %eax
jne 0x61a8
movq 0x4218(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x5dc6
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xe70(%rbp)
callq 0x3110
movq -0xe70(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x5dfb
leaq -0xcd8(%rbp), %rdi
callq 0x3390
leaq -0xcf8(%rbp), %rdi
callq 0x3390
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xe78(%rbp)
jmp 0x5e2d
movq -0xe78(%rbp), %rsi
leaq -0xcf8(%rbp), %rdi
callq 0x3370
jmp 0x5e42
movq 0x4187(%rip), %rdi      # 0x9fd0
leaq -0xcf8(%rbp), %rsi
callq 0x3250
jmp 0x5e57
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0xe80(%rbp)
leaq -0xcf8(%rbp), %rdi
movq %rdi, -0xe88(%rbp)
movl $0x20, %esi
callq 0x3360
movq -0xe88(%rbp), %rsi
movq -0xe80(%rbp), %rdx
movq %rax, %rcx
leaq -0xd40(%rbp), %rdi
callq 0x32b0
jmp 0x5e99
leaq -0xd40(%rbp), %rdi
callq 0x30f0
movq %rax, -0xe98(%rbp)
leaq -0xd41(%rbp), %rdi
movq %rdi, -0xe90(%rbp)
callq 0x3470
movq -0xe98(%rbp), %rsi
movq -0xe90(%rbp), %rdx
leaq -0xd20(%rbp), %rdi
callq 0x3380
jmp 0x5edb
xorl %eax, %eax
movl %eax, %esi
leaq -0xd20(%rbp), %rdi
movl $0xa, %edx
callq 0x4350
movl %eax, -0xe9c(%rbp)
jmp 0x5ef8
leaq -0xd20(%rbp), %rdi
callq 0x3190
leaq -0xd41(%rbp), %rdi
callq 0x32f0
leaq -0xd40(%rbp), %rdi
callq 0x3190
movl -0xe9c(%rbp), %eax
movl %eax, -0xcfc(%rbp)
cmpl $0x0, -0xcfc(%rbp)
jle 0x616e
movl $0x1, -0xd48(%rbp)
movl -0xd48(%rbp), %eax
cmpl -0xcfc(%rbp), %eax
jg 0x616c
leaq 0x1260(%rip), %rsi      # 0x71b8
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x5f6b
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xea8(%rbp)
jmp 0x5f85
movq -0xea8(%rbp), %rsi
leaq -0xcd8(%rbp), %rdi
callq 0x3370
jmp 0x5f9a
xorl %eax, %eax
movl %eax, %edx
leaq -0xcd8(%rbp), %rdi
movq %rdi, -0xeb8(%rbp)
movl $0x5f, %esi
callq 0x3360
movq -0xeb8(%rbp), %rdi
incq %rax
movq %rax, -0xeb0(%rbp)
callq 0x33d0
movq -0xeb8(%rbp), %rsi
movq -0xeb0(%rbp), %rdx
movq %rax, %rcx
leaq -0xda8(%rbp), %rdi
callq 0x32b0
jmp 0x5feb
leaq -0xd88(%rbp), %rdi
leaq -0xda8(%rbp), %rsi
movl $0x20, %edx
callq 0x66b0
jmp 0x6005
movl -0xd48(%rbp), %esi
leaq -0xdc8(%rbp), %rdi
callq 0x6700
jmp 0x6019
leaq -0xd68(%rbp), %rdi
leaq -0xd88(%rbp), %rsi
leaq -0xdc8(%rbp), %rdx
callq 0x65e0
jmp 0x6035
leaq -0xcd8(%rbp), %rdi
movq %rdi, -0xec8(%rbp)
leaq -0xd68(%rbp), %rsi
movq %rsi, -0xed0(%rbp)
callq 0x3340
movq -0xed0(%rbp), %rdi
callq 0x3190
leaq -0xdc8(%rbp), %rdi
callq 0x3190
leaq -0xd88(%rbp), %rdi
callq 0x3190
leaq -0xda8(%rbp), %rdi
callq 0x3190
movq -0xec8(%rbp), %rsi
movq 0x3f3c(%rip), %rdi      # 0x9fd0
callq 0x3250
movq %rax, -0xec0(%rbp)
jmp 0x60a2
movq -0xec0(%rbp), %rdi
movq 0x3f08(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x60b7
jmp 0x60b9
movl -0xd48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd48(%rbp)
jmp 0x5f3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6104
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd20(%rbp), %rdi
callq 0x3190
leaq -0xd41(%rbp), %rdi
callq 0x32f0
leaq -0xd40(%rbp), %rdi
callq 0x3190
jmp 0x618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x615e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xdc8(%rbp), %rdi
callq 0x3190
leaq -0xd88(%rbp), %rdi
callq 0x3190
leaq -0xda8(%rbp), %rdi
callq 0x3190
jmp 0x618b
jmp 0x616e
leaq -0xcf8(%rbp), %rdi
callq 0x3190
leaq -0xcd8(%rbp), %rdi
callq 0x3190
jmp 0x6586
leaq -0xcf8(%rbp), %rdi
callq 0x3190
leaq -0xcd8(%rbp), %rdi
callq 0x3190
jmp 0x65b5
leaq -0xcb0(%rbp), %rdi
leaq 0xfd3(%rip), %rsi       # 0x7189
callq 0x33a0
cmpl $0x0, %eax
jne 0x6426
movq 0x3dfd(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x61e1
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xed8(%rbp)
callq 0x3110
movq -0xed8(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x6216
movq 0x3dab(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x6233
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xee0(%rbp)
callq 0x3110
movq -0xee0(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x6268
leaq -0xde8(%rbp), %rdi
callq 0x3390
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xee8(%rbp)
jmp 0x628e
leaq -0xe09(%rbp), %rdi
movq %rdi, -0xef0(%rbp)
callq 0x3470
movq -0xee8(%rbp), %rsi
movq -0xef0(%rbp), %rdx
leaq -0xe08(%rbp), %rdi
callq 0x3380
jmp 0x62bd
leaq -0xe09(%rbp), %rdi
callq 0x32f0
movq 0x3d00(%rip), %rdi      # 0x9fd0
leaq -0xe08(%rbp), %rsi
callq 0x3250
movq %rax, -0xef8(%rbp)
jmp 0x62e5
movq -0xef8(%rbp), %rdi
movq 0x3cc5(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x62fa
leaq 0xe9f(%rip), %rsi       # 0x71a0
leaq -0xe08(%rbp), %rdi
callq 0x49a0
movb %al, -0xef9(%rbp)
jmp 0x6315
movb -0xef9(%rbp), %al
testb $0x1, %al
jne 0x6324
jmp 0x63f8
jmp 0x6326
jmp 0x6328
leaq 0xe89(%rip), %rsi       # 0x71b8
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x6342
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xf08(%rbp)
jmp 0x635c
movq -0xf08(%rbp), %rsi
leaq -0xde8(%rbp), %rdi
callq 0x3370
jmp 0x6371
leaq 0xe25(%rip), %rsi       # 0x719d
leaq -0xde8(%rbp), %rdi
callq 0x49a0
movb %al, -0xf09(%rbp)
jmp 0x638c
movb -0xf09(%rbp), %al
testb $0x1, %al
jne 0x6398
jmp 0x63dc
jmp 0x63f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6415
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe09(%rbp), %rdi
callq 0x32f0
jmp 0x6415
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe08(%rbp), %rdi
callq 0x3190
jmp 0x6415
movq 0x3bed(%rip), %rdi      # 0x9fd0
leaq -0xde8(%rbp), %rsi
callq 0x3250
jmp 0x63f1
jmp 0x6326
jmp 0x63f8
leaq -0xe08(%rbp), %rdi
callq 0x3190
leaq -0xde8(%rbp), %rdi
callq 0x3190
jmp 0x6584
leaq -0xde8(%rbp), %rdi
callq 0x3190
jmp 0x65b5
leaq -0xcb0(%rbp), %rdi
leaq 0xd5c(%rip), %rsi       # 0x7190
callq 0x33a0
cmpl $0x0, %eax
jne 0x6533
movq 0x3b7f(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x645f
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xf18(%rbp)
callq 0x3110
movq -0xf18(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x6494
movq 0x3b2d(%rip), %rax      # 0x9fc8
movq (%rax), %rdx
leaq -0x8b0(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3410
jmp 0x64b1
leaq -0x8b0(%rbp), %rdi
movq %rdi, -0xf20(%rbp)
callq 0x3110
movq -0xf20(%rbp), %rsi
movb $0x0, -0x8b0(%rbp,%rax)
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5950
jmp 0x64e6
leaq -0x47c(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5890
movq %rax, -0xf28(%rbp)
jmp 0x6500
movq -0xf28(%rbp), %rsi
movq 0x3ac2(%rip), %rdi      # 0x9fd0
callq 0x3280
movq %rax, -0xf30(%rbp)
jmp 0x651c
movq -0xf30(%rbp), %rdi
movq 0x3a8e(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x6531
jmp 0x6582
leaq -0xcb0(%rbp), %rdi
leaq 0xc55(%rip), %rsi       # 0x7196
callq 0x33a0
cmpl $0x0, %eax
jne 0x654d
jmp 0x658d
movq 0x3a7c(%rip), %rdi      # 0x9fd0
leaq 0xc48(%rip), %rsi       # 0x71a3
callq 0x3280
movq %rax, -0xf38(%rbp)
jmp 0x6569
movq -0xf38(%rbp), %rdi
movq 0x3a41(%rip), %rsi      # 0x9fb8
callq 0x32c0
jmp 0x657e
jmp 0x6580
jmp 0x6582
jmp 0x6584
jmp 0x6586
jmp 0x6588
jmp 0x5b70
movl $0x0, -0x4(%rbp)
leaq -0x47c(%rbp), %rdi
callq 0x5a00
leaq -0x40(%rbp), %rdi
callq 0x4280
movl -0x4(%rbp), %eax
addq $0xf40, %rsp            # imm = 0xF40
popq %rbp
retq
leaq -0x47c(%rbp), %rdi
callq 0x5a00
leaq -0x40(%rbp), %rdi
callq 0x4280
movq -0x48(%rbp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)
nopl (%rax)