// File: PepiJK[P]Mail-Server-Client/src/myserver.cpp
// Function: serverThread(MyHelper, MySocket&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void serverThread(MyHelper helper, MySocket &serverSocket, int new_socket, string argDir)
{
   string command, buffer;
   do
   {
      command = serverSocket.recvMessage(new_socket);

      if (command == "SEND\n")
      {
         string sender = serverSocket.recvMessage(new_socket);
         string receiver = serverSocket.recvMessage(new_socket);
         string subject = serverSocket.recvMessage(new_socket);
         string message = serverSocket.recvMessage(new_socket);

         // read message part of mail till .\n occours
         while (1)
         {
            buffer = serverSocket.recvMessage(new_socket);
            if (buffer == ".\n")
            {
               break;
            }
            message += buffer;
         }

         // check for length violations, +1 because of \n
         if (sender.length() > 9 || receiver.length() > 9 || subject.length() > 81)
         {
            serverSocket.sendMessage("ERR - sender or reveiver or subject length is too long\0", new_socket);
         }
         else
         {
            // write file with data in directory of user who reveivces the mail
            string fullDir = argDir + '/' + receiver.substr(0, receiver.length() - 1);
            int mailId;

            if (access(fullDir.c_str(), F_OK) == -1)
            {
               mkdir(fullDir.c_str(), 0700);
               cout << "created directory " << fullDir << endl;
            }

            // critical section because filename gets created and saved on disk
            // could otherwise cause one file overwriting the other
            mtx.lock();

            // get number of files in directory, + 1 for new index
            mailId = helper.filesInDirectory(fullDir) + 1;
            string filename = fullDir + '/' + to_string(mailId) + '_' + subject.substr(0, subject.length() - 1) + ".txt";

            // check if filename exists -> increment index till filename is unique
            // it can happend that the filename with the same index and subjects exists when a file before gets deleted
            // solution would be the use of a UUID, however this is not implemented in standard c+++
            // so this rather "ugly" solution is used
            while (1)
            {
               if (helper.fileExists(filename))
               {
                  mailId++;
                  filename = fullDir + '/' + to_string(mailId) + '_' + subject.substr(0, subject.length() - 1) + ".txt";
               }
               else
               {
                  break;
               }
            }

            // create file, write mail data to file
            ofstream file;
            file.open(filename.c_str(), ios::out);
            file << sender + receiver + subject + message + ".\n\0";
            cout << "Mail " << subject.substr(0, subject.length() - 1) << " from user "
                 << sender.substr(0, sender.length() - 1) << " safed to " << filename << endl;
            serverSocket.sendMessage("OK\0", new_socket);
            file.close();
            mtx.unlock();
         }
      }

      else if (command == "LIST\n")
      {
         string user = serverSocket.recvMessage(new_socket);
         string dirPath = argDir + '/' + user.substr(0, user.length() - 1);

         // check if user exists
         if (access(dirPath.c_str(), F_OK) == -1)
         {
            buffer = "0 mails for user " + user;
            serverSocket.sendMessage(buffer.c_str(), new_socket);
         }
         else
         {
            vector<string> mails;

            // get every mail subject from directory and send to client
            mails = helper.subjectsInDirectory(dirPath);
            buffer = to_string(mails.size()) + " mails for user " + user;
            serverSocket.sendMessage(buffer.c_str(), new_socket);

            // at least 1 message lies in direcotry -> send list of messages to client
            if (mails.size() > 0)
            {
               cout << "Sent list of mails from user " << user.substr(0, user.length() - 1) << " to client" << endl;
               for (unsigned int i = 0; i < mails.size(); i++)
               {
                  // check if client is ready to recv message, without this check weird things happen
                  buffer = serverSocket.recvMessage(new_socket);
                  if (buffer == "OK")
                  {
                     serverSocket.sendMessage(mails[i].c_str(), new_socket);
                  }
               }
            }
         }
      }

      else if (command == "READ\n")
      {
         string user = serverSocket.recvMessage(new_socket);
         string mailNumber = serverSocket.recvMessage(new_socket);
         ofstream file;

         user = user.substr(0, user.length() - 1);

         if (helper.stringIsInt(mailNumber))
         {
            unsigned int mailIndex = stoi(mailNumber.substr(0, mailNumber.length() - 1)) - 1;
            string line, fulldir, dirPath = argDir + '/' + user;
            ifstream file;
            vector<string> mails;

            // check if user exists
            if (access(dirPath.c_str(), F_OK) == -1)
            {
               serverSocket.sendMessage("ERR - user does not exist\0", new_socket);
            }
            else
            {
               // get every file from directory
               mails = helper.filenamesInDirecotry(dirPath);

               // check if requested mail actually exists
               if (mailIndex < mails.size())
               {
                  fulldir = dirPath + '/' + mails[mailIndex];
                  mtx.lock();
                  file.open(fulldir.c_str());
                  if (file.is_open())
                  {
                     cout << "Sent email " << mails[mailIndex] << " informaiton from user " << user << " to client" << endl;
                     serverSocket.sendMessage("OK\0", new_socket);
                     while (getline(file, line))
                     {
                        line = line + '\n';
                        // check if client is ready to recv message, without this check weird things happen
                        buffer = serverSocket.recvMessage(new_socket);
                        if (buffer == "OK")
                        {
                           serverSocket.sendMessage(line.c_str(), new_socket);
                        }
                     }
                  }
                  else
                  {
                     serverSocket.sendMessage("ERR - cannot open mail file\0", new_socket);
                  }
                  file.close();
                  mtx.unlock();
               }
               else
               {
                  serverSocket.sendMessage("ERR - mail does not exist\0", new_socket);
               }
            }
         }
         else
         {
            serverSocket.sendMessage("ERR - mail number is not an integer\0", new_socket);
         }
      }

      else if (command == "DEL\n")
      {
         string user = serverSocket.recvMessage(new_socket);
         string mailNumber = serverSocket.recvMessage(new_socket);
         ofstream file;

         user = user.substr(0, user.length() - 1);

         if (helper.stringIsInt(mailNumber))
         {
            unsigned int mailIndex = stoi(mailNumber.substr(0, mailNumber.length() - 1)) - 1;
            string fulldir, dirPath = argDir + '/' + user;
            ifstream file;
            vector<string> mails;

            // check if user exists
            if (access(dirPath.c_str(), F_OK) == -1)
            {
               serverSocket.sendMessage("ERR - user does not exist\0", new_socket);
            }
            else
            {
               // get every file from directory
               mails = helper.filenamesInDirecotry(dirPath);

               // check if requested mail actually exists
               if (mailIndex < mails.size())
               {
                  fulldir = dirPath + '/' + mails[mailIndex];
                  mtx.lock();
                  if (remove(fulldir.c_str()) == 0)
                  {
                     cout << "Deleted mail " + mails[mailIndex] << " from user " << user << endl;
                     serverSocket.sendMessage("OK\0", new_socket);
                  }
                  else
                  {
                     serverSocket.sendMessage("ERR - cannot delete mail\0", new_socket);
                  }
                  mtx.unlock();
               }
               else
               {
                  serverSocket.sendMessage("ERR - mail does not exist\0", new_socket);
               }
            }
         }
         else
         {
            serverSocket.sendMessage("ERR - mail number is not an integer\0", new_socket);
         }
      }

   } while (command != "QUIT\n");
   cout << "Client disconnected" << endl;
   close(new_socket);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1650, %rsp           # imm = 0x1650
movq %rdi, -0x1388(%rbp)
movq %rcx, -0x1380(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3480
leaq -0x60(%rbp), %rdi
callq 0x3480
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x1390(%rbp)
jmp 0x5bff
movq -0x1390(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3460
jmp 0x5c11
leaq 0x4560(%rip), %rsi      # 0xa178
leaq -0x40(%rbp), %rdi
callq 0x4b20
movb %al, -0x1391(%rbp)
jmp 0x5c29
movb -0x1391(%rbp), %al
testb $0x1, %al
jne 0x5c38
jmp 0x6898
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x13a0(%rbp)
jmp 0x5c4d
leaq -0x91(%rbp), %rdi
movq %rdi, -0x13a8(%rbp)
callq 0x35d0
movq -0x13a0(%rbp), %rsi
movq -0x13a8(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x3470
jmp 0x5c7c
leaq -0x91(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x13b0(%rbp)
jmp 0x5c9d
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x13b8(%rbp)
callq 0x35d0
movq -0x13b0(%rbp), %rsi
movq -0x13b8(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x3470
jmp 0x5ccc
leaq -0xb9(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x13c0(%rbp)
jmp 0x5ced
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x13c8(%rbp)
callq 0x35d0
movq -0x13c0(%rbp), %rsi
movq -0x13c8(%rbp), %rdx
leaq -0xe0(%rbp), %rdi
callq 0x3470
jmp 0x5d1c
leaq -0xe1(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x13d0(%rbp)
jmp 0x5d3d
leaq -0x109(%rbp), %rdi
movq %rdi, -0x13d8(%rbp)
callq 0x35d0
movq -0x13d0(%rbp), %rsi
movq -0x13d8(%rbp), %rdx
leaq -0x108(%rbp), %rdi
callq 0x3470
jmp 0x5d6c
leaq -0x109(%rbp), %rdi
callq 0x33c0
jmp 0x5d7a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x13e0(%rbp)
jmp 0x5d8f
movq -0x13e0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3460
jmp 0x5da1
leaq 0x43d6(%rip), %rsi      # 0xa17e
leaq -0x60(%rbp), %rdi
callq 0x4b20
movb %al, -0x13e1(%rbp)
jmp 0x5db9
movb -0x13e1(%rbp), %al
testb $0x1, %al
jne 0x5dc8
jmp 0x5e96
jmp 0x5ead
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7da4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x33c0
jmp 0x7da4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb9(%rbp), %rdi
callq 0x33c0
jmp 0x6887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x687b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe1(%rbp), %rdi
callq 0x33c0
jmp 0x687b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x686f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x109(%rbp), %rdi
callq 0x33c0
jmp 0x686f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6863
leaq -0x108(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3450
jmp 0x5ea8
jmp 0x5d78
leaq -0x90(%rbp), %rdi
callq 0x34e0
cmpq $0x9, %rax
ja 0x5ee3
leaq -0xb8(%rbp), %rdi
callq 0x34e0
cmpq $0x9, %rax
ja 0x5ee3
leaq -0xe0(%rbp), %rdi
callq 0x34e0
cmpq $0x51, %rax
jbe 0x5efd
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x436f(%rip), %rsi      # 0xa260
callq 0x5ad0
jmp 0x5ef8
jmp 0x682e
movq -0x1380(%rbp), %rsi
leaq -0x150(%rbp), %rdi
movl $0x2f, %edx
callq 0x8150
jmp 0x5f17
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x13f0(%rbp)
callq 0x34e0
movq -0x13f0(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x170(%rbp), %rdi
callq 0x3380
jmp 0x5f49
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x8080
jmp 0x5f65
leaq -0x170(%rbp), %rdi
callq 0x3210
leaq -0x150(%rbp), %rdi
callq 0x3210
leaq -0x130(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
xorl %esi, %esi
callq 0x3570
cmpl $-0x1, %eax
jne 0x604c
leaq -0x130(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x31a0
movq 0x8014(%rip), %rdi      # 0xdfd0
leaq 0x41be(%rip), %rsi      # 0xa181
callq 0x3350
movq %rax, -0x13f8(%rbp)
jmp 0x5fd1
movq -0x13f8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x3300
movq %rax, -0x1400(%rbp)
jmp 0x5fed
movq -0x1400(%rbp), %rdi
movq 0x7fbd(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x6002
jmp 0x604c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x602a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3210
leaq -0x150(%rbp), %rdi
callq 0x3210
jmp 0x6863
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6820
leaq 0x8315(%rip), %rdi      # 0xe368
callq 0x81d0
jmp 0x605a
leaq -0x198(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x3160
jmp 0x606f
movq -0x1388(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3fd0
movl %eax, -0x1404(%rbp)
jmp 0x608a
movl -0x1404(%rbp), %eax
incl %eax
movl %eax, -0x174(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3210
leaq -0x238(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x2f, %edx
callq 0x8150
jmp 0x60be
movl -0x174(%rbp), %esi
leaq -0x258(%rbp), %rdi
callq 0x82a0
jmp 0x60d2
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x258(%rbp), %rdx
callq 0x8080
jmp 0x60ee
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movl $0x5f, %edx
callq 0x8250
jmp 0x6108
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1410(%rbp)
callq 0x34e0
movq -0x1410(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x278(%rbp), %rdi
callq 0x3380
jmp 0x613a
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
leaq -0x278(%rbp), %rdx
callq 0x8080
jmp 0x6156
leaq 0x4037(%rip), %rdx      # 0xa194
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x8200
jmp 0x6172
leaq -0x1d8(%rbp), %rdi
callq 0x3210
leaq -0x278(%rbp), %rdi
callq 0x3210
leaq -0x1f8(%rbp), %rdi
callq 0x3210
leaq -0x218(%rbp), %rdi
callq 0x3210
leaq -0x258(%rbp), %rdi
callq 0x3210
leaq -0x238(%rbp), %rdi
callq 0x3210
jmp 0x61bc
leaq -0x298(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3160
jmp 0x61d1
movq -0x1388(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x43a0
movb %al, -0x1411(%rbp)
jmp 0x61ec
leaq -0x298(%rbp), %rdi
callq 0x3210
movb -0x1411(%rbp), %al
testb $0x1, %al
jne 0x6207
jmp 0x64de
movl -0x174(%rbp), %eax
incl %eax
movl %eax, -0x174(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x2f, %edx
callq 0x8150
jmp 0x622f
movl -0x174(%rbp), %esi
leaq -0x358(%rbp), %rdi
callq 0x82a0
jmp 0x6243
leaq -0x318(%rbp), %rdi
leaq -0x338(%rbp), %rsi
leaq -0x358(%rbp), %rdx
callq 0x8080
jmp 0x625f
leaq -0x2f8(%rbp), %rdi
leaq -0x318(%rbp), %rsi
movl $0x5f, %edx
callq 0x8250
jmp 0x6279
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1420(%rbp)
callq 0x34e0
movq -0x1420(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x378(%rbp), %rdi
callq 0x3380
jmp 0x62ab
leaq -0x2d8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
leaq -0x378(%rbp), %rdx
callq 0x8080
jmp 0x62c7
leaq 0x3ec6(%rip), %rdx      # 0xa194
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x8200
jmp 0x62e3
leaq -0x1b8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x3420
leaq -0x2b8(%rbp), %rdi
callq 0x3210
leaq -0x2d8(%rbp), %rdi
callq 0x3210
leaq -0x378(%rbp), %rdi
callq 0x3210
leaq -0x2f8(%rbp), %rdi
callq 0x3210
leaq -0x318(%rbp), %rdi
callq 0x3210
leaq -0x358(%rbp), %rdi
callq 0x3210
leaq -0x338(%rbp), %rdi
callq 0x3210
jmp 0x64e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3210
jmp 0x6820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x63fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x63f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x63e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x63d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x63cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3210
leaq -0x278(%rbp), %rdi
callq 0x3210
leaq -0x1f8(%rbp), %rdi
callq 0x3210
leaq -0x218(%rbp), %rdi
callq 0x3210
leaq -0x258(%rbp), %rdi
callq 0x3210
leaq -0x238(%rbp), %rdi
callq 0x3210
jmp 0x6820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x3210
jmp 0x6814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x64cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x64c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x64b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x64a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x649d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x3210
leaq -0x378(%rbp), %rdi
callq 0x3210
leaq -0x2f8(%rbp), %rdi
callq 0x3210
leaq -0x318(%rbp), %rdi
callq 0x3210
leaq -0x358(%rbp), %rdi
callq 0x3210
leaq -0x338(%rbp), %rdi
callq 0x3210
jmp 0x6814
jmp 0x64e5
jmp 0x61ba
leaq -0x578(%rbp), %rdi
callq 0x3590
jmp 0x64f3
leaq -0x1b8(%rbp), %rdi
callq 0x3150
movq %rax, %rsi
leaq -0x578(%rbp), %rdi
movl $0x10, %edx
callq 0x3050
jmp 0x6515
leaq -0x5f8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x8410
jmp 0x6531
leaq -0x5d8(%rbp), %rdi
leaq -0x5f8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x83c0
jmp 0x654d
leaq -0x5b8(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0x83c0
jmp 0x6569
leaq 0x3dba(%rip), %rdx      # 0xa32a
leaq -0x598(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
callq 0x8200
jmp 0x6585
leaq -0x578(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0x3300
jmp 0x659a
leaq -0x598(%rbp), %rdi
callq 0x3210
leaq -0x5b8(%rbp), %rdi
callq 0x3210
leaq -0x5d8(%rbp), %rdi
callq 0x3210
leaq -0x5f8(%rbp), %rdi
callq 0x3210
movq 0x79ff(%rip), %rdi      # 0xdfd0
leaq 0x3bc1(%rip), %rsi      # 0xa199
callq 0x3350
movq %rax, -0x1428(%rbp)
jmp 0x65e6
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1430(%rbp)
callq 0x34e0
movq -0x1430(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x618(%rbp), %rdi
callq 0x3380
jmp 0x6618
movq -0x1428(%rbp), %rdi
leaq -0x618(%rbp), %rsi
callq 0x3300
movq %rax, -0x1438(%rbp)
jmp 0x6634
movq -0x1438(%rbp), %rdi
leaq 0x3bca(%rip), %rsi      # 0xa20c
callq 0x3350
movq %rax, -0x1440(%rbp)
jmp 0x6650
leaq -0x90(%rbp), %rdi
movq %rdi, -0x1448(%rbp)
callq 0x34e0
movq -0x1448(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x638(%rbp), %rdi
callq 0x3380
jmp 0x6682
movq -0x1440(%rbp), %rdi
leaq -0x638(%rbp), %rsi
callq 0x3300
movq %rax, -0x1450(%rbp)
jmp 0x669e
movq -0x1450(%rbp), %rdi
leaq 0x3af3(%rip), %rsi      # 0xa19f
callq 0x3350
movq %rax, -0x1458(%rbp)
jmp 0x66ba
movq -0x1458(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3300
movq %rax, -0x1460(%rbp)
jmp 0x66d6
movq -0x1460(%rbp), %rdi
movq 0x78d4(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x66eb
leaq -0x638(%rbp), %rdi
callq 0x3210
leaq -0x618(%rbp), %rdi
callq 0x3210
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x3c1d(%rip), %rsi      # 0xa32e
callq 0x5ad0
jmp 0x6718
leaq -0x578(%rbp), %rdi
callq 0x3490
jmp 0x6726
leaq 0x7c3b(%rip), %rdi      # 0xe368
callq 0x8490
jmp 0x6734
leaq -0x578(%rbp), %rdi
callq 0x34d0
leaq -0x1b8(%rbp), %rdi
callq 0x3210
leaq -0x130(%rbp), %rdi
callq 0x3210
jmp 0x682e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6808
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x67c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x67bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x67b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x3210
leaq -0x5b8(%rbp), %rdi
callq 0x3210
leaq -0x5d8(%rbp), %rdi
callq 0x3210
leaq -0x5f8(%rbp), %rdi
callq 0x3210
jmp 0x6808
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x67fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x638(%rbp), %rdi
callq 0x3210
leaq -0x618(%rbp), %rdi
callq 0x3210
leaq -0x578(%rbp), %rdi
callq 0x34d0
leaq -0x1b8(%rbp), %rdi
callq 0x3210
leaq -0x130(%rbp), %rdi
callq 0x3210
jmp 0x6863
leaq -0x108(%rbp), %rdi
callq 0x3210
leaq -0xe0(%rbp), %rdi
callq 0x3210
leaq -0xb8(%rbp), %rdi
callq 0x3210
leaq -0x90(%rbp), %rdi
callq 0x3210
jmp 0x7d24
leaq -0x108(%rbp), %rdi
callq 0x3210
leaq -0xe0(%rbp), %rdi
callq 0x3210
leaq -0xb8(%rbp), %rdi
callq 0x3210
leaq -0x90(%rbp), %rdi
callq 0x3210
jmp 0x7da4
leaq 0x390b(%rip), %rsi      # 0xa1aa
leaq -0x40(%rbp), %rdi
callq 0x4b20
movb %al, -0x1461(%rbp)
jmp 0x68b0
movb -0x1461(%rbp), %al
testb $0x1, %al
jne 0x68bf
jmp 0x6e37
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x1470(%rbp)
jmp 0x68d4
leaq -0x659(%rbp), %rdi
movq %rdi, -0x1478(%rbp)
callq 0x35d0
movq -0x1470(%rbp), %rsi
movq -0x1478(%rbp), %rdx
leaq -0x658(%rbp), %rdi
callq 0x3470
jmp 0x6903
leaq -0x659(%rbp), %rdi
callq 0x33c0
movq -0x1380(%rbp), %rsi
leaq -0x6a0(%rbp), %rdi
movl $0x2f, %edx
callq 0x8150
jmp 0x6929
leaq -0x658(%rbp), %rdi
movq %rdi, -0x1480(%rbp)
callq 0x34e0
movq -0x1480(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x6c0(%rbp), %rdi
callq 0x3380
jmp 0x695b
leaq -0x680(%rbp), %rdi
leaq -0x6a0(%rbp), %rsi
leaq -0x6c0(%rbp), %rdx
callq 0x8080
jmp 0x6977
leaq -0x6c0(%rbp), %rdi
callq 0x3210
leaq -0x6a0(%rbp), %rdi
callq 0x3210
leaq -0x680(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
xorl %esi, %esi
callq 0x3570
cmpl $-0x1, %eax
jne 0x6a9a
leaq 0x37fb(%rip), %rsi      # 0xa1b0
leaq -0x6e0(%rbp), %rdi
leaq -0x658(%rbp), %rdx
callq 0x84b0
jmp 0x69ca
leaq -0x60(%rbp), %rdi
movq %rdi, -0x1490(%rbp)
leaq -0x6e0(%rbp), %rsi
movq %rsi, -0x1498(%rbp)
callq 0x3420
movq -0x1498(%rbp), %rdi
callq 0x3210
movq -0x1490(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x1488(%rbp)
callq 0x3150
movq -0x1488(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0x5ad0
jmp 0x6a1f
jmp 0x6dfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x659(%rbp), %rdi
callq 0x33c0
jmp 0x7da4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6e26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6a78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x6c0(%rbp), %rdi
callq 0x3210
leaq -0x6a0(%rbp), %rdi
callq 0x3210
jmp 0x6e26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6e1a
leaq -0x6f8(%rbp), %rdi
callq 0x4540
leaq -0x730(%rbp), %rdi
leaq -0x680(%rbp), %rsi
callq 0x3160
jmp 0x6abb
movq -0x1388(%rbp), %rsi
leaq -0x710(%rbp), %rdi
leaq -0x730(%rbp), %rdx
callq 0x41e0
jmp 0x6ad7
leaq -0x6f8(%rbp), %rdi
movq %rdi, -0x14a0(%rbp)
leaq -0x710(%rbp), %rsi
movq %rsi, -0x14a8(%rbp)
callq 0x85c0
movq -0x14a8(%rbp), %rdi
callq 0x45d0
leaq -0x730(%rbp), %rdi
callq 0x3210
movq -0x14a0(%rbp), %rdi
callq 0x5270
movq %rax, %rsi
leaq -0x790(%rbp), %rdi
callq 0x85f0
jmp 0x6b2d
leaq 0x367d(%rip), %rdx      # 0xa1b1
leaq -0x770(%rbp), %rdi
leaq -0x790(%rbp), %rsi
callq 0x8200
jmp 0x6b49
leaq -0x750(%rbp), %rdi
leaq -0x770(%rbp), %rsi
leaq -0x658(%rbp), %rdx
callq 0x83c0
jmp 0x6b65
leaq -0x60(%rbp), %rdi
movq %rdi, -0x14b8(%rbp)
leaq -0x750(%rbp), %rsi
movq %rsi, -0x14c0(%rbp)
callq 0x3420
movq -0x14c0(%rbp), %rdi
callq 0x3210
leaq -0x770(%rbp), %rdi
callq 0x3210
leaq -0x790(%rbp), %rdi
callq 0x3210
movq -0x14b8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x14b0(%rbp)
callq 0x3150
movq -0x14b0(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0x5ad0
jmp 0x6bd2
leaq -0x6f8(%rbp), %rdi
callq 0x5270
cmpq $0x0, %rax
jbe 0x6de1
movq 0x73e1(%rip), %rdi      # 0xdfd0
leaq 0x35cc(%rip), %rsi      # 0xa1c2
callq 0x3350
movq %rax, -0x14c8(%rbp)
jmp 0x6c04
leaq -0x658(%rbp), %rdi
movq %rdi, -0x14d0(%rbp)
callq 0x34e0
movq -0x14d0(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x7b0(%rbp), %rdi
callq 0x3380
jmp 0x6c36
movq -0x14c8(%rbp), %rdi
leaq -0x7b0(%rbp), %rsi
callq 0x3300
movq %rax, -0x14d8(%rbp)
jmp 0x6c52
movq -0x14d8(%rbp), %rdi
leaq 0x3580(%rip), %rsi      # 0xa1e0
callq 0x3350
movq %rax, -0x14e0(%rbp)
jmp 0x6c6e
movq -0x14e0(%rbp), %rdi
movq 0x733c(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x6c83
leaq -0x7b0(%rbp), %rdi
callq 0x3210
movl $0x0, -0x7b4(%rbp)
movl -0x7b4(%rbp), %eax
movq %rax, -0x14e8(%rbp)
leaq -0x6f8(%rbp), %rdi
callq 0x5270
movq %rax, %rcx
movq -0x14e8(%rbp), %rax
cmpq %rcx, %rax
jae 0x6ddf
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x14f0(%rbp)
jmp 0x6cda
movq -0x14f0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3460
jmp 0x6cec
leaq 0x34f8(%rip), %rsi      # 0xa1eb
leaq -0x60(%rbp), %rdi
callq 0x4b20
movb %al, -0x14f1(%rbp)
jmp 0x6d04
movb -0x14f1(%rbp), %al
testb $0x1, %al
jne 0x6d13
jmp 0x6dc9
movq -0x10(%rbp), %rax
movq %rax, -0x1500(%rbp)
movl -0x7b4(%rbp), %eax
movl %eax, %esi
leaq -0x6f8(%rbp), %rdi
callq 0x86d0
movq %rax, %rdi
callq 0x3150
movq -0x1500(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0x5ad0
jmp 0x6d4e
jmp 0x6dc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x730(%rbp), %rdi
callq 0x3210
jmp 0x6def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6da1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x770(%rbp), %rdi
callq 0x3210
leaq -0x790(%rbp), %rdi
callq 0x3210
jmp 0x6def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x7b0(%rbp), %rdi
callq 0x3210
jmp 0x6def
jmp 0x6dcb
movl -0x7b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7b4(%rbp)
jmp 0x6c99
jmp 0x6de1
leaq -0x6f8(%rbp), %rdi
callq 0x45d0
jmp 0x6dfd
leaq -0x6f8(%rbp), %rdi
callq 0x45d0
jmp 0x6e1a
leaq -0x680(%rbp), %rdi
callq 0x3210
leaq -0x658(%rbp), %rdi
callq 0x3210
jmp 0x7d22
leaq -0x680(%rbp), %rdi
callq 0x3210
leaq -0x658(%rbp), %rdi
callq 0x3210
jmp 0x7da4
leaq 0x33b0(%rip), %rsi      # 0xa1ee
leaq -0x40(%rbp), %rdi
callq 0x4b20
movb %al, -0x1501(%rbp)
jmp 0x6e4f
movb -0x1501(%rbp), %al
testb $0x1, %al
jne 0x6e5e
jmp 0x7658
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x1510(%rbp)
jmp 0x6e73
leaq -0x7d9(%rbp), %rdi
movq %rdi, -0x1518(%rbp)
callq 0x35d0
movq -0x1510(%rbp), %rsi
movq -0x1518(%rbp), %rdx
leaq -0x7d8(%rbp), %rdi
callq 0x3470
jmp 0x6ea2
leaq -0x7d9(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x1520(%rbp)
jmp 0x6ec3
leaq -0x801(%rbp), %rdi
movq %rdi, -0x1528(%rbp)
callq 0x35d0
movq -0x1520(%rbp), %rsi
movq -0x1528(%rbp), %rdx
leaq -0x800(%rbp), %rdi
callq 0x3470
jmp 0x6ef2
leaq -0x801(%rbp), %rdi
callq 0x33c0
leaq -0xa08(%rbp), %rdi
callq 0x3590
jmp 0x6f0c
leaq -0x7d8(%rbp), %rdi
movq %rdi, -0x1530(%rbp)
callq 0x34e0
movq -0x1530(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xa28(%rbp), %rdi
callq 0x3380
jmp 0x6f3e
leaq -0x7d8(%rbp), %rdi
leaq -0xa28(%rbp), %rsi
movq %rsi, -0x1538(%rbp)
callq 0x3420
movq -0x1538(%rbp), %rdi
callq 0x3210
leaq -0xa48(%rbp), %rdi
leaq -0x800(%rbp), %rsi
callq 0x3160
jmp 0x6f79
movq -0x1388(%rbp), %rdi
leaq -0xa48(%rbp), %rsi
callq 0x3bd0
movb %al, -0x1539(%rbp)
jmp 0x6f94
leaq -0xa48(%rbp), %rdi
callq 0x3210
movb -0x1539(%rbp), %al
testb $0x1, %al
jne 0x6faf
jmp 0x75ef
leaq -0x800(%rbp), %rdi
movq %rdi, -0x1548(%rbp)
callq 0x34e0
movq -0x1548(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xa70(%rbp), %rdi
callq 0x3380
jmp 0x6fe1
xorl %eax, %eax
movl %eax, %esi
leaq -0xa70(%rbp), %rdi
movl $0xa, %edx
callq 0x44d0
movl %eax, -0x154c(%rbp)
jmp 0x6ffe
movl -0x154c(%rbp), %eax
decl %eax
movl %eax, -0x1550(%rbp)
leaq -0xa70(%rbp), %rdi
callq 0x3210
movl -0x1550(%rbp), %eax
movl %eax, -0xa4c(%rbp)
leaq -0xa90(%rbp), %rdi
callq 0x3480
leaq -0xab0(%rbp), %rdi
callq 0x3480
movq -0x1380(%rbp), %rsi
leaq -0xaf0(%rbp), %rdi
movl $0x2f, %edx
callq 0x8150
jmp 0x7056
leaq -0xad0(%rbp), %rdi
leaq -0xaf0(%rbp), %rsi
leaq -0x7d8(%rbp), %rdx
callq 0x83c0
jmp 0x7072
leaq -0xaf0(%rbp), %rdi
callq 0x3210
leaq -0xcf8(%rbp), %rdi
callq 0x3400
jmp 0x708c
leaq -0xd10(%rbp), %rdi
callq 0x4540
leaq -0xad0(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
xorl %esi, %esi
callq 0x3570
cmpl $-0x1, %eax
jne 0x71c8
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x31d3(%rip), %rsi      # 0xa298
callq 0x5ad0
jmp 0x70cc
jmp 0x7573
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x7d9(%rbp), %rdi
callq 0x33c0
jmp 0x7da4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7647
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x801(%rbp), %rdi
callq 0x33c0
jmp 0x7647
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x763b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x762f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xa48(%rbp), %rdi
callq 0x3210
jmp 0x762f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xa70(%rbp), %rdi
callq 0x3210
jmp 0x762f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x75d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xaf0(%rbp), %rdi
callq 0x3210
jmp 0x75d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x75c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x75b1
leaq -0xd48(%rbp), %rdi
leaq -0xad0(%rbp), %rsi
callq 0x3160
jmp 0x71dd
movq -0x1388(%rbp), %rsi
leaq -0xd28(%rbp), %rdi
leaq -0xd48(%rbp), %rdx
callq 0x40a0
jmp 0x71f9
leaq -0xd10(%rbp), %rdi
leaq -0xd28(%rbp), %rsi
callq 0x85c0
leaq -0xd28(%rbp), %rdi
callq 0x45d0
leaq -0xd48(%rbp), %rdi
callq 0x3210
movl -0xa4c(%rbp), %eax
movq %rax, -0x1558(%rbp)
leaq -0xd10(%rbp), %rdi
callq 0x5270
movq %rax, %rcx
movq -0x1558(%rbp), %rax
cmpq %rcx, %rax
jae 0x755a
leaq -0xd88(%rbp), %rdi
leaq -0xad0(%rbp), %rsi
movl $0x2f, %edx
callq 0x8150
jmp 0x726a
movl -0xa4c(%rbp), %eax
movl %eax, %esi
leaq -0xd10(%rbp), %rdi
callq 0x86d0
movq %rax, %rdx
leaq -0xd68(%rbp), %rdi
leaq -0xd88(%rbp), %rsi
callq 0x83c0
jmp 0x7296
leaq -0xab0(%rbp), %rdi
leaq -0xd68(%rbp), %rsi
movq %rsi, -0x1560(%rbp)
callq 0x3420
movq -0x1560(%rbp), %rdi
callq 0x3210
leaq -0xd88(%rbp), %rdi
callq 0x3210
leaq 0x7099(%rip), %rdi      # 0xe368
callq 0x81d0
jmp 0x72d6
leaq -0xab0(%rbp), %rdi
callq 0x3150
movq %rax, %rsi
leaq -0xcf8(%rbp), %rdi
movl $0x8, %edx
callq 0x3220
jmp 0x72f8
leaq -0xcf8(%rbp), %rdi
callq 0x3540
movb %al, -0x1561(%rbp)
jmp 0x730c
movb -0x1561(%rbp), %al
testb $0x1, %al
jne 0x731b
jmp 0x7525
movq 0x6cae(%rip), %rdi      # 0xdfd0
leaq 0x2ecb(%rip), %rsi      # 0xa1f4
callq 0x3350
movq %rax, -0x1570(%rbp)
jmp 0x7337
movl -0xa4c(%rbp), %eax
movl %eax, %esi
leaq -0xd10(%rbp), %rdi
callq 0x86d0
movq -0x1570(%rbp), %rdi
movq %rax, %rsi
callq 0x3300
movq %rax, -0x1578(%rbp)
jmp 0x7363
movq -0x1578(%rbp), %rdi
leaq 0x2e8f(%rip), %rsi      # 0xa200
callq 0x3350
movq %rax, -0x1580(%rbp)
jmp 0x737f
movq -0x1580(%rbp), %rdi
leaq -0x7d8(%rbp), %rsi
callq 0x3300
movq %rax, -0x1588(%rbp)
jmp 0x739b
movq -0x1588(%rbp), %rdi
leaq 0x2e37(%rip), %rsi      # 0xa1e0
callq 0x3350
movq %rax, -0x1590(%rbp)
jmp 0x73b7
movq -0x1590(%rbp), %rdi
movq 0x6bf3(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x73cc
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2f54(%rip), %rsi      # 0xa32e
callq 0x5ad0
jmp 0x73e1
jmp 0x73e3
leaq -0xcf8(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
callq 0x30a0
movq %rax, -0x1598(%rbp)
jmp 0x73ff
movq -0x1598(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3440
movb %al, -0x1599(%rbp)
jmp 0x741d
movb -0x1599(%rbp), %al
testb $0x1, %al
jne 0x742c
jmp 0x7523
leaq -0xda8(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
movl $0xa, %edx
callq 0x8150
jmp 0x7446
leaq -0xa90(%rbp), %rdi
leaq -0xda8(%rbp), %rsi
movq %rsi, -0x15b0(%rbp)
callq 0x3420
movq -0x15b0(%rbp), %rdi
callq 0x3210
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x15a8(%rbp)
jmp 0x7481
movq -0x15a8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3460
jmp 0x7493
leaq 0x2d51(%rip), %rsi      # 0xa1eb
leaq -0x60(%rbp), %rdi
callq 0x4b20
movb %al, -0x15b1(%rbp)
jmp 0x74ab
movb -0x15b1(%rbp), %al
testb $0x1, %al
jne 0x74b7
jmp 0x751e
movq -0x10(%rbp), %rax
movq %rax, -0x15c0(%rbp)
leaq -0xa90(%rbp), %rdi
callq 0x3150
movq -0x15c0(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0x5ad0
jmp 0x74e2
jmp 0x751e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd48(%rbp), %rdi
callq 0x3210
jmp 0x75b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd88(%rbp), %rdi
callq 0x3210
jmp 0x75b1
jmp 0x73e3
jmp 0x753c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2d80(%rip), %rsi      # 0xa2b3
callq 0x5ad0
jmp 0x753a
jmp 0x753c
leaq -0xcf8(%rbp), %rdi
callq 0x30b0
jmp 0x754a
leaq 0x6e17(%rip), %rdi      # 0xe368
callq 0x8490
jmp 0x7558
jmp 0x7571
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2d68(%rip), %rsi      # 0xa2d0
callq 0x5ad0
jmp 0x756f
jmp 0x7571
jmp 0x7573
leaq -0xd10(%rbp), %rdi
callq 0x45d0
leaq -0xcf8(%rbp), %rdi
callq 0x30d0
leaq -0xad0(%rbp), %rdi
callq 0x3210
leaq -0xab0(%rbp), %rdi
callq 0x3210
leaq -0xa90(%rbp), %rdi
callq 0x3210
jmp 0x7606
leaq -0xd10(%rbp), %rdi
callq 0x45d0
leaq -0xcf8(%rbp), %rdi
callq 0x30d0
leaq -0xad0(%rbp), %rdi
callq 0x3210
leaq -0xab0(%rbp), %rdi
callq 0x3210
leaq -0xa90(%rbp), %rdi
callq 0x3210
jmp 0x762f
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2cee(%rip), %rsi      # 0xa2eb
callq 0x5ad0
jmp 0x7604
jmp 0x7606
leaq -0xa08(%rbp), %rdi
callq 0x34d0
leaq -0x800(%rbp), %rdi
callq 0x3210
leaq -0x7d8(%rbp), %rdi
callq 0x3210
jmp 0x7d20
leaq -0xa08(%rbp), %rdi
callq 0x34d0
leaq -0x800(%rbp), %rdi
callq 0x3210
leaq -0x7d8(%rbp), %rdi
callq 0x3210
jmp 0x7da4
leaq 0x2bb9(%rip), %rsi      # 0xa218
leaq -0x40(%rbp), %rdi
callq 0x4b20
movb %al, -0x15c1(%rbp)
jmp 0x7670
movb -0x15c1(%rbp), %al
testb $0x1, %al
jne 0x767f
jmp 0x7d1e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x15d0(%rbp)
jmp 0x7694
leaq -0xdc9(%rbp), %rdi
movq %rdi, -0x15d8(%rbp)
callq 0x35d0
movq -0x15d0(%rbp), %rsi
movq -0x15d8(%rbp), %rdx
leaq -0xdc8(%rbp), %rdi
callq 0x3470
jmp 0x76c3
leaq -0xdc9(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a10
movq %rax, -0x15e0(%rbp)
jmp 0x76e4
leaq -0xdf1(%rbp), %rdi
movq %rdi, -0x15e8(%rbp)
callq 0x35d0
movq -0x15e0(%rbp), %rsi
movq -0x15e8(%rbp), %rdx
leaq -0xdf0(%rbp), %rdi
callq 0x3470
jmp 0x7713
leaq -0xdf1(%rbp), %rdi
callq 0x33c0
leaq -0xff8(%rbp), %rdi
callq 0x3590
jmp 0x772d
leaq -0xdc8(%rbp), %rdi
movq %rdi, -0x15f0(%rbp)
callq 0x34e0
movq -0x15f0(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x1018(%rbp), %rdi
callq 0x3380
jmp 0x775f
leaq -0xdc8(%rbp), %rdi
leaq -0x1018(%rbp), %rsi
movq %rsi, -0x15f8(%rbp)
callq 0x3420
movq -0x15f8(%rbp), %rdi
callq 0x3210
leaq -0x1038(%rbp), %rdi
leaq -0xdf0(%rbp), %rsi
callq 0x3160
jmp 0x779a
movq -0x1388(%rbp), %rdi
leaq -0x1038(%rbp), %rsi
callq 0x3bd0
movb %al, -0x15f9(%rbp)
jmp 0x77b5
leaq -0x1038(%rbp), %rdi
callq 0x3210
movb -0x15f9(%rbp), %al
testb $0x1, %al
jne 0x77d0
jmp 0x7cb8
leaq -0xdf0(%rbp), %rdi
movq %rdi, -0x1608(%rbp)
callq 0x34e0
movq -0x1608(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x1060(%rbp), %rdi
callq 0x3380
jmp 0x7802
xorl %eax, %eax
movl %eax, %esi
leaq -0x1060(%rbp), %rdi
movl $0xa, %edx
callq 0x44d0
movl %eax, -0x160c(%rbp)
jmp 0x781f
movl -0x160c(%rbp), %eax
decl %eax
movl %eax, -0x1610(%rbp)
leaq -0x1060(%rbp), %rdi
callq 0x3210
movl -0x1610(%rbp), %eax
movl %eax, -0x103c(%rbp)
leaq -0x1080(%rbp), %rdi
callq 0x3480
movq -0x1380(%rbp), %rsi
leaq -0x10c0(%rbp), %rdi
movl $0x2f, %edx
callq 0x8150
jmp 0x786b
leaq -0x10a0(%rbp), %rdi
leaq -0x10c0(%rbp), %rsi
leaq -0xdc8(%rbp), %rdx
callq 0x83c0
jmp 0x7887
leaq -0x10c0(%rbp), %rdi
callq 0x3210
leaq -0x12c8(%rbp), %rdi
callq 0x3400
jmp 0x78a1
leaq -0x12e0(%rbp), %rdi
callq 0x4540
leaq -0x10a0(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
xorl %esi, %esi
callq 0x3570
cmpl $-0x1, %eax
jne 0x79dd
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x29be(%rip), %rsi      # 0xa298
callq 0x5ad0
jmp 0x78e1
jmp 0x7c54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xdc9(%rbp), %rdi
callq 0x33c0
jmp 0x7da4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7d0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xdf1(%rbp), %rdi
callq 0x33c0
jmp 0x7d0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7d01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7cf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1038(%rbp), %rdi
callq 0x3210
jmp 0x7cf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1060(%rbp), %rdi
callq 0x3210
jmp 0x7cf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x10c0(%rbp), %rdi
callq 0x3210
jmp 0x7caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7c9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7c86
leaq -0x1318(%rbp), %rdi
leaq -0x10a0(%rbp), %rsi
callq 0x3160
jmp 0x79f2
movq -0x1388(%rbp), %rsi
leaq -0x12f8(%rbp), %rdi
leaq -0x1318(%rbp), %rdx
callq 0x40a0
jmp 0x7a0e
leaq -0x12e0(%rbp), %rdi
leaq -0x12f8(%rbp), %rsi
callq 0x85c0
leaq -0x12f8(%rbp), %rdi
callq 0x45d0
leaq -0x1318(%rbp), %rdi
callq 0x3210
movl -0x103c(%rbp), %eax
movq %rax, -0x1618(%rbp)
leaq -0x12e0(%rbp), %rdi
callq 0x5270
movq %rax, %rcx
movq -0x1618(%rbp), %rax
cmpq %rcx, %rax
jae 0x7c3b
leaq -0x1358(%rbp), %rdi
leaq -0x10a0(%rbp), %rsi
movl $0x2f, %edx
callq 0x8150
jmp 0x7a7f
movl -0x103c(%rbp), %eax
movl %eax, %esi
leaq -0x12e0(%rbp), %rdi
callq 0x86d0
movq %rax, %rdx
leaq -0x1338(%rbp), %rdi
leaq -0x1358(%rbp), %rsi
callq 0x83c0
jmp 0x7aab
leaq -0x1080(%rbp), %rdi
leaq -0x1338(%rbp), %rsi
movq %rsi, -0x1620(%rbp)
callq 0x3420
movq -0x1620(%rbp), %rdi
callq 0x3210
leaq -0x1358(%rbp), %rdi
callq 0x3210
leaq 0x6884(%rip), %rdi      # 0xe368
callq 0x81d0
jmp 0x7aeb
leaq -0x1080(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
callq 0x35f0
cmpl $0x0, %eax
jne 0x7c14
movl -0x103c(%rbp), %eax
movl %eax, %esi
leaq -0x12e0(%rbp), %rdi
callq 0x86d0
movq %rax, %rdx
leaq 0x26f7(%rip), %rsi      # 0xa21d
leaq -0x1378(%rbp), %rdi
callq 0x84b0
jmp 0x7b34
movq 0x6495(%rip), %rdi      # 0xdfd0
leaq -0x1378(%rbp), %rsi
callq 0x3300
movq %rax, -0x1628(%rbp)
jmp 0x7b50
movq -0x1628(%rbp), %rdi
leaq 0x26ae(%rip), %rsi      # 0xa20c
callq 0x3350
movq %rax, -0x1630(%rbp)
jmp 0x7b6c
movq -0x1630(%rbp), %rdi
leaq -0xdc8(%rbp), %rsi
callq 0x3300
movq %rax, -0x1638(%rbp)
jmp 0x7b88
movq -0x1638(%rbp), %rdi
movq 0x6422(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x7b9d
leaq -0x1378(%rbp), %rdi
callq 0x3210
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2777(%rip), %rsi      # 0xa32e
callq 0x5ad0
jmp 0x7bbe
jmp 0x7c2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1318(%rbp), %rdi
callq 0x3210
jmp 0x7c86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1358(%rbp), %rdi
callq 0x3210
jmp 0x7c86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1378(%rbp), %rdi
callq 0x3210
jmp 0x7c86
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x26ee(%rip), %rsi      # 0xa310
callq 0x5ad0
jmp 0x7c29
jmp 0x7c2b
leaq 0x6736(%rip), %rdi      # 0xe368
callq 0x8490
jmp 0x7c39
jmp 0x7c52
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2687(%rip), %rsi      # 0xa2d0
callq 0x5ad0
jmp 0x7c50
jmp 0x7c52
jmp 0x7c54
leaq -0x12e0(%rbp), %rdi
callq 0x45d0
leaq -0x12c8(%rbp), %rdi
callq 0x30d0
leaq -0x10a0(%rbp), %rdi
callq 0x3210
leaq -0x1080(%rbp), %rdi
callq 0x3210
jmp 0x7ccf
leaq -0x12e0(%rbp), %rdi
callq 0x45d0
leaq -0x12c8(%rbp), %rdi
callq 0x30d0
leaq -0x10a0(%rbp), %rdi
callq 0x3210
leaq -0x1080(%rbp), %rdi
callq 0x3210
jmp 0x7cf5
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x2625(%rip), %rsi      # 0xa2eb
callq 0x5ad0
jmp 0x7ccd
jmp 0x7ccf
leaq -0xff8(%rbp), %rdi
callq 0x34d0
leaq -0xdf0(%rbp), %rdi
callq 0x3210
leaq -0xdc8(%rbp), %rdi
callq 0x3210
jmp 0x7d1e
leaq -0xff8(%rbp), %rdi
callq 0x34d0
leaq -0xdf0(%rbp), %rdi
callq 0x3210
leaq -0xdc8(%rbp), %rdi
callq 0x3210
jmp 0x7da4
jmp 0x7d20
jmp 0x7d22
jmp 0x7d24
jmp 0x7d26
leaq 0x24fe(%rip), %rsi      # 0xa22b
leaq -0x40(%rbp), %rdi
callq 0x4510
movb %al, -0x1639(%rbp)
jmp 0x7d3e
movb -0x1639(%rbp), %al
testb $0x1, %al
jne 0x5bea
jmp 0x7d4e
movq 0x627b(%rip), %rdi      # 0xdfd0
leaq 0x24d5(%rip), %rsi      # 0xa231
callq 0x3350
movq %rax, -0x1648(%rbp)
jmp 0x7d6a
movq -0x1648(%rbp), %rdi
movq 0x6240(%rip), %rsi      # 0xdfb8
callq 0x3390
jmp 0x7d7f
movl -0x14(%rbp), %edi
callq 0x3630
jmp 0x7d89
leaq -0x60(%rbp), %rdi
callq 0x3210
leaq -0x40(%rbp), %rdi
callq 0x3210
addq $0x1650, %rsp           # imm = 0x1650
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0x3210
leaq -0x40(%rbp), %rdi
callq 0x3210
movq -0x68(%rbp), %rdi
callq 0x35c0
nop