// File: /workspace/github_cpp_makefile_star2_O2/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: main
int main(int argc, char* argv[])
{
   try {
      string filename = "hours.txt";
      if (argc > 1)
      {
         if (argv[1][0] == '-' || argv[1][0] == '/')
         {
            cout << "Usage:\n"
                    " hours_calc [input_filename [main_txt_stats_output_filename [csv_stats_output_filename [cutoff_year]]]]\n"
                    " By default:\n"
                    "  input_filename = hours.txt\n"
                    "  main_txt_stats_output_filename = hour_stats.txt\n"
                    "  csv_stats_output_filename = hour_stats.csv\n"
                    "  cutoff_year = 2010" << endl;
            return 0;
         }
         filename = argv[1];
      }
      ifstream ifs(filename.c_str());
      if (!ifs.is_open())
         ERROR("Unable to open file \"" << filename << "\"");

      skipUTF8BOM(&ifs);

      string ofilename = "hour_stats.txt";   // Also a default.
      if (argc > 2)
         ofilename = argv[2];
      ofstream ofs(ofilename.c_str());
      if (!ofs.is_open())
         ERROR("Unable to open file \"" << ofilename << "\"");

      string ofilename2 = "hour_stats.csv";   // Also a default.
      if (argc > 3)
         ofilename2 = argv[3];
      ofstream ofs2;
      if(ofilename2 != ofilename)
      {
         ofs2.open(ofilename2.c_str());
         if (!ofs2.is_open())
            ERROR("Unable to open file \"" << ofilename2 << "\"");
      }

      unsigned cutoffYear = 2010;
      if (argc > 4)
         cutoffYear = stoi(string(argv[4]));

      std::ostream& oss = ofs;
      std::ostream& oss2 = ofilename2 != ofilename ? ofs2 : ofs;

      oss << "Hours calculator" << endl;
      oss << "   Calculating only from year " << cutoffYear << endl;

      MinutesMap minutesMap;

      typedef map<pair<string, string>, unsigned> DMap;  // <person, day> - minutes
      DMap dayMinutes;

      unsigned numLines = 0;
      bool expectsNewDate = true;
      bool expectsHourLines = false;
      YearMon curYearMon;
      unsigned curDay = 0;
      string curDayStr;
      while (!ifs.eof() && ifs.peek() != std::ifstream::traits_type::eof())
      {
         string line = loadStrLine(ifs);
         ++numLines;

         if (isEmptyOrWhitespace(line))
         {
            // Empty lines separate dates.
            expectsNewDate = true;
            expectsHourLines = false;
            continue;
         }

         assert(!(expectsNewDate & expectsHourLines));

         if (expectsNewDate)
         {
            vector<string> ss = splitIntoTokens(line, ".:- \t");

            if (ss.size() >= 3)
            {
               unsigned year,mon,day;
               try
               {
                  year = stoi(ss[0]);
                  mon = stoi(ss[1]);
                  day = stoi(ss[2]);
               }
               catch (exception)
               {
                  continue;
               }

               expectsNewDate = false;
               expectsHourLines = true;

               curYearMon = YearMon(year, mon);
               curDay = day;
               curDayStr = line;
               while (isspace(curDayStr.back()))
                  curDayStr.pop_back();

               if (year < 2010)
                  break;
            }

            continue;
         }

         if (expectsHourLines)
         {
            vector<string> ss = splitIntoTokens(line, " \t", "[/");

            // something without a name and 2 hour:minute entries can only be a comment
            if (ss.size() < 3)
               continue;

            string person = ss[0];

            // Something starting with punctuation or a number etc. is not a name - assume a comment line
            if ( person[0] > ' ' && person[0] < 'A')
               continue;

            // Remove the recommended but optional : behind the name
            if (person[person.size() - 1] == ':')
               person = person.substr(0, person.size() - 1);
            person = upperCase(person);

            vector<HourMin> hms;
            size_t i = 1;
            while (i < ss.size())
            {
               if(!isdigit(ss[i][0]))
               {
                  if (ss[i][0] == '[' ||
                      ss[i][0] == '#' ||
                      (ss[i][0]=='/' && ss[i].size()>=2 && ss[i][1]=='/')  // //
                     )
                  {
                     // A comment or category from here on.
                     break;
                  }
                  else
                  {
                     ++i;
                     continue;
                  }
               }
               HourMin hm;
               if (!parseHourMin(&hm, ss[i]))
                  break;
               hms.push_back(hm);
               ++i;
            }

            // Skip the lines with 0 valid time entries.
            if (!hms.size())
               continue;

            unsigned totalMinutesForLine = 0;

            for (size_t j = 0; j + 1 < hms.size(); j += 2)
            {
               HourMin hm1 = hms[j];
               HourMin hm2 = hms[j + 1];
               unsigned minutes = hm2 - hm1;
               totalMinutesForLine += minutes;
            }
            if ((hms.size() % 2) != 0)
            {
               oss << "WARNING: Uneven number of time entries for " << curYearMon << "-" << curDay << " in line " << numLines << ": \"" << line << "\"" << endl;
               continue;
            }

            string typeOfWork;
            if (i != ss.size())
            {
               if ((ss[i][0] == '[') && (ss[i][ ss[i].size() - 1 ] == ']'))
                  typeOfWork = upperCase( ss[i].substr(1, ss[i].size() - 2) );
            }
            vector<string> typesOfWork = splitIntoTokens(typeOfWork, "\\/,");
            if (typesOfWork.empty())
               typesOfWork.push_back("UNASSIGNED");
            typeOfWork.clear();

#ifdef DO_NOT_SPLIT_TYPES_OF_WORK
            sort(typesOfWork.begin(), typesOfWork.end());
            for (size_t k = 0; k < typesOfWork.size(); ++k)
            {
               if (!typeOfWork.empty())
                  typeOfWork.push_back('/');
               typeOfWork += typesOfWork[k];
            }
            minutesMap.update(person, curYearMon, typeOfWork, totalMinutesForLine);
#else
            double iTypesOfWorkSize;
            iTypesOfWorkSize = 1.0 / typesOfWork.size();
            for (auto& tow : typesOfWork)
                minutesMap.update(person, curYearMon, tow, unsigned(totalMinutesForLine * iTypesOfWorkSize));
#endif
            if (dayMinutes.find(make_pair(person, curDayStr)) == dayMinutes.end())
               dayMinutes[make_pair(person, curDayStr)] = totalMinutesForLine;
            else
               dayMinutes[make_pair(person, curDayStr)] += totalMinutesForLine;
         }
      }

      oss << "number of lines: " << numLines << endl;

      // All people.
      for (auto pi = minutesMap.s.cbegin(); pi != minutesMap.s.cend(); ++pi)
      {
         oss << endl;
         oss << pi->first << ":" << endl;

         // All months per person.
         for (auto pmi = pi->second.s.cbegin(); pmi != pi->second.s.cend(); ++pmi)
         {
            // All work types per month (per person).
            oss << "   " << pmi->first << ":" << endl;
            for (auto mi = pmi->second.s.begin(); mi != pmi->second.s.end(); ++mi)
               oss << "      " << expandStr(mi->first + ':', 12) << " " << hoursMinsStr(mi->second, 12) << "   ( " << mi->second << " m )" << endl;
            unsigned total = pmi->second.calcTotal();
            oss << "      " << expandStr("*:", 12) << " " << hoursMinsStr(total, 12) << "   ( " << total << " m )" << endl;
         }

         {
            // All work types for all months.
            oss << "   all time sum:" << endl;
            for (auto mi = pi->second.workTypesForAll.s.cbegin(); mi != pi->second.workTypesForAll.s.cend(); ++mi)
               oss << "      " << expandStr(mi->first + ':', 12) << " " << hoursMinsStr(mi->second, 12) << "   ( " << mi->second << " m )" << endl;
            unsigned total = pi->second.workTypesForAll.calcTotal();
            oss << "      " << expandStr("*:", 12) << " " << hoursMinsStr(total, 12) << "   ( " << total << " m )" << endl;
         }
      }

      /// For all people combined.
      {
         oss << endl;
         oss << "The whole crew combined" << ":" << endl;

         // All months per person.
         for (auto pmi = minutesMap.statsForWorkTypesForAll.s.begin(); pmi != minutesMap.statsForWorkTypesForAll.s.end(); ++pmi)
         {
            // All work types per month (per person).
            oss << "   " << pmi->first << ":" << endl;
            for (auto mi = pmi->second.s.begin(); mi != pmi->second.s.end(); ++mi)
               oss << "      " << expandStr(mi->first + ':', 12) << " " << hoursMinsStr(mi->second, 12) << "   ( " << mi->second << " m )" << endl;
            unsigned total = pmi->second.calcTotal();
            oss << "      " << expandStr("*:", 12) << " " << hoursMinsStr(total, 12) << "   ( " << total << " m )" << endl;
         }

         {
            // All work types for all months.
            oss << "   all time sum:" << endl;
            for (auto mi = minutesMap.statsForWorkTypesForAll.workTypesForAll.s.begin();
                 mi != minutesMap.statsForWorkTypesForAll.workTypesForAll.s.end(); ++mi)
               oss << "      " << expandStr(mi->first + ':', 12) << " " << hoursMinsStr(mi->second, 12) << "   ( " << mi->second << " m )" << endl;
            unsigned total = minutesMap.statsForWorkTypesForAll.workTypesForAll.calcTotal();
            oss << "      " << expandStr("*:", 12) << " " << hoursMinsStr(total, 12) << "   ( " << total << " m )" << endl;
         }
      }

      oss << endl;

      oss2 << "Person\tDay\tHours\n";
      for (auto it = dayMinutes.begin(); it!=dayMinutes.end(); ++it)
      {
         oss2 <<it->first.first<<"\t" << it->first.second << "\t" << fixed << setprecision(9)<< it->second / 60.0 << endl;
      }

      return 0;
   }
   catch (std::exception& e)
   {
      ERROR(e.what());
   }
   catch (...)
   {
      ERROR("Unknown exception");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x898, %rsp            # imm = 0x898
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x3605(%rip), %rsi      # 0x60e0
leaq -0x220(%rbp), %rdi
leaq -0x6b8(%rbp), %rdx
callq 0x20f0
cmpl $0x2, %r14d
jl 0x2b31
movq 0x8(%rbx), %rsi
movzbl (%rsi), %eax
orl $0x2, %eax
cmpl $0x2f, %eax
jne 0x2b25
movq 0x74be(%rip), %rdi      # 0x9fc8
leaq 0x35d9(%rip), %rsi      # 0x60ea
callq 0x21f0
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x2130
jmp 0x3f7d
leaq -0x220(%rbp), %rdi
callq 0x23b0
movq -0x220(%rbp), %rsi
leaq -0x6b8(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x23a0
leaq -0x640(%rbp), %rdi
callq 0x2090
testb %al, %al
je 0x342a
leaq -0x6b8(%rbp), %rdi
callq 0x2a72
leaq 0x36a7(%rip), %rsi      # 0x6215
leaq -0x1d0(%rbp), %rdi
leaq -0x4b0(%rbp), %rdx
callq 0x20f0
cmpl $0x3, %r14d
jl 0x2b97
movq 0x10(%rbx), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x23b0
movq -0x1d0(%rbp), %rsi
leaq -0x4b0(%rbp), %r15
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x2240
leaq -0x440(%rbp), %rdi
callq 0x2090
testb %al, %al
je 0x347a
leaq 0x3659(%rip), %rsi      # 0x6224
leaq -0x1b0(%rbp), %rdi
leaq -0x8b8(%rbp), %rdx
callq 0x20f0
cmpl $0x4, %r14d
jl 0x2bf4
movq 0x18(%rbx), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x23b0
leaq -0x8b8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x2380
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x439a
testb %al, %al
je 0x2c48
movq -0x1b0(%rbp), %rsi
leaq -0x8b8(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x2050
leaq -0x848(%rbp), %rdi
callq 0x2090
testb %al, %al
je 0x3ef6
movl $0x7da, %r12d           # imm = 0x7DA
cmpl $0x5, %r14d
jl 0x2c8d
movq 0x20(%rbx), %rsi
leaq -0x2b0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0x20f0
leaq -0x2b0(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x4379
movl %eax, %ebx
leaq -0x2b0(%rbp), %rdi
callq 0x2120
movl %ebx, %r12d
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x439a
testb %al, %al
movq -0xa0(%rbp), %rax
cmoveq %r15, %rax
movq %rax, -0xa0(%rbp)
leaq 0x3578(%rip), %rsi      # 0x6233
movq %r15, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq 0x3572(%rip), %rsi      # 0x6244
leaq -0x4b0(%rbp), %rdi
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x2130
leaq -0x2b0(%rbp), %rdi
callq 0x43a8
leaq -0x1f8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x150(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movb $0x1, %al
movl %eax, -0x38(%rbp)
movq $0x0, -0x60(%rbp)
leaq -0x6b8(%rbp), %r14
leaq -0x90(%rbp), %r15
pushq $0xa
popq %r12
movq 0x726e(%rip), %rax      # 0x9fc0
addq $0x10, %rax
movq %rax, -0x190(%rbp)
leaq -0x58(%rbp), %r13
movl $0x0, -0x30(%rbp)
movl $0x0, -0x98(%rbp)
movq -0x6b8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x698(%rbp,%rax)
jne 0x34ca
movq %r14, %rdi
callq 0x20e0
cmpl $-0x1, %eax
je 0x34ca
movq %r15, %rdi
movq %r14, %rsi
callq 0x25ad
incl -0x98(%rbp)
movq %r15, %rdi
callq 0x25ed
testb %al, %al
je 0x2dcc
movb $0x1, %al
movl %eax, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
xorl %ebx, %ebx
jmp 0x3033
movl -0x30(%rbp), %eax
movl -0x38(%rbp), %ecx
andb %cl, %al
testb $0x1, %al
jne 0x3f9d
testb $0x1, %cl
je 0x2eb0
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
leaq 0x34a9(%rip), %rdx      # 0x629f
leaq 0x34a7(%rip), %rcx      # 0x62a4
callq 0x2807
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rax
subq %rdi, %rax
cmpq $0x41, %rax
jb 0x2ff9
movl %r12d, %r14d
movq %r15, %r12
xorl %esi, %esi
movl %r14d, %edx
callq 0x4379
movl %eax, %ebx
movq -0xe0(%rbp), %rdi
addq $0x20, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x4379
movl %eax, %r13d
movq -0xe0(%rbp), %rdi
addq $0x40, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x4379
movl %eax, %r15d
shlq $0x20, %r13
movl %ebx, %eax
orq %r13, %rax
movq %rax, -0x120(%rbp)
leaq -0x160(%rbp), %rdi
movq %r12, %rsi
callq 0x2160
leaq -0x58(%rbp), %r13
movq -0x160(%rbp), %rax
movq -0x158(%rbp), %rcx
movsbl -0x1(%rax,%rcx), %edi
callq 0x2060
testl %eax, %eax
je 0x2ffd
leaq -0x160(%rbp), %rdi
callq 0x2280
jmp 0x2e82
testb $0x1, -0x30(%rbp)
je 0x2dc5
leaq -0x118(%rbp), %rdi
movq %r15, %rsi
leaq 0x33d7(%rip), %rdx      # 0x62a2
leaq 0x33d3(%rip), %rcx      # 0x62a5
callq 0x2807
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rax
subq %rsi, %rax
cmpq $0x41, %rax
jb 0x33c7
movq %r13, %rdi
callq 0x22f0
movq -0x58(%rbp), %rax
movb (%rax), %cl
addb $-0x21, %cl
cmpb $0x20, %cl
jb 0x33bf
movq -0x50(%rbp), %rcx
cmpb $0x3a, -0x1(%rax,%rcx)
leaq -0xe0(%rbp), %r14
leaq -0x180(%rbp), %r12
jne 0x2f48
decq %rcx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2210
movq %r13, %rdi
movq %r14, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x2120
movq %r14, %rdi
movq %r13, %rsi
callq 0x2665
movq %r13, %rdi
movq %r14, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x2120
andq $0x0, -0x170(%rbp)
xorpd %xmm0, %xmm0
movapd %xmm0, -0x180(%rbp)
pushq $0x20
popq %rbx
pushq $0x1
popq %r15
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r15
jae 0x3048
movq (%rsi,%rbx), %rax
movsbl (%rax), %ecx
leal -0x30(%rcx), %edx
cmpl $0xa, %edx
jae 0x2fce
addq %rbx, %rsi
movq %r14, %rdi
callq 0x29ac
testb %al, %al
je 0x3048
movq %r12, %rdi
movq %r14, %rsi
callq 0x43d0
jmp 0x2ff0
movzbl %cl, %ecx
cmpl $0x2f, %ecx
je 0x2fe2
cmpl $0x23, %ecx
je 0x3048
cmpl $0x5b, %ecx
jne 0x2ff0
jmp 0x3048
cmpq $0x2, 0x8(%rsi,%rbx)
jb 0x2ff0
cmpb $0x2f, 0x1(%rax)
je 0x3048
incq %r15
addq $0x20, %rbx
jmp 0x2f81
xorl %ebx, %ebx
jmp 0x3027
cmpl $0x7da, %ebx            # imm = 0x7DA
setb %bl
movb $0x1, %al
movl %eax, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movl %r15d, %eax
movq %rax, -0x60(%rbp)
leaq -0x6b8(%rbp), %r14
movq %r12, %r15
pushq $0xa
popq %r12
leaq -0xe0(%rbp), %rdi
callq 0x434e
movq %r15, %rdi
callq 0x2120
testb %bl, %bl
je 0x2d72
jmp 0x34ca
movq -0x180(%rbp), %rdx
movq -0x178(%rbp), %rax
movq %rax, %r12
subq %rdx, %r12
movq %rdx, -0x68(%rbp)
subq %rdx, %rax
je 0x33a1
movq %rax, -0x188(%rbp)
sarq $0x3, %r12
xorl %eax, %eax
pushq $0x1
popq %r13
cmpq %r12, %r13
jae 0x30c8
movq %rbx, %r14
movq %r15, %rbx
movl %eax, %r15d
movq -0x68(%rbp), %rdx
movq -0x8(%rdx,%r13,8), %rax
movq %rax, -0xe0(%rbp)
movq (%rdx,%r13,8), %rax
movq %rax, -0x100(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x250c
addl %eax, %r15d
movl %r15d, %eax
movq %rbx, %r15
movq %r14, %rbx
addq $0x2, %r13
jmp 0x307a
testb $0x8, -0x188(%rbp)
jne 0x3260
movl %eax, -0x68(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x100(%rbp)
andq $0x0, -0xf8(%rbp)
movb $0x0, -0xf0(%rbp)
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
leaq -0x2b0(%rbp), %r13
leaq -0xe0(%rbp), %r14
je 0x3175
movq (%rsi,%rbx), %rax
cmpb $0x5b, (%rax)
jne 0x3175
movq 0x8(%rsi,%rbx), %rcx
cmpb $0x5d, -0x1(%rax,%rcx)
jne 0x3175
addq %rbx, %rsi
addq $-0x2, %rcx
leaq -0x140(%rbp), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rdx
callq 0x2210
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2665
leaq -0x100(%rbp), %rdi
movq %r14, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2120
leaq -0x140(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq 0x315a(%rip), %rdx      # 0x62e4
leaq 0x3113(%rip), %rcx      # 0x62a4
callq 0x2807
movq -0x140(%rbp), %rax
cmpq -0x138(%rbp), %rax
jne 0x31d0
movq %r14, %rdi
leaq 0x3138(%rip), %rsi      # 0x62e8
leaq -0x69(%rbp), %rdx
callq 0x20f0
leaq -0x140(%rbp), %rdi
movq %r14, %rsi
callq 0x5a12
movq %r14, %rdi
callq 0x2120
andq $0x0, -0xf8(%rbp)
movq -0x100(%rbp), %rax
movb $0x0, (%rax)
movq -0x140(%rbp), %rbx
movq -0x138(%rbp), %r12
movq %r12, %rax
subq %rbx, %rax
sarq $0x5, %rax
movq %rax, %xmm0
punpckldq 0x2e19(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2e21(%rip), %xmm0     # 0x6030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x2ded(%rip), %xmm0     # 0x6010
movl -0x68(%rbp), %eax
cvtsi2sd %rax, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %r15
cmpq %r12, %rbx
je 0x32f7
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
leaq -0x120(%rbp), %rdx
movq %rbx, %rcx
movl %r15d, %r8d
callq 0x43f4
addq $0x20, %rbx
jmp 0x3238
leaq -0x4b0(%rbp), %rdi
leaq 0x303a(%rip), %rsi      # 0x62a8
callq 0x21f0
leaq -0x58(%rbp), %r13
movq %rax, %rdi
leaq -0x120(%rbp), %rsi
callq 0x2549
movq %rax, %rdi
leaq 0x3044(%rip), %rsi      # 0x62d4
callq 0x21f0
movl -0x60(%rbp), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x302c(%rip), %rsi      # 0x62d6
callq 0x21f0
movl -0x98(%rbp), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x3019(%rip), %rsi      # 0x62e0
callq 0x21f0
movq %rax, %rdi
leaq -0x90(%rbp), %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2ffd(%rip), %rsi      # 0x62e2
callq 0x21f0
movq %rax, %rdi
callq 0x2130
jmp 0x33a1
movq %r14, %rdi
leaq -0x58(%rbp), %r13
movq %r13, %rsi
leaq -0x160(%rbp), %rdx
callq 0x5564
leaq -0x200(%rbp), %rdi
movq %r14, %rsi
callq 0x5b04
movq %rax, %rbx
movq %r14, %rdi
callq 0x443c
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rbx
je 0x335b
movq %r14, %rdi
movq %r13, %rsi
leaq -0x160(%rbp), %rdx
callq 0x5564
leaq -0x200(%rbp), %rdi
movq %r14, %rsi
callq 0x445c
movl -0x68(%rbp), %ecx
addl %ecx, (%rax)
jmp 0x3381
movq %r14, %rdi
movq %r13, %rsi
leaq -0x160(%rbp), %rdx
callq 0x5564
leaq -0x200(%rbp), %rdi
movq %r14, %rsi
callq 0x445c
movl -0x68(%rbp), %ecx
movl %ecx, (%rax)
movq %r14, %rdi
callq 0x443c
leaq -0x140(%rbp), %rdi
callq 0x434e
leaq -0x100(%rbp), %rdi
callq 0x2120
leaq -0x180(%rbp), %rdi
callq 0x58b0
leaq -0x6b8(%rbp), %r14
leaq -0x90(%rbp), %r15
pushq $0xa
popq %r12
movq %r13, %rdi
callq 0x2120
leaq -0x118(%rbp), %rdi
callq 0x434e
jmp 0x2dc5
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x2, %r15d
jne 0x407d
movq %rbx, %rdi
callq 0x22a0
movq -0x190(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rbx, %rdi
callq 0x2100
leaq -0x58(%rbp), %rdi
callq 0x23c0
callq 0x2370
xorl %ebx, %ebx
leaq -0x6b8(%rbp), %r14
movq %r12, %r15
pushq $0xa
popq %r12
leaq -0x58(%rbp), %r13
jmp 0x3027
movq 0x6bbf(%rip), %rdi      # 0x9ff0
leaq 0x2dbf(%rip), %rsi      # 0x61f7
callq 0x21f0
leaq 0x2dbb(%rip), %rsi      # 0x61ff
movq %rax, %rdi
callq 0x21f0
leaq -0x220(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x2e80(%rip), %rsi      # 0x62e2
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
pushq $-0x1
popq %rbx
jmp 0x3f71
movq 0x6b6f(%rip), %rdi      # 0x9ff0
leaq 0x2d6f(%rip), %rsi      # 0x61f7
callq 0x21f0
leaq 0x2d6b(%rip), %rsi      # 0x61ff
movq %rax, %rdi
callq 0x21f0
leaq -0x1d0(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x2e30(%rip), %rsi      # 0x62e2
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
pushq $-0x1
popq %rbx
jmp 0x3f59
leaq 0x2e22(%rip), %rsi      # 0x62f3
leaq -0x4b0(%rbp), %rdi
callq 0x21f0
movl -0x98(%rbp), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x2130
leaq -0x2a8(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0xe0(%rbp), %r13
pushq $0xc
popq %rbx
leaq -0x2a8(%rbp), %rax
movq %rcx, -0x60(%rbp)
cmpq %rax, %rcx
je 0x399b
leaq -0x4b0(%rbp), %rdi
callq 0x2130
movq -0x60(%rbp), %rax
leaq 0x20(%rax), %rsi
leaq -0x4b0(%rbp), %rdi
callq 0x21d0
movq %rax, %rdi
leaq 0x2dd2(%rip), %rsi      # 0x6318
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq -0x60(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x48, %rax
movq %rax, -0x68(%rbp)
movq %rcx, -0x38(%rbp)
cmpq -0x68(%rbp), %rcx
je 0x3797
leaq -0x4b0(%rbp), %rdi
leaq 0x2d89(%rip), %rsi      # 0x6308
callq 0x21f0
movq -0x38(%rbp), %rcx
leaq 0x20(%rcx), %rsi
movq %rax, %rdi
callq 0x2549
movq %rax, %rdi
leaq 0x2d7a(%rip), %rsi      # 0x6318
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq -0x38(%rbp), %rax
leaq 0x28(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x40(%rax), %r14
addq $0x30, %rax
movq %rax, -0x30(%rbp)
cmpq -0x30(%rbp), %r14
je 0x36ae
leaq -0x4b0(%rbp), %rdi
leaq 0x2d27(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq 0x20(%r14), %rsi
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x3a
popq %rdx
callq 0x44c5
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
pushq $0xc
popq %rbx
movq %rbx, %rdx
callq 0x269f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2ce1(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
movl 0x40(%r14), %esi
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rdx
callq 0x271a
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2cb3(%rip), %rsi      # 0x630c
callq 0x21f0
movl 0x40(%r14), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x2c9e(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2250
movq %rax, %r14
jmp 0x35c6
movq -0x98(%rbp), %rdi
callq 0x4500
movl %eax, %r14d
leaq -0x4b0(%rbp), %rdi
leaq 0x2c3a(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq -0x90(%rbp), %r12
movq %r12, %rdi
leaq 0x2c33(%rip), %rsi      # 0x6317
leaq -0x100(%rbp), %rdx
callq 0x20f0
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x269f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2bf7(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x271a
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2bca(%rip), %rsi      # 0x630c
callq 0x21f0
movl %r14d, %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x2bb6(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq -0x38(%rbp), %rdi
callq 0x2250
movq %rax, %rcx
jmp 0x3563
leaq -0x4b0(%rbp), %rdi
leaq 0x2b75(%rip), %rsi      # 0x631a
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq -0x60(%rbp), %rax
leaq 0x70(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x88(%rax), %r14
addq $0x78, %rax
movq %rax, -0x30(%rbp)
cmpq -0x30(%rbp), %r14
je 0x38b5
leaq -0x4b0(%rbp), %rdi
leaq 0x2b20(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq 0x20(%r14), %rsi
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x3a
popq %rdx
callq 0x44c5
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
pushq $0xc
popq %rbx
movq %rbx, %rdx
callq 0x269f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2ada(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
movl 0x40(%r14), %esi
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rdx
callq 0x271a
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2aac(%rip), %rsi      # 0x630c
callq 0x21f0
movl 0x40(%r14), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x2a97(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2250
movq %rax, %r14
jmp 0x37cd
movq -0x38(%rbp), %rdi
callq 0x4500
movl %eax, %r14d
leaq -0x4b0(%rbp), %rdi
leaq 0x2a36(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq -0x90(%rbp), %r12
movq %r12, %rdi
leaq 0x2a2f(%rip), %rsi      # 0x6317
leaq -0x100(%rbp), %rdx
callq 0x20f0
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x269f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x29f3(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x271a
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x29c6(%rip), %rsi      # 0x630c
callq 0x21f0
movl %r14d, %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x29b2(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq -0x60(%rbp), %rdi
callq 0x2250
movq %rax, %rcx
jmp 0x3508
leaq -0x4b0(%rbp), %rdi
callq 0x2130
leaq 0x297d(%rip), %rsi      # 0x632b
leaq -0x4b0(%rbp), %rdi
callq 0x21f0
leaq 0x2957(%rip), %rsi      # 0x6318
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x278(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0x278(%rbp), %rax
movq %rcx, -0x30(%rbp)
cmpq %rax, %rcx
je 0x3c17
leaq -0x4b0(%rbp), %rdi
leaq 0x290a(%rip), %rsi      # 0x6308
callq 0x21f0
movq -0x30(%rbp), %rcx
leaq 0x20(%rcx), %rsi
movq %rax, %rdi
callq 0x2549
movq %rax, %rdi
leaq 0x28fb(%rip), %rsi      # 0x6318
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq -0x30(%rbp), %rax
leaq 0x28(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x40(%rax), %r14
leaq 0x30(%rax), %r12
cmpq %r12, %r14
je 0x3b26
leaq -0x4b0(%rbp), %rdi
leaq 0x28b0(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq 0x20(%r14), %rsi
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x3a
popq %rdx
callq 0x44c5
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
pushq $0xc
popq %rdx
callq 0x269f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x286d(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
movl 0x40(%r14), %esi
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
pushq $0xc
popq %rdx
callq 0x271a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x283f(%rip), %rsi      # 0x630c
callq 0x21f0
movl 0x40(%r14), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x282a(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq %r14, %rdi
callq 0x21a0
movq %rax, %r14
jmp 0x3a3e
movq -0x38(%rbp), %rdi
callq 0x4500
movl %eax, %r14d
leaq -0x4b0(%rbp), %rdi
leaq 0x27c5(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
leaq 0x27be(%rip), %rsi      # 0x6317
leaq -0x100(%rbp), %rdx
callq 0x20f0
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
pushq $0xc
popq %rdx
callq 0x269f
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x277b(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
pushq $0xc
popq %rdx
callq 0x271a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x274e(%rip), %rsi      # 0x630c
callq 0x21f0
movl %r14d, %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x273a(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
movq -0x30(%rbp), %rdi
callq 0x21a0
movq %rax, %rcx
jmp 0x39dc
leaq 0x26fc(%rip), %rsi      # 0x631a
leaq -0x4b0(%rbp), %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x250(%rbp), %rax
movq 0x18(%rax), %r12
leaq -0x90(%rbp), %r13
leaq -0xe0(%rbp), %r14
leaq -0x58(%rbp), %rbx
leaq -0x248(%rbp), %rax
cmpq %rax, %r12
je 0x3d26
leaq -0x4b0(%rbp), %rdi
leaq 0x2698(%rip), %rsi      # 0x6305
callq 0x21f0
movq %rax, %r15
leaq 0x20(%r12), %rsi
movq %r13, %rdi
pushq $0x3a
popq %rdx
callq 0x44c5
movq %r14, %rdi
movq %r13, %rsi
pushq $0xc
popq %rdx
callq 0x269f
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2662(%rip), %rsi      # 0x630a
callq 0x21f0
movq %rax, %r15
movl 0x40(%r12), %esi
movq %rbx, %rdi
pushq $0xc
popq %rdx
callq 0x271a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x2637(%rip), %rsi      # 0x630c
callq 0x21f0
movl 0x40(%r12), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
leaq 0x2621(%rip), %rsi      # 0x6312
callq 0x21f0
movq %rax, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
movq %r12, %rdi
callq 0x21a0
movq %rax, %r12
jmp 0x3c4f
leaq -0x250(%rbp), %rdi
callq 0x4500
movl %eax, %ebx
leaq 0x25ca(%rip), %rsi      # 0x6305
leaq -0x4b0(%rbp), %rdi
callq 0x21f0
movq %rax, %r14
leaq 0x25c6(%rip), %rsi      # 0x6317
leaq -0x90(%rbp), %rdi
leaq -0x100(%rbp), %rdx
callq 0x20f0
leaq -0xe0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
pushq $0xc
popq %rdx
callq 0x269f
leaq -0xe0(%rbp), %rsi
movq %r14, %rdi
callq 0x21d0
leaq 0x257a(%rip), %rsi      # 0x630a
movq %rax, %rdi
callq 0x21f0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
pushq $0xc
popq %rdx
movl %ebx, %esi
callq 0x271a
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x21d0
leaq 0x2550(%rip), %rsi      # 0x630c
movq %rax, %rdi
callq 0x21f0
movl %ebx, %esi
movq %rax, %rdi
callq 0x2190
leaq 0x253d(%rip), %rsi      # 0x6312
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
leaq -0x4b0(%rbp), %rdi
callq 0x2130
leaq 0x252a(%rip), %rsi      # 0x6343
movq -0xa0(%rbp), %rdi
callq 0x21f0
movq -0x1e8(%rbp), %r14
leaq 0x2470(%rip), %rbx      # 0x62a3
movl $0xfffffefb, %r15d      # imm = 0xFFFFFEFB
leaq -0x1f8(%rbp), %rax
cmpq %rax, %r14
je 0x3ece
leaq 0x20(%r14), %rsi
movq -0xa0(%rbp), %rdi
callq 0x21d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
leaq 0x40(%r14), %rsi
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %r15d, %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x9, 0x8(%rax,%rcx)
movl 0x60(%r14), %ecx
cvtsi2sd %rcx, %xmm0
divsd 0x215a(%rip), %xmm0     # 0x6008
movq %rax, %rdi
callq 0x2360
movq %rax, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x21a0
movq %rax, %r14
jmp 0x3e39
leaq -0x160(%rbp), %rdi
callq 0x2120
leaq -0x200(%rbp), %rdi
callq 0x559a
leaq -0x2b0(%rbp), %rdi
callq 0x4530
xorl %ebx, %ebx
jmp 0x3f41
movq 0x60f3(%rip), %rdi      # 0x9ff0
leaq 0x22f3(%rip), %rsi      # 0x61f7
callq 0x21f0
leaq 0x22ef(%rip), %rsi      # 0x61ff
movq %rax, %rdi
callq 0x21f0
leaq -0x1b0(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x23b4(%rip), %rsi      # 0x62e2
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
pushq $-0x1
popq %rbx
leaq -0x8b8(%rbp), %rdi
callq 0x2320
leaq -0x1b0(%rbp), %rdi
callq 0x2120
leaq -0x4b0(%rbp), %rdi
callq 0x2320
leaq -0x1d0(%rbp), %rdi
callq 0x2120
leaq -0x6b8(%rbp), %rdi
callq 0x20b0
leaq -0x220(%rbp), %rdi
callq 0x2120
movl %ebx, %eax
addq $0x898, %rsp            # imm = 0x898
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22bf(%rip), %rdi      # 0x6263
leaq 0x20c9(%rip), %rsi      # 0x6074
leaq 0x22d6(%rip), %rcx      # 0x6288
movl $0x13c, %edx            # imm = 0x13C
callq 0x2180
jmp 0x4077
movq %rdx, %r15
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x2120
jmp 0x40c8
jmp 0x4020
jmp 0x4004
jmp 0x40b6
movq %rdx, %r15
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x2120
jmp 0x40bc
jmp 0x40b6
jmp 0x4004
jmp 0x40b6
movq %rdx, %r15
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x443c
jmp 0x40bc
jmp 0x40b6
movq %rdx, %r15
movq %rax, %rbx
jmp 0x40c8
jmp 0x402d
movq %rdx, %r15
movq %rax, %rbx
jmp 0x40ed
movq %rdx, %r15
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x2120
jmp 0x41fd
jmp 0x4107
movq %rdx, %r15
movq %rax, %rbx
jmp 0x40f6
jmp 0x408b
jmp 0x41aa
jmp 0x41a0
jmp 0x4198
jmp 0x4198
jmp 0x40db
movq %rdx, %r15
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0x40fd
jmp 0x41a0
movq %rdx, %r15
movq %rax, %rbx
jmp 0x4209
jmp 0x4114
jmp 0x40a6
jmp 0x41aa
jmp 0x4107
jmp 0x41a0
movq %rdx, %r15
movq %rax, %rbx
jmp 0x4221
jmp 0x413b
movq %rdx, %r15
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x434e
leaq -0x100(%rbp), %rdi
callq 0x2120
jmp 0x40e1
jmp 0x41b2
movq %rdx, %r15
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x58b0
leaq -0x58(%rbp), %rdi
callq 0x2120
leaq -0x118(%rbp), %rdi
callq 0x434e
jmp 0x41cd
movq %rdx, %r15
movq %rax, %rbx
jmp 0x41fd
jmp 0x411f
movq %rdx, %r15
movq %rax, %rbx
jmp 0x4215
movq %rdx, %r15
movq %rax, %rbx
jmp 0x4239
movq %rdx, %r15
movq %rax, %rbx
jmp 0x4245
jmp 0x4198
jmp 0x4198
jmp 0x4198
movq %rdx, %r15
movq %rax, %rbx
jmp 0x422d
jmp 0x41a0
jmp 0x41aa
jmp 0x41a0
jmp 0x4198
jmp 0x4198
jmp 0x41aa
jmp 0x41a0
jmp 0x4198
jmp 0x4198
jmp 0x41aa
jmp 0x4198
jmp 0x4198
jmp 0x41aa
jmp 0x41aa
jmp 0x41aa
jmp 0x4198
jmp 0x41b2
jmp 0x41b2
jmp 0x41b2
jmp 0x4198
jmp 0x4198
jmp 0x41a0
jmp 0x41aa
jmp 0x4198
jmp 0x4198
jmp 0x4198
jmp 0x4198
jmp 0x41a0
jmp 0x41a0
jmp 0x41aa
jmp 0x41aa
jmp 0x4198
jmp 0x4198
jmp 0x41aa
jmp 0x41aa
jmp 0x41aa
jmp 0x4198
jmp 0x41b2
jmp 0x41b2
jmp 0x41b2
jmp 0x4198
movq %rdx, %r15
movq %rax, %rbx
jmp 0x41d9
movq %rdx, %r15
movq %rax, %rbx
jmp 0x41cd
jmp 0x41aa
movq %rdx, %r15
movq %rax, %rbx
jmp 0x41c1
movq %rdx, %r15
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
callq 0x2120
leaq -0x90(%rbp), %rdi
callq 0x2120
leaq -0x160(%rbp), %rdi
callq 0x2120
leaq -0x200(%rbp), %rdi
callq 0x559a
leaq -0x2b0(%rbp), %rdi
callq 0x4530
leaq -0x8b8(%rbp), %rdi
callq 0x2320
leaq -0x1b0(%rbp), %rdi
callq 0x2120
leaq -0x4b0(%rbp), %rdi
callq 0x2320
leaq -0x1d0(%rbp), %rdi
callq 0x2120
leaq -0x6b8(%rbp), %rdi
callq 0x20b0
leaq -0x220(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2100
cmpl $0x2, %r15d
jne 0x428a
movq %rax, %rbx
movq 0x5d93(%rip), %rdi      # 0x9ff0
leaq 0x1f93(%rip), %rsi      # 0x61f7
callq 0x21f0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
jmp 0x42b4
movq 0x5d5f(%rip), %rdi      # 0x9ff0
leaq 0x1f5f(%rip), %rsi      # 0x61f7
callq 0x21f0
leaq 0x20b1(%rip), %rsi      # 0x6355
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
callq 0x2370
pushq $-0x1
popq %rbx
jmp 0x3f89
movq %rax, %rbx
callq 0x2370
jmp 0x42d3
movq %rax, %rbx
callq 0x2370
movq %rbx, %rdi
callq 0x2390
movq %rax, %rdi
callq 0x4550