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

  double lower = atof (argv[1]);
  double upper = atof (argv[2]);
  double stream2_size = atof (argv[3]);
  int data_repeats = atoi (argv[4]);
  char distribution_type = argv[5][0];
  double location1 = atof (argv[6]);
  double scale1 = atof (argv[7]);
  double location2 = atof (argv[8]);
  double scale2 = atof (argv[9]);
  int all_quantiles = atoi (argv[10]);
  double memory_percent = atof (argv[11]);
  int num_buckets = atoi (argv[12]);
  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 stream size must be greater than 0.\n";
      throw ParameterError();
    }
  if (memory_percent <= 0)
    {
      cout << "The memory percent must be greater than 0.\n";
      throw ParameterError();
    }
  if (num_buckets <= 0)
    {
      cout << "The number of bins must be greater than 0.\n";
      throw ParameterError();
    }

  // finds the number of different sizes the experiment will run on
  int stream1_size;
  int num_sizes = 0, size = lower;
  while (size <= upper)
  {
    num_sizes++;
    size *= 10;
  }

  // creates the arrays that will hold the calculated statistics
  double actual_values[data_repeats][num_sizes];
  double GK_values[data_repeats][num_sizes];
  double QD_values[data_repeats][num_sizes];
  double RS_values[data_repeats][num_sizes];
  int sizes[num_sizes];
  
  // creates and initializes 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 << "number of bins = " << num_buckets << endl;
  data_file << "memory percent = " << memory_percent << endl;

  for (int i = 0; i < data_repeats; i++)  // runs all test data_repeats times
  {
    int j = 0;
    int sample2_size = memory_percent * stream2_size;

    // generates the data and the sketches of the stream held at a constant
    // size just once for each stream size of the first stream
    DataGenerator data2(distribution_type, stream2_size, seed2, location2, scale2);
    double *stream2 = data2.get_stream();
    ChiSquareContinuous GK_sketch2(sample2_size, 1);
    for (int k = 0; k < stream2_size; k++)
      GK_sketch2.insert(stream2[k]);
    
    
      ChiSquareContinuous QD_sketch2(sample2_size, 2);
      for (int k = 0; k < stream2_size; k++)
	QD_sketch2.insert(stream2[k]);
      ChiSquareContinuous RS_sketch2(sample2_size, 3);
      for (int k = 0; k < stream2_size; k++)
	RS_sketch2.insert(stream2[k]);
    
    stream1_size = lower;
    data_file << "Pass " << i+1 << ":" << endl;
    while (stream1_size <= upper)  // runs tests for every stream size
    {
      int sample1_size = memory_percent * stream1_size;
      if (!i)
	sizes[j] = stream1_size;
      data_file << "stream 1 size = " << stream1_size << endl;
      data_file << "stream 2 size = " << stream2_size << endl;

      // generates the data based on inputed parameters
      DataGenerator data1(distribution_type, stream1_size, seed1, location1, scale1);
      double *stream1 = data1.get_stream();

      // computes GK estimate
      ChiSquareContinuous GK_sketch1(sample1_size, 1);
      for (int k = 0; k < stream1_size; k++)
	GK_sketch1.insert(stream1[k]);
      //double GK_stat = GK_sketch1.two_sample_statistic(GK_sketch2, num_buckets);
      double GK_stat = GK_sketch2.two_sample_statistic(GK_sketch1, num_buckets);
      GK_values[i][j] = GK_stat;
      data_file << "GK = " << GK_stat << endl;

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

	// computes Reservoir Sampling estimate
	ChiSquareContinuous RS_sketch1(sample1_size, 3);
        for (int k = 0; k < stream1_size; k++)
          RS_sketch1.insert(stream1[k]);
        double RS_stat = RS_sketch2.two_sample_statistic(RS_sketch1, num_buckets);
	RS_values[i][j]= RS_stat;
	data_file << "RS = " << RS_stat<< endl;
      }
       
      // computes actual statistic
      double *upper_interval = GK_sketch2.get_upper();
      double *lower_interval = GK_sketch2.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;

      stream1_size *= 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;
  for (int i = 0; i < num_sizes; i++)
  {
    data_file << sizes[i] << "\t";
    if (sizes[i] == stream2_size)
      deg_freedom = num_buckets - 1;
    else
      deg_freedom = num_buckets;

    // adds pvalue error from the GK sketch to the table file
    double error = 0;
    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 << "stream1_size = " << sizes[i] << " stream2_size = " << stream2_size << 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_sizes; 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_sizes; 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_sizes; i++)
    {
      for(int j = 0; j <data_repeats; j++)
        data_file << QD_values[j][i] << "\t";
    }
    data_file << endl;

    // adds Reservoir Sampling statistic to the extra file
    for (int i = 0; i < num_sizes; 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 $0xa40, %rsp            # imm = 0xA40
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xd, -0x8(%rbp)
jge 0x6b3e
movq 0x134ca(%rip), %rdi     # 0x19fd0
leaq 0xb744(%rip), %rsi      # 0x12251
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 0x2200
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2270
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movb (%rax), %al
movb %al, -0x2d(%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 0x2200
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2270
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2200
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2270
movl %eax, -0x64(%rbp)
movl $0x1, -0x68(%rbp)
movl $0x2, -0x6c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jg 0x6c4f
movq 0x133aa(%rip), %rdi     # 0x19fd0
leaq 0xb6bc(%rip), %rsi      # 0x122e9
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x1300a(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movsbl -0x2d(%rbp), %eax
cmpl $0x4e, %eax
je 0x6ca3
movsbl -0x2d(%rbp), %eax
cmpl $0x55, %eax
je 0x6ca3
movsbl -0x2d(%rbp), %eax
cmpl $0x50, %eax
je 0x6ca3
movsbl -0x2d(%rbp), %eax
cmpl $0x45, %eax
je 0x6ca3
movq 0x13356(%rip), %rdi     # 0x19fd0
leaq 0xb69a(%rip), %rsi      # 0x1231b
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12fb6(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jb 0x6cdd
movq 0x1331c(%rip), %rdi     # 0x19fd0
leaq 0xb68b(%rip), %rsi      # 0x12346
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f7c(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
xorps %xmm0, %xmm0
ucomisd -0x60(%rbp), %xmm0
jb 0x6d17
movq 0x132e2(%rip), %rdi     # 0x19fd0
leaq 0xb680(%rip), %rsi      # 0x12375
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f42(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
cmpl $0x0, -0x64(%rbp)
jg 0x6d4d
movq 0x132ac(%rip), %rdi     # 0x19fd0
leaq 0xb676(%rip), %rsi      # 0x123a1
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f0c(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movl $0x0, -0x74(%rbp)
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x78(%rbp)
cvtsi2sdl -0x78(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x6d7e
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
imull $0xa, -0x78(%rbp), %eax
movl %eax, -0x78(%rbp)
jmp 0x6d5c
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl -0x74(%rbp), %eax
movq %rax, -0x818(%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, -0x810(%rbp)
movq %rdx, %rsp
movq %rcx, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl -0x74(%rbp), %eax
movq %rax, -0x808(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x800(%rbp)
movq %rdx, %rsp
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl -0x74(%rbp), %eax
movq %rax, -0x7f8(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7f0(%rbp)
movq %rdx, %rsp
movq %rcx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movl -0x74(%rbp), %eax
movq %rax, -0x7e8(%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, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movl -0x74(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x7d8(%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 0x85b0
jmp 0x6ecb
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x6ee5
leaq 0xb4e1(%rip), %rsi      # 0x123cd
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x820(%rbp)
jmp 0x6f01
movq -0x820(%rbp), %rdi
movsbl -0x2d(%rbp), %esi
callq 0x21e0
movq %rax, -0x828(%rbp)
jmp 0x6f1a
movq -0x828(%rbp), %rdi
movq 0x13098(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6f2f
leaq 0xb4a6(%rip), %rsi      # 0x123dc
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x830(%rbp)
jmp 0x6f4b
movq -0x830(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x2330
movq %rax, -0x838(%rbp)
jmp 0x6f65
movq -0x838(%rbp), %rdi
leaq 0xb477(%rip), %rsi      # 0x123ea
callq 0x21b0
movq %rax, -0x840(%rbp)
jmp 0x6f81
movq -0x840(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
callq 0x2330
movq %rax, -0x848(%rbp)
jmp 0x6f9b
movq -0x848(%rbp), %rdi
movq 0x13017(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6fb0
leaq 0xb43f(%rip), %rsi      # 0x123f6
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x850(%rbp)
jmp 0x6fcc
movq -0x850(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
callq 0x2330
movq %rax, -0x858(%rbp)
jmp 0x6fe6
movq -0x858(%rbp), %rdi
leaq 0xb410(%rip), %rsi      # 0x12404
callq 0x21b0
movq %rax, -0x860(%rbp)
jmp 0x7002
movq -0x860(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0x2330
movq %rax, -0x868(%rbp)
jmp 0x701c
movq -0x868(%rbp), %rdi
movq 0x12f96(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7031
leaq 0xb3d8(%rip), %rsi      # 0x12410
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x870(%rbp)
jmp 0x704d
movq -0x870(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x22e0
movq %rax, -0x878(%rbp)
jmp 0x7065
movq -0x878(%rbp), %rdi
movq 0x12f4d(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x707a
leaq 0xb3a1(%rip), %rsi      # 0x12422
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x880(%rbp)
jmp 0x7096
movq -0x880(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
callq 0x2330
movq %rax, -0x888(%rbp)
jmp 0x70b0
movq -0x888(%rbp), %rdi
movq 0x12f02(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x70c5
movl $0x0, -0x370(%rbp)
movl -0x370(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7a2c
movl $0x0, -0x374(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x378(%rbp)
movsbl -0x2d(%rbp), %esi
cvttsd2si -0x28(%rbp), %edx
movl -0x6c(%rbp), %ecx
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
leaq -0x388(%rbp), %rdi
callq 0x24e0
jmp 0x7124
leaq -0x388(%rbp), %rdi
callq 0x9640
movq %rax, -0x890(%rbp)
jmp 0x7139
movq -0x890(%rbp), %rax
movq %rax, -0x390(%rbp)
cvtsi2sdl -0x378(%rbp), %xmm0
leaq -0x3b8(%rbp), %rdi
movl $0x1, %esi
callq 0x5890
jmp 0x7162
movl $0x0, -0x3bc(%rbp)
cvtsi2sdl -0x3bc(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x71f8
movq -0x390(%rbp), %rax
movslq -0x3bc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x3b8(%rbp), %rdi
callq 0x5ab0
jmp 0x71a0
jmp 0x71a2
movl -0x3bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3bc(%rbp)
jmp 0x716c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x858b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7a1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7a0f
cvtsi2sdl -0x378(%rbp), %xmm0
leaq -0x3e8(%rbp), %rdi
movl $0x2, %esi
callq 0x5890
jmp 0x7213
movl $0x0, -0x3ec(%rbp)
cvtsi2sdl -0x3ec(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x727b
movq -0x390(%rbp), %rax
movslq -0x3ec(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x3e8(%rbp), %rdi
callq 0x5ab0
jmp 0x7251
jmp 0x7253
movl -0x3ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3ec(%rbp)
jmp 0x721d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7a03
cvtsi2sdl -0x378(%rbp), %xmm0
leaq -0x418(%rbp), %rdi
movl $0x3, %esi
callq 0x5890
jmp 0x7296
movl $0x0, -0x41c(%rbp)
cvtsi2sdl -0x41c(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x72fe
movq -0x390(%rbp), %rax
movslq -0x41c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x418(%rbp), %rdi
callq 0x5ab0
jmp 0x72d4
jmp 0x72d6
movl -0x41c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x41c(%rbp)
jmp 0x72a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x79f7
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq 0xb127(%rip), %rsi      # 0x12434
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x898(%rbp)
jmp 0x7322
movq -0x898(%rbp), %rdi
movl -0x370(%rbp), %esi
incl %esi
callq 0x22e0
movq %rax, -0x8a0(%rbp)
jmp 0x733f
movq -0x8a0(%rbp), %rdi
leaq 0xb0ed(%rip), %rsi      # 0x1243a
callq 0x21b0
movq %rax, -0x8a8(%rbp)
jmp 0x735b
movq -0x8a8(%rbp), %rdi
movq 0x12c57(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7370
jmp 0x7372
cvtsi2sdl -0x70(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x79aa
movsd -0x60(%rbp), %xmm0
cvtsi2sdl -0x70(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x420(%rbp)
cmpl $0x0, -0x370(%rbp)
jne 0x73bb
movq -0x7d8(%rbp), %rax
movl -0x70(%rbp), %edx
movslq -0x374(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
leaq 0xb07a(%rip), %rsi      # 0x1243c
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8b0(%rbp)
jmp 0x73d7
movq -0x8b0(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x22e0
movq %rax, -0x8b8(%rbp)
jmp 0x73ef
movq -0x8b8(%rbp), %rdi
movq 0x12bc3(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7404
leaq 0xb042(%rip), %rsi      # 0x1244d
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8c0(%rbp)
jmp 0x7420
movq -0x8c0(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8c8(%rbp)
jmp 0x743a
movq -0x8c8(%rbp), %rdi
movq 0x12b78(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x744f
movsbl -0x2d(%rbp), %esi
movl -0x70(%rbp), %edx
movl -0x68(%rbp), %ecx
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
leaq -0x430(%rbp), %rdi
callq 0x24e0
jmp 0x7471
leaq -0x430(%rbp), %rdi
callq 0x9640
movq %rax, -0x8d0(%rbp)
jmp 0x7486
movq -0x8d0(%rbp), %rax
movq %rax, -0x438(%rbp)
cvtsi2sdl -0x420(%rbp), %xmm0
leaq -0x460(%rbp), %rdi
movl $0x1, %esi
callq 0x5890
jmp 0x74af
movl $0x0, -0x464(%rbp)
movl -0x464(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x7526
movq -0x438(%rbp), %rax
movslq -0x464(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x460(%rbp), %rdi
callq 0x5ab0
jmp 0x74e5
jmp 0x74e7
movl -0x464(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x464(%rbp)
jmp 0x74b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x799c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7990
movl -0x64(%rbp), %edx
leaq -0x3b8(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x6670
movsd %xmm0, -0x8d8(%rbp)
jmp 0x7546
movq -0x800(%rbp), %rax
movq -0x808(%rbp), %rdx
movsd -0x8d8(%rbp), %xmm0
movsd %xmm0, -0x470(%rbp)
movsd -0x470(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xaed0(%rip), %rsi      # 0x1245e
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8e0(%rbp)
jmp 0x75a3
movq -0x8e0(%rbp), %rdi
movsd -0x470(%rbp), %xmm0
callq 0x2330
movq %rax, -0x8e8(%rbp)
jmp 0x75c0
movq -0x8e8(%rbp), %rdi
movq 0x129f2(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x75d5
cmpl $0x0, -0x54(%rbp)
je 0x786a
cvtsi2sdl -0x420(%rbp), %xmm0
leaq -0x498(%rbp), %rdi
movl $0x2, %esi
callq 0x5890
jmp 0x75fa
movl $0x0, -0x49c(%rbp)
movl -0x49c(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x765a
movq -0x438(%rbp), %rax
movslq -0x49c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x498(%rbp), %rdi
callq 0x5ab0
jmp 0x7630
jmp 0x7632
movl -0x49c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x49c(%rbp)
jmp 0x7604
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
jmp 0x7859
movl -0x64(%rbp), %edx
leaq -0x3e8(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x6670
movsd %xmm0, -0x8f0(%rbp)
jmp 0x767a
movq -0x7f0(%rbp), %rax
movq -0x7f8(%rbp), %rdx
movsd -0x8f0(%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 0xada2(%rip), %rsi      # 0x12464
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8f8(%rbp)
jmp 0x76d7
movq -0x8f8(%rbp), %rdi
movsd -0x4a8(%rbp), %xmm0
callq 0x2330
movq %rax, -0x900(%rbp)
jmp 0x76f4
movq -0x900(%rbp), %rdi
movq 0x128be(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7709
cvtsi2sdl -0x420(%rbp), %xmm0
leaq -0x4d0(%rbp), %rdi
movl $0x3, %esi
callq 0x5890
jmp 0x7724
movl $0x0, -0x4d4(%rbp)
movl -0x4d4(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x7790
movq -0x438(%rbp), %rax
movslq -0x4d4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x4d0(%rbp), %rdi
callq 0x5ab0
jmp 0x775a
jmp 0x775c
movl -0x4d4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4d4(%rbp)
jmp 0x772e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x5a40
jmp 0x7859
movl -0x64(%rbp), %edx
leaq -0x418(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
callq 0x6670
movsd %xmm0, -0x908(%rbp)
jmp 0x77b0
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movsd -0x908(%rbp), %xmm0
movsd %xmm0, -0x4e0(%rbp)
movsd -0x4e0(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xac72(%rip), %rsi      # 0x1246a
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x910(%rbp)
jmp 0x780d
movq -0x910(%rbp), %rdi
movsd -0x4e0(%rbp), %xmm0
callq 0x2330
movq %rax, -0x918(%rbp)
jmp 0x782a
movq -0x918(%rbp), %rdi
movq 0x12788(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x783f
leaq -0x4d0(%rbp), %rdi
callq 0x5a40
leaq -0x498(%rbp), %rdi
callq 0x5a40
jmp 0x786a
leaq -0x498(%rbp), %rdi
callq 0x5a40
jmp 0x7990
leaq -0x3b8(%rbp), %rdi
movq %rdi, -0x928(%rbp)
callq 0x69f0
movq -0x928(%rbp), %rdi
movq %rax, -0x4e8(%rbp)
callq 0x69d0
movq %rax, -0x4f0(%rbp)
movl -0x64(%rbp), %edx
movq -0x4e8(%rbp), %rcx
movq -0x4f0(%rbp), %r8
leaq -0x388(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x2910
movsd %xmm0, -0x920(%rbp)
jmp 0x78c5
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movsd -0x920(%rbp), %xmm0
movsd %xmm0, -0x4f8(%rbp)
movsd -0x4f8(%rbp), %xmm0
movslq -0x370(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x374(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xab63(%rip), %rsi      # 0x12470
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x930(%rbp)
jmp 0x7922
movq -0x930(%rbp), %rdi
movsd -0x4f8(%rbp), %xmm0
callq 0x2330
movq %rax, -0x938(%rbp)
jmp 0x793f
movq -0x938(%rbp), %rdi
movq 0x12673(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7954
imull $0xa, -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x374(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x374(%rbp)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x5a40
leaq -0x430(%rbp), %rdi
callq 0x9660
jmp 0x7372
leaq -0x460(%rbp), %rdi
callq 0x5a40
leaq -0x430(%rbp), %rdi
callq 0x9660
jmp 0x79f7
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x5a40
leaq -0x3e8(%rbp), %rdi
callq 0x5a40
leaq -0x3b8(%rbp), %rdi
callq 0x5a40
leaq -0x388(%rbp), %rdi
callq 0x9660
movl -0x370(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x370(%rbp)
jmp 0x70cf
leaq -0x418(%rbp), %rdi
callq 0x5a40
leaq -0x3e8(%rbp), %rdi
callq 0x5a40
leaq -0x3b8(%rbp), %rdi
callq 0x5a40
leaq -0x388(%rbp), %rdi
callq 0x9660
jmp 0x858b
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x7a3a
leaq -0x6f8(%rbp), %rdi
callq 0x22c0
jmp 0x7a48
movq -0x10(%rbp), %rsi
leaq -0x790(%rbp), %rdi
movl $0x3, %edx
callq 0x85b0
jmp 0x7a5f
leaq -0x6f8(%rbp), %rdi
leaq -0x790(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x7a79
movq -0x10(%rbp), %rsi
leaq -0x360(%rbp), %rdi
movl $0x1, %edx
callq 0x85b0
jmp 0x7a90
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x7aaa
movl $0x0, -0x798(%rbp)
movl -0x798(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x81e5
movq -0x7d8(%rbp), %rax
movslq -0x798(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -0x2c8(%rbp), %rdi
callq 0x22e0
movq %rax, -0x940(%rbp)
jmp 0x7ae9
movq -0x940(%rbp), %rdi
leaq 0xa981(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x7afe
movq -0x7d8(%rbp), %rax
movslq -0x798(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
ucomisd -0x28(%rbp), %xmm0
jne 0x7b4b
jp 0x7b4b
movl -0x64(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x794(%rbp)
jmp 0x7b54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x368(%rbp)
movl %eax, -0x36c(%rbp)
leaq -0x6f8(%rbp), %rdi
callq 0x2250
jmp 0x858b
movl -0x64(%rbp), %eax
movl %eax, -0x794(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl $0x0, -0x7a4(%rbp)
movl -0x7a4(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7c43
movq -0x800(%rbp), %rax
movq -0x808(%rbp), %rdx
movslq -0x7a4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x948(%rbp)
jmp 0x7bb6
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movslq -0x7a4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x950(%rbp)
jmp 0x7bf4
movsd -0x950(%rbp), %xmm1
movsd -0x948(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x95b0
movsd %xmm0, -0x958(%rbp)
jmp 0x7c17
movsd -0x958(%rbp), %xmm0
addsd -0x7a0(%rbp), %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl -0x7a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a4(%rbp)
jmp 0x7b69
movsd -0x7a0(%rbp), %xmm0
cvtsi2sdl -0x2c(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
jmp 0x7c62
cmpl $0x0, -0x54(%rbp)
je 0x7ec2
xorps %xmm0, %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl $0x0, -0x7a8(%rbp)
movl -0x7a8(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7d5b
movq -0x7f0(%rbp), %rax
movq -0x7f8(%rbp), %rdx
movslq -0x7a8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x960(%rbp)
jmp 0x7cce
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movslq -0x7a8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x968(%rbp)
jmp 0x7d0c
movsd -0x968(%rbp), %xmm1
movsd -0x960(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x95b0
movsd %xmm0, -0x970(%rbp)
jmp 0x7d2f
movsd -0x970(%rbp), %xmm0
addsd -0x7a0(%rbp), %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl -0x7a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a8(%rbp)
jmp 0x7c81
leaq 0xa716(%rip), %rsi      # 0x12478
leaq -0x2c8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x978(%rbp)
jmp 0x7d77
movq -0x978(%rbp), %rdi
movsd -0x7a0(%rbp), %xmm0
cvtsi2sdl -0x2c(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x2330
movq %rax, -0x980(%rbp)
jmp 0x7d9d
movq -0x980(%rbp), %rdi
leaq 0xa6cd(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x7db2
xorps %xmm0, %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl $0x0, -0x7ac(%rbp)
movl -0x7ac(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7ea1
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x7ac(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x988(%rbp)
jmp 0x7e14
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movslq -0x7ac(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x990(%rbp)
jmp 0x7e52
movsd -0x990(%rbp), %xmm1
movsd -0x988(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x95b0
movsd %xmm0, -0x998(%rbp)
jmp 0x7e75
movsd -0x998(%rbp), %xmm0
addsd -0x7a0(%rbp), %xmm0
movsd %xmm0, -0x7a0(%rbp)
movl -0x7ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7ac(%rbp)
jmp 0x7dc7
movsd -0x7a0(%rbp), %xmm0
cvtsi2sdl -0x2c(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
jmp 0x7ec0
jmp 0x7ec2
movq 0x120f7(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x7ed7
leaq 0xa59c(%rip), %rsi      # 0x1247a
leaq -0x6f8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x9a0(%rbp)
jmp 0x7ef3
movq -0x9a0(%rbp), %rdi
movq -0x7d8(%rbp), %rax
movslq -0x798(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x22e0
movq %rax, -0x9a8(%rbp)
jmp 0x7f19
movq -0x9a8(%rbp), %rdi
leaq 0xa563(%rip), %rsi      # 0x1248a
callq 0x21b0
movq %rax, -0x9b0(%rbp)
jmp 0x7f35
movq -0x9b0(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
callq 0x2330
movq %rax, -0x9b8(%rbp)
jmp 0x7f4f
movq -0x9b8(%rbp), %rdi
movq 0x12063(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7f64
movl $0x0, -0x7b0(%rbp)
movl -0x7b0(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x81cf
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movslq -0x7b0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x9c0(%rbp)
jmp 0x7fbb
movsd -0x9c0(%rbp), %xmm0
leaq -0x6f8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9c8(%rbp)
jmp 0x7fd8
movq -0x9c8(%rbp), %rdi
leaq 0xa4b5(%rip), %rsi      # 0x1249b
callq 0x21b0
movq %rax, -0x9d0(%rbp)
jmp 0x7ff4
movq -0x9d0(%rbp), %rdi
movq 0x11fbe(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x8009
movq -0x800(%rbp), %rax
movq -0x808(%rbp), %rdx
movslq -0x7b0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x9d8(%rbp)
jmp 0x8047
movsd -0x9d8(%rbp), %xmm0
leaq -0x6f8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9e0(%rbp)
jmp 0x8064
movq -0x9e0(%rbp), %rdi
leaq 0xa431(%rip), %rsi      # 0x124a3
callq 0x21b0
movq %rax, -0x9e8(%rbp)
jmp 0x8080
movq -0x9e8(%rbp), %rdi
movq 0x11f32(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x8095
cmpl $0x0, -0x54(%rbp)
je 0x81b9
movq -0x7f0(%rbp), %rax
movq -0x7f8(%rbp), %rdx
movslq -0x7b0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x9f0(%rbp)
jmp 0x80dd
movsd -0x9f0(%rbp), %xmm0
leaq -0x6f8(%rbp), %rdi
callq 0x2330
movq %rax, -0x9f8(%rbp)
jmp 0x80fa
movq -0x9f8(%rbp), %rdi
leaq 0xa39f(%rip), %rsi      # 0x124a7
callq 0x21b0
movq %rax, -0xa00(%rbp)
jmp 0x8116
movq -0xa00(%rbp), %rdi
movq 0x11e9c(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x812b
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x7b0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x798(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x794(%rbp), %edi
callq 0x5240
movsd %xmm0, -0xa08(%rbp)
jmp 0x8169
movsd -0xa08(%rbp), %xmm0
leaq -0x6f8(%rbp), %rdi
callq 0x2330
movq %rax, -0xa10(%rbp)
jmp 0x8186
movq -0xa10(%rbp), %rdi
leaq 0xa317(%rip), %rsi      # 0x124ab
callq 0x21b0
movq %rax, -0xa18(%rbp)
jmp 0x81a2
movq -0xa18(%rbp), %rdi
movq 0x11e10(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x81b7
jmp 0x81b9
jmp 0x81bb
movl -0x7b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7b0(%rbp)
jmp 0x7f6e
jmp 0x81d1
movl -0x798(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x798(%rbp)
jmp 0x7ab4
leaq -0x6f8(%rbp), %rdi
callq 0x2230
jmp 0x81f3
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x8201
movq -0x10(%rbp), %rsi
leaq -0x360(%rbp), %rdi
movl $0x2, %edx
callq 0x85b0
jmp 0x8218
leaq -0x2c8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x8232
movl $0x0, -0x7b4(%rbp)
movl -0x7b4(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x82dc
movl $0x0, -0x7b8(%rbp)
movl -0x7b8(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x82c6
movq -0x810(%rbp), %rax
movq -0x818(%rbp), %rdx
movslq -0x7b8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x7b4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0xa20(%rbp)
jmp 0x829e
movq -0xa20(%rbp), %rdi
leaq 0xa1cc(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x82b3
jmp 0x82b5
movl -0x7b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7b8(%rbp)
jmp 0x8255
jmp 0x82c8
movl -0x7b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7b4(%rbp)
jmp 0x823c
movq 0x11cdd(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x82f1
movl $0x0, -0x7bc(%rbp)
movl -0x7bc(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x839b
movl $0x0, -0x7c0(%rbp)
movl -0x7c0(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x8385
movq -0x800(%rbp), %rax
movq -0x808(%rbp), %rdx
movslq -0x7c0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x7bc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0xa28(%rbp)
jmp 0x835d
movq -0xa28(%rbp), %rdi
leaq 0xa10d(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x8372
jmp 0x8374
movl -0x7c0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c0(%rbp)
jmp 0x8314
jmp 0x8387
movl -0x7bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7bc(%rbp)
jmp 0x82fb
movq 0x11c1e(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x83b0
cmpl $0x0, -0x54(%rbp)
je 0x853a
movl $0x0, -0x7c4(%rbp)
movl -0x7c4(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x8464
movl $0x0, -0x7c8(%rbp)
movl -0x7c8(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x844e
movq -0x7f0(%rbp), %rax
movq -0x7f8(%rbp), %rdx
movslq -0x7c8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x7c4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0xa30(%rbp)
jmp 0x8426
movq -0xa30(%rbp), %rdi
leaq 0xa044(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x843b
jmp 0x843d
movl -0x7c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c8(%rbp)
jmp 0x83dd
jmp 0x8450
movl -0x7c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c4(%rbp)
jmp 0x83c4
movq 0x11b55(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x8479
movl $0x0, -0x7cc(%rbp)
movl -0x7cc(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x8523
movl $0x0, -0x7d0(%rbp)
movl -0x7d0(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x850d
movq -0x7e0(%rbp), %rax
movq -0x7e8(%rbp), %rdx
movslq -0x7d0(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x7cc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2c8(%rbp), %rdi
callq 0x2330
movq %rax, -0xa38(%rbp)
jmp 0x84e5
movq -0xa38(%rbp), %rdi
leaq 0x9f85(%rip), %rsi      # 0x12478
callq 0x21b0
jmp 0x84fa
jmp 0x84fc
movl -0x7d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7d0(%rbp)
jmp 0x849c
jmp 0x850f
movl -0x7cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7cc(%rbp)
jmp 0x8483
movq 0x11a96(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x8538
jmp 0x853a
movq 0x11a7f(%rip), %rsi     # 0x19fc0
leaq -0x2c8(%rbp), %rdi
callq 0x21d0
jmp 0x854f
leaq -0x2c8(%rbp), %rdi
callq 0x2230
jmp 0x855d
movl $0x0, -0x4(%rbp)
leaq -0x6f8(%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
nopw %cs:(%rax,%rax)