// File: ashlall[P]StreamStats/ChiSquareExperiments/VaryMemoryTwoSample.cpp
// Function: main
int main(int argc, char* argv[])
{
  if (argc < 12)
  {
    cout << "usage: VaryMemoryTwoSample lower-memory upper-memory num-stream(>0) [N|U|P|E] location1 scale1 location2 scale2 [0|1] stream-size num-buckets" << endl;
    throw ParameterError();
  }

  double lower = atof (argv[1]);
  double upper = atof (argv[2]);
  int data_repeats = atoi (argv[3]);
  char distribution_type = argv[4][0];
  double location1 = atof (argv[5]);
  double scale1 = atof (argv[6]);
  double location2 = atof (argv[7]);
  double scale2 = atof (argv[8]);
  int all_quantiles = atoi (argv[9]);
  int stream_size = atoi (argv[10]);
  int num_buckets = atoi (argv[11]);
  int seed1 = 1;
  int seed2 = 2;

  // ensures that the parameters will not create error
  if (data_repeats <= 0)
  {
    cout << "The number of streams must be greater than zero.\n";
    throw ParameterError();
  }
  if (distribution_type != 'N' && distribution_type != 'U' && distribution_type != 'P' && distribution_type != 'E')
  {
    cout << "The distribution is either N, U, P, or E.\n";
    throw ParameterError();
  }
  if (lower <= 0)
  {
    cout << "The lower percent of memory must be greater than 0.\n";
    throw ParameterError();
  }
  if (num_buckets <= 0)
  {
    cout << "The number of buckets must be greater than 0.\n";
    throw ParameterError();
  }
  if (stream_size <= 0)
  {
    cout << "The stream size must be greater than 0.\n";
    throw ParameterError();
  }

  // finds the number of different bins the experiment will run on
  double memory_percent;
  int num_mems = 0;
  double mem = lower;
  while (mem <= (upper + 0.0000001))
  {
    num_mems++;
    mem *= sqrt(10);
  }

  // creates the arrays that will hold the calculated statistics 
  double actual_values[data_repeats][num_mems];
  double GK_values[data_repeats][num_mems];
  double QD_values[data_repeats][num_mems];
  double RS_values[data_repeats][num_mems];
  double percents[num_mems];

  // creates and intializes the log file
  ofstream data_file;
  char str[150];
  name_file(str, argv, 0);
  data_file.open(str);
  data_file << "Distribution: " << distribution_type << endl;
  data_file << "location_1 = " << location1 << " scale_1 = " << scale1 << endl;
  data_file << "location_2 = " << location2 << " scale_2 = " << scale2 << endl;
  data_file << "stream_size = " << stream_size << endl;
  data_file << "num_buckets = " << num_buckets << endl;

  for (int i = 0; i < data_repeats; i++) // runs all test data_repeats times
  {
    memory_percent = lower;
    int j = 0;
    data_file << "Pass " << i+1 << ":" << endl;

    // generates the data based on parameters                                                
    DataGenerator data1(distribution_type, stream_size, seed1, location1, scale1);
    double *stream1 = data1.get_stream();
    DataGenerator data2(distribution_type, stream_size, seed2, location2, scale2);
    double *stream2 = data2.get_stream();

    while (memory_percent <= (upper + 0.00000001))  // runs tests for every memory percent
    { 
      int sample_size = memory_percent * stream_size;
      if (!i)
	percents[j] = memory_percent;

      // computes GK estimate
      ChiSquareContinuous *GK_sketch1 = new ChiSquareContinuous(sample_size, 1);
      for (int k = 0; k < stream_size; k++)
        GK_sketch1->insert(stream1[k]);
      ChiSquareContinuous *GK_sketch2 = new ChiSquareContinuous(sample_size, 1);
      for (int k = 0; k < stream_size; k++)
        GK_sketch2->insert(stream2[k]);
      double GK_stat = GK_sketch1->two_sample_statistic(*GK_sketch2, num_buckets);
      GK_values[i][j] = GK_stat;
      data_file << "GK = " << GK_stat << endl;

      if (all_quantiles)
      {
        // computes QDigest estimate
        ChiSquareContinuous QD_sketch1(sample_size, 2);
        for (int k = 0; k < stream_size; k++)
          QD_sketch1.insert(stream1[k]);
        ChiSquareContinuous QD_sketch2(sample_size, 2);
        for (int k = 0; k < stream_size; k++)
          QD_sketch2.insert(stream2[k]);
        double QD_stat = QD_sketch1.two_sample_statistic(QD_sketch2, num_buckets);
        QD_values[i][j] = QD_stat;
        data_file << "QD = " << QD_stat << endl;

        // computes Reservoir Sampling estimate
        ChiSquareContinuous RS_sketch1(sample_size, 3);
        for (int k = 0; k < stream_size; k++)
          RS_sketch1.insert(stream1[k]);
        ChiSquareContinuous RS_sketch2(sample_size, 3);
        for (int k = 0; k < stream_size; k++)
          RS_sketch2.insert(stream2[k]);
        double RS_stat = RS_sketch1.two_sample_statistic(RS_sketch2, num_buckets);
        RS_values[i][j]= RS_stat;
        data_file << "RS = " << RS_stat<< endl;
      }
       
      // computes actual statistic
      double *upper_interval = GK_sketch1->get_upper();
      double *lower_interval = GK_sketch1->get_lower();
      double actual = data2.get_stat_two_sample(data1, num_buckets, upper_interval, lower_interval);
      actual_values[i][j] = actual;
      data_file << "Real = " << actual << endl;

      memory_percent *= sqrt(10);
      j++;
    }     
    seed1++;
    seed2++;
  }
  data_file.close();

  // creates pvalue file
  ofstream data2_file;
  char st[150];
  name_file(st, argv, 3);
  data2_file.open(st);

  // creates table file
  name_file(str, argv, 1);
  data_file.open(str);

  int deg_freedom = num_buckets;
  for (int i = 0; i < num_mems; i++)
  {
    data_file << percents[i] * 100 << "\t";
    double error = 0;

    // adds pvalue error from the GK sketch to the table file
    for (int j = 0; j < data_repeats; j++)
      error += abs(pochisq(GK_values[j][i], deg_freedom) - pochisq(actual_values[j][i], deg_freedom));
    data_file << error / data_repeats;

    if (all_quantiles)
    {
      // adds pvalue error from the QDigest sketch to the table file
      error = 0;
      for (int j = 0; j < data_repeats; j++)
        error += abs(pochisq(QD_values[j][i], deg_freedom) - pochisq(actual_values[j][i], deg_freedom));
      data_file << "\t" << error / data_repeats << "\t";

      // adds pvalue error from the Reservoir Sampling sketch to the table file
      error = 0;
      for (int j = 0; j < data_repeats; j++)
        error += abs(pochisq(RS_values[j][i], deg_freedom) - pochisq(actual_values[j][i], deg_freedom));
      data_file << error / data_repeats;
    }
    data_file << endl;

    // adds all pvalues to the pvalue file
    data2_file << "memory_percent = " << percents[i] << endl;
    for (int j = 0; j < data_repeats; j++)
    {
      data2_file << pochisq(actual_values[j][i], deg_freedom) << " actual" << endl;
      data2_file << pochisq(GK_values[j][i], deg_freedom) << " GK" << endl;
      if (all_quantiles)
      {
        data2_file << pochisq(QD_values[j][i], deg_freedom) << " QD" << endl;
        data2_file << pochisq(RS_values[j][i], deg_freedom) << " RS" << endl;
      }
    }
  }
  data2_file.close();
  data_file.close();

  // creates extra file
  name_file(str, argv, 2);
  data_file.open(str);

  // adds actual statistics to the extra file
  for (int i = 0; i < num_mems; i++)
    {
      for (int j = 0; j < data_repeats; j++)
	data_file << actual_values[j][i] << "\t";
    }
  data_file << endl;

  // adds GK statistics to the extra file
  for (int i = 0; i < num_mems; i++)
    {
      for(int j = 0; j <data_repeats; j++)
	data_file << GK_values[j][i] << "\t";
    }
  data_file << endl;
  if (all_quantiles)
  {
    // adds QDigest statistics to the extra file
    for (int i = 0; i < num_mems; i++)
    {
      for(int j = 0; j <data_repeats; j++)
        data_file << QD_values[j][i] << "\t";
    }
    data_file << endl;
      
    // adds Reservoir Sampling statistics to the extra file
    for (int i = 0; i < num_mems; i++)
    {
      for(int j = 0; j <data_repeats; j++)
        data_file << RS_values[j][i] << "\t";
    }
    data_file << endl;
  }

  data_file << endl;
  data_file.close();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9f0, %rsp            # imm = 0x9F0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xc, -0x8(%rbp)
jge 0x6b3e
movq 0x134ca(%rip), %rdi     # 0x19fd0
leaq 0xb754(%rip), %rsi      # 0x12261
callq 0x21b0
movq %rax, %rdi
movq 0x134a4(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x1311b(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2270
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movb (%rax), %al
movb %al, -0x25(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2270
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2270
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2270
movl %eax, -0x54(%rbp)
movl $0x1, -0x58(%rbp)
movl $0x2, -0x5c(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x6c3b
movq 0x133be(%rip), %rdi     # 0x19fd0
leaq 0xb6d6(%rip), %rsi      # 0x122ef
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x1301e(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movsbl -0x25(%rbp), %eax
cmpl $0x4e, %eax
je 0x6c8f
movsbl -0x25(%rbp), %eax
cmpl $0x55, %eax
je 0x6c8f
movsbl -0x25(%rbp), %eax
cmpl $0x50, %eax
je 0x6c8f
movsbl -0x25(%rbp), %eax
cmpl $0x45, %eax
je 0x6c8f
movq 0x1336a(%rip), %rdi     # 0x19fd0
leaq 0xb6b4(%rip), %rsi      # 0x12321
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12fca(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jb 0x6cc9
movq 0x13330(%rip), %rdi     # 0x19fd0
leaq 0xb6a5(%rip), %rsi      # 0x1234c
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f90(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
cmpl $0x0, -0x54(%rbp)
jg 0x6cff
movq 0x132fa(%rip), %rdi     # 0x19fd0
leaq 0xb6a4(%rip), %rsi      # 0x12381
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f5a(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
cmpl $0x0, -0x50(%rbp)
jg 0x6d35
movq 0x132c4(%rip), %rdi     # 0x19fd0
leaq 0xb69d(%rip), %rsi      # 0x123b0
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f24(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movl $0x0, -0x6c(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm1
movsd 0xb3fd(%rip), %xmm0     # 0x12150
addsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x6d7d
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movl $0xa, %edi
callq 0x9550
mulsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0x6d46
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x6c(%rbp), %eax
movq %rax, -0x7e8(%rbp)
movq %rsp, %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7e0(%rbp)
movq %rdx, %rsp
movq %rcx, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x6c(%rbp), %eax
movq %rax, -0x7d8(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7d0(%rbp)
movq %rdx, %rsp
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x6c(%rbp), %eax
movq %rax, -0x7c8(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7c0(%rbp)
movq %rdx, %rsp
movq %rcx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x6c(%rbp), %eax
movq %rax, -0x7b8(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7b0(%rbp)
movq %rdx, %rsp
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movl -0x6c(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x7a8(%rbp)
movq %rcx, %rsp
movq %rax, -0xc8(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x22c0
movq -0x10(%rbp), %rsi
leaq -0x360(%rbp), %rdi
xorl %edx, %edx
callq 0x84e0
jmp 0x6eca
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x6ee4
leaq 0xb4ee(%rip), %rsi      # 0x123d9
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x7f0(%rbp)
jmp 0x6f00
movq -0x7f0(%rbp), %rdi
movsbl -0x25(%rbp), %esi
callq 0x21e0
movq %rax, -0x7f8(%rbp)
jmp 0x6f19
movq -0x7f8(%rbp), %rdi
movq 0x13099(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6f2e
leaq 0xb4b3(%rip), %rsi      # 0x123e8
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x800(%rbp)
jmp 0x6f4a
movq -0x800(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x2330
movq %rax, -0x808(%rbp)
jmp 0x6f64
movq -0x808(%rbp), %rdi
leaq 0xb484(%rip), %rsi      # 0x123f6
callq 0x21b0
movq %rax, -0x810(%rbp)
jmp 0x6f80
movq -0x810(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x2330
movq %rax, -0x818(%rbp)
jmp 0x6f9a
movq -0x818(%rbp), %rdi
movq 0x13018(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6faf
leaq 0xb44c(%rip), %rsi      # 0x12402
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x820(%rbp)
jmp 0x6fcb
movq -0x820(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
callq 0x2330
movq %rax, -0x828(%rbp)
jmp 0x6fe5
movq -0x828(%rbp), %rdi
leaq 0xb41d(%rip), %rsi      # 0x12410
callq 0x21b0
movq %rax, -0x830(%rbp)
jmp 0x7001
movq -0x830(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
callq 0x2330
movq %rax, -0x838(%rbp)
jmp 0x701b
movq -0x838(%rbp), %rdi
movq 0x12f97(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7030
leaq 0xb3e5(%rip), %rsi      # 0x1241c
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x840(%rbp)
jmp 0x704c
movq -0x840(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x22e0
movq %rax, -0x848(%rbp)
jmp 0x7064
movq -0x848(%rbp), %rdi
movq 0x12f4e(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7079
leaq 0xb3ab(%rip), %rsi      # 0x1242b
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x850(%rbp)
jmp 0x7095
movq -0x850(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x22e0
movq %rax, -0x858(%rbp)
jmp 0x70ad
movq -0x858(%rbp), %rdi
movq 0x12f05(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x70c2
movl $0x0, -0x370(%rbp)
movl -0x370(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x79b1
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x374(%rbp)
leaq 0xb344(%rip), %rsi      # 0x1243a
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x860(%rbp)
jmp 0x710b
movq -0x860(%rbp), %rdi
movl -0x370(%rbp), %esi
incl %esi
callq 0x22e0
movq %rax, -0x868(%rbp)
jmp 0x7128
movq -0x868(%rbp), %rdi
leaq 0xb30a(%rip), %rsi      # 0x12440
callq 0x21b0
movq %rax, -0x870(%rbp)
jmp 0x7144
movq -0x870(%rbp), %rdi
movq 0x12e6e(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7159
movsbl -0x25(%rbp), %esi
movl -0x50(%rbp), %edx
movl -0x58(%rbp), %ecx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x388(%rbp), %rdi
callq 0x24e0
jmp 0x717b
leaq -0x388(%rbp), %rdi
callq 0x9570
movq %rax, -0x878(%rbp)
jmp 0x7190
movq -0x878(%rbp), %rax
movq %rax, -0x390(%rbp)
movsbl -0x25(%rbp), %esi
movl -0x50(%rbp), %edx
movl -0x5c(%rbp), %ecx
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
leaq -0x3a0(%rbp), %rdi
callq 0x24e0
jmp 0x71c0
leaq -0x3a0(%rbp), %rdi
callq 0x9570
movq %rax, -0x880(%rbp)
jmp 0x71d5
movq -0x880(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movsd -0x68(%rbp), %xmm1
movsd 0xaf70(%rip), %xmm0     # 0x12160
addsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x7956
movsd -0x68(%rbp), %xmm0
cvtsi2sdl -0x50(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x3ac(%rbp)
cmpl $0x0, -0x370(%rbp)
jne 0x727f
movq -0x7a8(%rbp), %rax
movsd -0x68(%rbp), %xmm0
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x727f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x84c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x79a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7994
movl $0x28, %edi
callq 0x21c0
movq %rax, -0x888(%rbp)
jmp 0x7292
movq -0x888(%rbp), %rdi
cvtsi2sdl -0x3ac(%rbp), %xmm0
movl $0x1, %esi
callq 0x5890
jmp 0x72ad
movq -0x888(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movl $0x0, -0x3bc(%rbp)
movl -0x3bc(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x7327
movq -0x3b8(%rbp), %rdi
movq -0x390(%rbp), %rax
movslq -0x3bc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x5ab0
jmp 0x72f1
jmp 0x72f3
movl -0x3bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3bc(%rbp)
jmp 0x72c5
movq -0x888(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
callq 0x21a0
jmp 0x7994
movl $0x28, %edi
callq 0x21c0
movq %rax, -0x890(%rbp)
jmp 0x733a
movq -0x890(%rbp), %rdi
cvtsi2sdl -0x3ac(%rbp), %xmm0
movl $0x1, %esi
callq 0x5890
jmp 0x7355
movq -0x890(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movl $0x0, -0x3cc(%rbp)
movl -0x3cc(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x73cf
movq -0x3c8(%rbp), %rdi
movq -0x3a8(%rbp), %rax
movslq -0x3cc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x5ab0
jmp 0x7399
jmp 0x739b
movl -0x3cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3cc(%rbp)
jmp 0x736d
movq -0x890(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
callq 0x21a0
jmp 0x7994
movq -0x3b8(%rbp), %rdi
movq -0x3c8(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x6670
movsd %xmm0, -0x898(%rbp)
jmp 0x73ef
movq -0x7d0(%rbp), %rax
movq -0x7d8(%rbp), %rdx
movsd -0x898(%rbp), %xmm0
movsd %xmm0, -0x3d8(%rbp)
movsd -0x3d8(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xb00b(%rip), %rsi      # 0x12442
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8a0(%rbp)
jmp 0x744c
movq -0x8a0(%rbp), %rdi
movsd -0x3d8(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8a8(%rbp)
jmp 0x7469
movq -0x8a8(%rbp), %rdi
movq 0x12b49(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x747e
cmpl $0x0, -0x4c(%rbp)
je 0x7839
cvtsi2sdl -0x3ac(%rbp), %xmm0
leaq -0x400(%rbp), %rdi
movl $0x2, %esi
callq 0x5890
jmp 0x74a3
movl $0x0, -0x404(%rbp)
movl -0x404(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x7503
movq -0x390(%rbp), %rax
movslq -0x404(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x400(%rbp), %rdi
callq 0x5ab0
jmp 0x74d9
jmp 0x74db
movl -0x404(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x404(%rbp)
jmp 0x74ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7828
cvtsi2sdl -0x3ac(%rbp), %xmm0
leaq -0x430(%rbp), %rdi
movl $0x2, %esi
callq 0x5890
jmp 0x751e
movl $0x0, -0x434(%rbp)
movl -0x434(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x757e
movq -0x3a8(%rbp), %rax
movslq -0x434(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x430(%rbp), %rdi
callq 0x5ab0
jmp 0x7554
jmp 0x7556
movl -0x434(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x7528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x781c
movl -0x54(%rbp), %edx
leaq -0x400(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x6670
movsd %xmm0, -0x8b0(%rbp)
jmp 0x759e
movq -0x7c0(%rbp), %rax
movq -0x7c8(%rbp), %rdx
movsd -0x8b0(%rbp), %xmm0
movsd %xmm0, -0x440(%rbp)
movsd -0x440(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xae62(%rip), %rsi      # 0x12448
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8b8(%rbp)
jmp 0x75fb
movq -0x8b8(%rbp), %rdi
movsd -0x440(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8c0(%rbp)
jmp 0x7618
movq -0x8c0(%rbp), %rdi
movq 0x1299a(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x762d
cvtsi2sdl -0x3ac(%rbp), %xmm0
leaq -0x468(%rbp), %rdi
movl $0x3, %esi
callq 0x5890
jmp 0x7648
movl $0x0, -0x46c(%rbp)
movl -0x46c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x76a8
movq -0x390(%rbp), %rax
movslq -0x46c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x468(%rbp), %rdi
callq 0x5ab0
jmp 0x767e
jmp 0x7680
movl -0x46c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x46c(%rbp)
jmp 0x7652
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7810
cvtsi2sdl -0x3ac(%rbp), %xmm0
leaq -0x498(%rbp), %rdi
movl $0x3, %esi
callq 0x5890
jmp 0x76c3
movl $0x0, -0x49c(%rbp)
movl -0x49c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x772f
movq -0x3a8(%rbp), %rax
movslq -0x49c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x498(%rbp), %rdi
callq 0x5ab0
jmp 0x76f9
jmp 0x76fb
movl -0x49c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x49c(%rbp)
jmp 0x76cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
leaq -0x498(%rbp), %rdi
callq 0x5a40
jmp 0x7810
movl -0x54(%rbp), %edx
leaq -0x468(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x6670
movsd %xmm0, -0x8c8(%rbp)
jmp 0x774f
movq -0x7b0(%rbp), %rax
movq -0x7b8(%rbp), %rdx
movsd -0x8c8(%rbp), %xmm0
movsd %xmm0, -0x4a8(%rbp)
movsd -0x4a8(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xacb7(%rip), %rsi      # 0x1244e
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8d0(%rbp)
jmp 0x77ac
movq -0x8d0(%rbp), %rdi
movsd -0x4a8(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8d8(%rbp)
jmp 0x77c9
movq -0x8d8(%rbp), %rdi
movq 0x127e9(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x77de
leaq -0x498(%rbp), %rdi
callq 0x5a40
leaq -0x468(%rbp), %rdi
callq 0x5a40
leaq -0x430(%rbp), %rdi
callq 0x5a40
leaq -0x400(%rbp), %rdi
callq 0x5a40
jmp 0x7839
leaq -0x468(%rbp), %rdi
callq 0x5a40
leaq -0x430(%rbp), %rdi
callq 0x5a40
leaq -0x400(%rbp), %rdi
callq 0x5a40
jmp 0x7994
movq -0x3b8(%rbp), %rdi
callq 0x69f0
movq %rax, -0x4b0(%rbp)
movq -0x3b8(%rbp), %rdi
callq 0x69d0
movq %rax, -0x4b8(%rbp)
movl -0x54(%rbp), %edx
movq -0x4b0(%rbp), %rcx
movq -0x4b8(%rbp), %r8
leaq -0x3a0(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x2910
movsd %xmm0, -0x8e0(%rbp)
jmp 0x788d
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movsd -0x8e0(%rbp), %xmm0
movsd %xmm0, -0x4c0(%rbp)
movsd -0x4c0(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xab7f(%rip), %rsi      # 0x12454
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8e8(%rbp)
jmp 0x78ea
movq -0x8e8(%rbp), %rdi
movsd -0x4c0(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8f0(%rbp)
jmp 0x7907
movq -0x8f0(%rbp), %rdi
movq 0x126ab(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x791c
movl $0xa, %edi
callq 0x9550
movsd %xmm0, -0x8f8(%rbp)
jmp 0x7930
movsd -0x8f8(%rbp), %xmm0
mulsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x374(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x374(%rbp)
jmp 0x71e3
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x9590
leaq -0x388(%rbp), %rdi
callq 0x9590
movl -0x370(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x370(%rbp)
jmp 0x70cc
leaq -0x3a0(%rbp), %rdi
callq 0x9590
leaq -0x388(%rbp), %rdi
callq 0x9590
jmp 0x84c0
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x79bf
leaq -0x6c0(%rbp), %rdi
callq 0x22c0
jmp 0x79cd
movq -0x10(%rbp), %rsi
leaq -0x760(%rbp), %rdi
movl $0x3, %edx
callq 0x84e0
jmp 0x79e4
leaq -0x6c0(%rbp), %rdi
leaq -0x760(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x79fe
movq -0x10(%rbp), %rsi
leaq -0x360(%rbp), %rdi
movl $0x1, %edx
callq 0x84e0
jmp 0x7a15
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x7a2f
movl -0x54(%rbp), %eax
movl %eax, -0x764(%rbp)
movl $0x0, -0x768(%rbp)
movl -0x768(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x811a
movq -0x7a8(%rbp), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0xa6ec(%rip), %xmm1     # 0x12158
mulsd %xmm1, %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0x900(%rbp)
jmp 0x7a85
movq -0x900(%rbp), %rdi
leaq 0xa9c9(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x7a9a
xorps %xmm0, %xmm0
movsd %xmm0, -0x770(%rbp)
movl $0x0, -0x774(%rbp)
movl -0x774(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7bac
movq -0x7d0(%rbp), %rax
movq -0x7d8(%rbp), %rdx
movslq -0x774(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x908(%rbp)
jmp 0x7afc
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x774(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x910(%rbp)
jmp 0x7b3a
movsd -0x910(%rbp), %xmm1
movsd -0x908(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x94c0
movsd %xmm0, -0x918(%rbp)
jmp 0x7b5d
movsd -0x918(%rbp), %xmm0
addsd -0x770(%rbp), %xmm0
movsd %xmm0, -0x770(%rbp)
movl -0x774(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x774(%rbp)
jmp 0x7aaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
leaq -0x6c0(%rbp), %rdi
callq 0x2250
jmp 0x84c0
movsd -0x770(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
jmp 0x7bcb
cmpl $0x0, -0x4c(%rbp)
je 0x7e2b
xorps %xmm0, %xmm0
movsd %xmm0, -0x770(%rbp)
movl $0x0, -0x778(%rbp)
movl -0x778(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7cc4
movq -0x7c0(%rbp), %rax
movq -0x7c8(%rbp), %rdx
movslq -0x778(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x920(%rbp)
jmp 0x7c37
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x778(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x928(%rbp)
jmp 0x7c75
movsd -0x928(%rbp), %xmm1
movsd -0x920(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x94c0
movsd %xmm0, -0x930(%rbp)
jmp 0x7c98
movsd -0x930(%rbp), %xmm0
addsd -0x770(%rbp), %xmm0
movsd %xmm0, -0x770(%rbp)
movl -0x778(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x778(%rbp)
jmp 0x7bea
leaq 0xa791(%rip), %rsi      # 0x1245c
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x938(%rbp)
jmp 0x7ce0
movq -0x938(%rbp), %rdi
movsd -0x770(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x2330
movq %rax, -0x940(%rbp)
jmp 0x7d06
movq -0x940(%rbp), %rdi
leaq 0xa748(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x7d1b
xorps %xmm0, %xmm0
movsd %xmm0, -0x770(%rbp)
movl $0x0, -0x77c(%rbp)
movl -0x77c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7e0a
movq -0x7b0(%rbp), %rax
movq -0x7b8(%rbp), %rdx
movslq -0x77c(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x948(%rbp)
jmp 0x7d7d
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x77c(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x950(%rbp)
jmp 0x7dbb
movsd -0x950(%rbp), %xmm1
movsd -0x948(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x94c0
movsd %xmm0, -0x958(%rbp)
jmp 0x7dde
movsd -0x958(%rbp), %xmm0
addsd -0x770(%rbp), %xmm0
movsd %xmm0, -0x770(%rbp)
movl -0x77c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x77c(%rbp)
jmp 0x7d30
movsd -0x770(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
jmp 0x7e29
jmp 0x7e2b
movq 0x1218e(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x7e40
leaq 0xa617(%rip), %rsi      # 0x1245e
leaq -0x6c0(%rbp), %rdi
callq 0x21b0
movq %rax, -0x960(%rbp)
jmp 0x7e5c
movq -0x960(%rbp), %rdi
movq -0x7a8(%rbp), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x2330
movq %rax, -0x968(%rbp)
jmp 0x7e84
movq -0x968(%rbp), %rdi
movq 0x1212e(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7e99
movl $0x0, -0x780(%rbp)
movl -0x780(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8104
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x780(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x970(%rbp)
jmp 0x7ef0
movsd -0x970(%rbp), %xmm0
leaq -0x6c0(%rbp), %rdi
callq 0x2330
movq %rax, -0x978(%rbp)
jmp 0x7f0d
movq -0x978(%rbp), %rdi
leaq 0xa555(%rip), %rsi      # 0x12470
callq 0x21b0
movq %rax, -0x980(%rbp)
jmp 0x7f29
movq -0x980(%rbp), %rdi
movq 0x12089(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7f3e
movq -0x7d0(%rbp), %rax
movq -0x7d8(%rbp), %rdx
movslq -0x780(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x988(%rbp)
jmp 0x7f7c
movsd -0x988(%rbp), %xmm0
leaq -0x6c0(%rbp), %rdi
callq 0x2330
movq %rax, -0x990(%rbp)
jmp 0x7f99
movq -0x990(%rbp), %rdi
leaq 0xa4d1(%rip), %rsi      # 0x12478
callq 0x21b0
movq %rax, -0x998(%rbp)
jmp 0x7fb5
movq -0x998(%rbp), %rdi
movq 0x11ffd(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7fca
cmpl $0x0, -0x4c(%rbp)
je 0x80ee
movq -0x7c0(%rbp), %rax
movq -0x7c8(%rbp), %rdx
movslq -0x780(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x9a0(%rbp)
jmp 0x8012
movsd -0x9a0(%rbp), %xmm0
leaq -0x6c0(%rbp), %rdi
callq 0x2330
movq %rax, -0x9a8(%rbp)
jmp 0x802f
movq -0x9a8(%rbp), %rdi
leaq 0xa43f(%rip), %rsi      # 0x1247c
callq 0x21b0
movq %rax, -0x9b0(%rbp)
jmp 0x804b
movq -0x9b0(%rbp), %rdi
movq 0x11f67(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x8060
movq -0x7b0(%rbp), %rax
movq -0x7b8(%rbp), %rdx
movslq -0x780(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x768(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x764(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x9b8(%rbp)
jmp 0x809e
movsd -0x9b8(%rbp), %xmm0
leaq -0x6c0(%rbp), %rdi
callq 0x2330
movq %rax, -0x9c0(%rbp)
jmp 0x80bb
movq -0x9c0(%rbp), %rdi
leaq 0xa3b7(%rip), %rsi      # 0x12480
callq 0x21b0
movq %rax, -0x9c8(%rbp)
jmp 0x80d7
movq -0x9c8(%rbp), %rdi
movq 0x11edb(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x80ec
jmp 0x80ee
jmp 0x80f0
movl -0x780(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x780(%rbp)
jmp 0x7ea3
jmp 0x8106
movl -0x768(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x768(%rbp)
jmp 0x7a42
leaq -0x6c0(%rbp), %rdi
callq 0x2230
jmp 0x8128
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x8136
movq -0x10(%rbp), %rsi
leaq -0x360(%rbp), %rdi
movl $0x2, %edx
callq 0x84e0
jmp 0x814d
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x8167
movl $0x0, -0x784(%rbp)
movl -0x784(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x8211
movl $0x0, -0x788(%rbp)
movl -0x788(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x81fb
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x788(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x784(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9d0(%rbp)
jmp 0x81d3
movq -0x9d0(%rbp), %rdi
leaq 0xa27b(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x81e8
jmp 0x81ea
movl -0x788(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x788(%rbp)
jmp 0x818a
jmp 0x81fd
movl -0x784(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x784(%rbp)
jmp 0x8171
movq 0x11da8(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x8226
movl $0x0, -0x78c(%rbp)
movl -0x78c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x82d0
movl $0x0, -0x790(%rbp)
movl -0x790(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x82ba
movq -0x7d0(%rbp), %rax
movq -0x7d8(%rbp), %rdx
movslq -0x790(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x78c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9d8(%rbp)
jmp 0x8292
movq -0x9d8(%rbp), %rdi
leaq 0xa1bc(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x82a7
jmp 0x82a9
movl -0x790(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x790(%rbp)
jmp 0x8249
jmp 0x82bc
movl -0x78c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78c(%rbp)
jmp 0x8230
movq 0x11ce9(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x82e5
cmpl $0x0, -0x4c(%rbp)
je 0x846f
movl $0x0, -0x794(%rbp)
movl -0x794(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x8399
movl $0x0, -0x798(%rbp)
movl -0x798(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8383
movq -0x7c0(%rbp), %rax
movq -0x7c8(%rbp), %rdx
movslq -0x798(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x794(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9e0(%rbp)
jmp 0x835b
movq -0x9e0(%rbp), %rdi
leaq 0xa0f3(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x8370
jmp 0x8372
movl -0x798(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x798(%rbp)
jmp 0x8312
jmp 0x8385
movl -0x794(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x794(%rbp)
jmp 0x82f9
movq 0x11c20(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x83ae
movl $0x0, -0x79c(%rbp)
movl -0x79c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x8458
movl $0x0, -0x7a0(%rbp)
movl -0x7a0(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8442
movq -0x7b0(%rbp), %rax
movq -0x7b8(%rbp), %rdx
movslq -0x7a0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x79c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9e8(%rbp)
jmp 0x841a
movq -0x9e8(%rbp), %rdi
leaq 0xa034(%rip), %rsi      # 0x1245c
callq 0x21b0
jmp 0x842f
jmp 0x8431
movl -0x7a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a0(%rbp)
jmp 0x83d1
jmp 0x8444
movl -0x79c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x79c(%rbp)
jmp 0x83b8
movq 0x11b61(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x846d
jmp 0x846f
movq 0x11b4a(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x8484
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x8492
movl $0x0, -0x4(%rbp)
leaq -0x6c0(%rbp), %rdi
callq 0x2250
leaq -0x2c8(%rbp), %rdi
callq 0x2250
movq -0x80(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x2c8(%rbp), %rdi
callq 0x2250
movq -0x368(%rbp), %rdi
callq 0x2300
nopl (%rax,%rax)