// File: ashlall[P]StreamStats/ChiSquareExperiments/VarySizeOneSample.cpp
// Function: main
int main(int argc, char* argv[])
{
  if (argc < 10)
  {
    cout << "usage: VarySize lower-size upper-size num-streams(>0) [N|U|P|E] location scale [0|1] memory-percent 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 location = atof (argv[5]);
  double scale = atof (argv[6]);
  int all_quantiles = atoi (argv[7]);
  double memory_percent = atof (argv[8]);
  int num_buckets = atoi(argv[9]);
  int seed = 1; 

  // ensures that the parameters will not create error
  if (data_repeats <= 0)
  {
    cout << "The number of streams must be greater than zero." << endl;
    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." << endl;
    throw ParameterError();
  }
  if (lower <= 0)
  {
    cout << "The lower stream size must be greater than 0." << endl;
    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 stream_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];
  long times[data_repeats][num_sizes];
  long times2[data_repeats][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 << ", location = " << location << ", scale = " << scale << endl;

  for (int i = 0; i < data_repeats; i++) // runs all tests data_repeats times
  {
    stream_size = lower;
    int j = 0;
    data_file << "Stream " << i+1 << ":" << endl;
    while (stream_size <= upper)  // runs tests for every stream size
    {
      int sample_size = memory_percent * stream_size;
      if (i == 0)
        sizes[j] = stream_size;
      data_file << "stream_size = " << stream_size << endl;
      
      // generates the data based on inputed parameters
      DataGenerator data(distribution_type, stream_size, seed, location, scale);
      double *stream = data.get_stream();

      // computes GK estimate
      ChiSquareContinuous sketch1(sample_size, 1); 

	  timeval timeBefore, timeAfter; // initializes variables
  	  long diffSeconds, diffUSeconds;
 	  gettimeofday(&timeBefore, NULL); 

      for (int i = 0; i < stream_size; i++)
	      sketch1.insert(stream[i]);

	  gettimeofday(&timeAfter, NULL); // get time for insertion
  	  diffSeconds = timeAfter.tv_sec - timeBefore.tv_sec;
  	  diffUSeconds = timeAfter.tv_usec - timeBefore.tv_usec;

	  times[i][j] = diffSeconds;
	  times2[i][j] = diffUSeconds;


      double GK_stat = get_estimate(&sketch1, distribution_type, num_buckets, location, scale);
      GK_values[i][j] = GK_stat;
      data_file << "GK = " << GK_stat << endl;

      if (all_quantiles)
      {
      	// computes QDigest estimate
	ChiSquareContinuous sketch2(sample_size, 2);
	for (int i = 0; i < stream_size; i++)
          sketch2.insert(stream[i]);
	double QD_stat = get_estimate(&sketch2, distribution_type, num_buckets, location, scale);
	QD_values[i][j] = QD_stat;
        data_file << "QDigest = " << QD_stat << endl;

	// computes ReservoirSampling estimate
	ChiSquareContinuous sketch3(sample_size, 3);
	for (int i = 0; i < stream_size; i++)
	  sketch3.insert(stream[i]);
	double RS_stat = get_estimate(&sketch3, distribution_type, num_buckets, location, scale);
	RS_values[i][j] = RS_stat;
        data_file << "Reservoir Sampling = " << RS_stat << endl;
      }

      // computes actual statistic
      double *upper_interval = sketch1.get_upper();
      double *lower_interval = sketch1.get_lower();
      double actual = data.get_stat_one_sample(num_buckets, upper_interval, lower_interval);
      actual_values[i][j] = actual;
      data_file << "Real = " << actual << endl;

      stream_size *= 10;
      j++;
    }
    seed++; // changes seed for next repeat?
  }
  data_file.close();

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

  // creates time table file
  ofstream time_file;
  char str2[150];
  name_file(str2, argv, 5);
  time_file.open(str2);

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

  int deg_freedom = num_buckets - get_DOF(distribution_type);
  for (int i = 0; i < num_sizes; i++)
  {
    data_file << sizes[i] << "\t";
	time_file << sizes[i] << "\t";

    // 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;

	// adds times to the time table
	long double avg_time = 0.0;
	for (int j = 0; j < data_repeats; j++)
		avg_time += times[j][i] + times2[j][i]/1000000.0;// diffSeconds + diffUSeconds/1000000.0
	time_file << avg_time / data_repeats << endl;

    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 << "streamsize = " << sizes[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();
  time_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 statistcs 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.close();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc80, %rsp            # imm = 0xC80
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xa, -0x8(%rbp)
jge 0x6b5e
movq 0x134aa(%rip), %rdi     # 0x19fd0
leaq 0xb724(%rip), %rsi      # 0x12251
callq 0x21b0
movq %rax, %rdi
movq 0x13484(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x130fb(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2210
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2280
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 0x2210
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2210
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2280
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2280
movl %eax, -0x4c(%rbp)
movl $0x1, -0x50(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x6c41
movq 0x133c7(%rip), %rdi     # 0x19fd0
leaq 0xb6b1(%rip), %rsi      # 0x122c1
callq 0x21b0
movq %rax, %rdi
movq 0x133a1(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x13018(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
movsbl -0x25(%rbp), %eax
cmpl $0x4e, %eax
je 0x6ca4
movsbl -0x25(%rbp), %eax
cmpl $0x55, %eax
je 0x6ca4
movsbl -0x25(%rbp), %eax
cmpl $0x50, %eax
je 0x6ca4
movsbl -0x25(%rbp), %eax
cmpl $0x45, %eax
je 0x6ca4
movq 0x13364(%rip), %rdi     # 0x19fd0
leaq 0xb67f(%rip), %rsi      # 0x122f2
callq 0x21b0
movq %rax, %rdi
movq 0x1333e(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12fb5(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jb 0x6ced
movq 0x1331b(%rip), %rdi     # 0x19fd0
leaq 0xb660(%rip), %rsi      # 0x1231c
callq 0x21b0
movq %rax, %rdi
movq 0x132f5(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f6c(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
xorps %xmm0, %xmm0
ucomisd -0x48(%rbp), %xmm0
jb 0x6d27
movq 0x132d2(%rip), %rdi     # 0x19fd0
leaq 0xb645(%rip), %rsi      # 0x1234a
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f32(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
cmpl $0x0, -0x4c(%rbp)
jg 0x6d5d
movq 0x1329c(%rip), %rdi     # 0x19fd0
leaq 0xb63b(%rip), %rsi      # 0x12376
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12efc(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
movl $0x0, -0x58(%rbp)
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x5c(%rbp)
cvtsi2sdl -0x5c(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x6d8e
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
imull $0xa, -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x6d6c
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xaa8(%rbp)
movq %rsp, %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xaa0(%rbp)
movq %rdx, %rsp
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xa98(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xa90(%rbp)
movq %rdx, %rsp
movq %rcx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xa88(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xa80(%rbp)
movq %rdx, %rsp
movq %rcx, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xa78(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xa70(%rbp)
movq %rdx, %rsp
movq %rcx, -0xa0(%rbp)
movq %rax, -0xa8(%rbp)
movl -0x58(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0xa68(%rbp)
movq %rcx, %rsp
movq %rax, -0xb0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xa60(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xa58(%rbp)
movq %rdx, %rsp
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0xa50(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0xa48(%rbp)
movq %rdx, %rsp
movq %rcx, -0xc8(%rbp)
movq %rax, -0xd0(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x22e0
movq -0x10(%rbp), %rsi
leaq -0x370(%rbp), %rdi
xorl %edx, %edx
callq 0x8470
jmp 0x6f52
leaq -0x2d0(%rbp), %rdi
leaq -0x370(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x6f6c
leaq 0xb42f(%rip), %rsi      # 0x123a2
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xab0(%rbp)
jmp 0x6f88
movq -0xab0(%rbp), %rdi
movsbl -0x25(%rbp), %esi
callq 0x21f0
movq %rax, -0xab8(%rbp)
jmp 0x6fa1
movq -0xab8(%rbp), %rdi
leaq 0xb402(%rip), %rsi      # 0x123b1
callq 0x21b0
movq %rax, -0xac0(%rbp)
jmp 0x6fbd
movq -0xac0(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x2350
movq %rax, -0xac8(%rbp)
jmp 0x6fd7
movq -0xac8(%rbp), %rdi
leaq 0xb3da(%rip), %rsi      # 0x123bf
callq 0x21b0
movq %rax, -0xad0(%rbp)
jmp 0x6ff3
movq -0xad0(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x2350
movq %rax, -0xad8(%rbp)
jmp 0x700d
movq -0xad8(%rbp), %rdi
movq 0x12fa5(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7022
movl $0x0, -0x380(%rbp)
movl -0x380(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7792
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x384(%rbp)
leaq 0xb376(%rip), %rsi      # 0x123ca
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xae0(%rbp)
jmp 0x7069
movq -0xae0(%rbp), %rdi
movl -0x380(%rbp), %esi
incl %esi
callq 0x2300
movq %rax, -0xae8(%rbp)
jmp 0x7086
movq -0xae8(%rbp), %rdi
leaq 0xb33e(%rip), %rsi      # 0x123d2
callq 0x21b0
movq %rax, -0xaf0(%rbp)
jmp 0x70a2
movq -0xaf0(%rbp), %rdi
movq 0x12f10(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x70b7
jmp 0x70b9
cvtsi2sdl -0x54(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x7775
movsd -0x48(%rbp), %xmm0
cvtsi2sdl -0x54(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x388(%rbp)
cmpl $0x0, -0x380(%rbp)
jne 0x711b
movq -0xa68(%rbp), %rax
movl -0x54(%rbp), %edx
movslq -0x384(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x711b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x8450
leaq 0xb2b2(%rip), %rsi      # 0x123d4
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xaf8(%rbp)
jmp 0x7137
movq -0xaf8(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x2300
movq %rax, -0xb00(%rbp)
jmp 0x714f
movq -0xb00(%rbp), %rdi
movq 0x12e63(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7164
movsbl -0x25(%rbp), %esi
movl -0x54(%rbp), %edx
movl -0x50(%rbp), %ecx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x398(%rbp), %rdi
callq 0x2500
jmp 0x7186
leaq -0x398(%rbp), %rdi
callq 0x95b0
movq %rax, -0xb08(%rbp)
jmp 0x719b
movq -0xb08(%rbp), %rax
movq %rax, -0x3a0(%rbp)
cvtsi2sdl -0x388(%rbp), %xmm0
leaq -0x3c8(%rbp), %rdi
movl $0x1, %esi
callq 0x58b0
jmp 0x71c4
leaq -0x3d8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2290
movl $0x0, -0x3fc(%rbp)
movl -0x3fc(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x724b
movq -0x3a0(%rbp), %rax
movslq -0x3fc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x3c8(%rbp), %rdi
callq 0x5ad0
jmp 0x720a
jmp 0x720c
movl -0x3fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3fc(%rbp)
jmp 0x71de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x7764
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x7758
xorl %eax, %eax
movl %eax, %esi
leaq -0x3e8(%rbp), %rdi
callq 0x2290
movq -0xa60(%rbp), %r8
movq -0xa58(%rbp), %rcx
movq -0xa50(%rbp), %rsi
movq -0xa48(%rbp), %rax
movq -0x3e8(%rbp), %rdx
movq -0x3d8(%rbp), %rdi
subq %rdi, %rdx
movq %rdx, -0x3f0(%rbp)
movq -0x3e0(%rbp), %rdx
movq -0x3d0(%rbp), %rdi
subq %rdi, %rdx
movq %rdx, -0x3f8(%rbp)
movq -0x3f0(%rbp), %rdi
movslq -0x380(%rbp), %rdx
imulq %r8, %rdx
leaq (%rcx,%rdx,8), %rcx
movslq -0x384(%rbp), %rdx
movq %rdi, (%rcx,%rdx,8)
movq -0x3f8(%rbp), %rdx
movslq -0x380(%rbp), %rcx
imulq %rsi, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x384(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movsbl -0x25(%rbp), %esi
movl -0x4c(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x3c8(%rbp), %rdi
callq 0x86c0
movsd %xmm0, -0xb10(%rbp)
jmp 0x7310
movq -0xa90(%rbp), %rax
movq -0xa98(%rbp), %rdx
movsd -0xb10(%rbp), %xmm0
movsd %xmm0, -0x408(%rbp)
movsd -0x408(%rbp), %xmm0
movslq -0x380(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x384(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xb08b(%rip), %rsi      # 0x123e3
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xb18(%rbp)
jmp 0x736d
movq -0xb18(%rbp), %rdi
movsd -0x408(%rbp), %xmm0
callq 0x2350
movq %rax, -0xb20(%rbp)
jmp 0x738a
movq -0xb20(%rbp), %rdi
movq 0x12c28(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x739f
cmpl $0x0, -0x3c(%rbp)
je 0x7642
cvtsi2sdl -0x388(%rbp), %xmm0
leaq -0x430(%rbp), %rdi
movl $0x2, %esi
callq 0x58b0
jmp 0x73c4
movl $0x0, -0x434(%rbp)
movl -0x434(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x7424
movq -0x3a0(%rbp), %rax
movslq -0x434(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x430(%rbp), %rdi
callq 0x5ad0
jmp 0x73fa
jmp 0x73fc
movl -0x434(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x73ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x7631
movsbl -0x25(%rbp), %esi
movl -0x4c(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x430(%rbp), %rdi
callq 0x86c0
movsd %xmm0, -0xb28(%rbp)
jmp 0x744b
movq -0xa80(%rbp), %rax
movq -0xa88(%rbp), %rdx
movsd -0xb28(%rbp), %xmm0
movsd %xmm0, -0x440(%rbp)
movsd -0x440(%rbp), %xmm0
movslq -0x380(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x384(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xaf56(%rip), %rsi      # 0x123e9
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xb30(%rbp)
jmp 0x74a8
movq -0xb30(%rbp), %rdi
movsd -0x440(%rbp), %xmm0
callq 0x2350
movq %rax, -0xb38(%rbp)
jmp 0x74c5
movq -0xb38(%rbp), %rdi
movq 0x12aed(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x74da
cvtsi2sdl -0x388(%rbp), %xmm0
leaq -0x468(%rbp), %rdi
movl $0x3, %esi
callq 0x58b0
jmp 0x74f5
movl $0x0, -0x46c(%rbp)
movl -0x46c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x7561
movq -0x3a0(%rbp), %rax
movslq -0x46c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x468(%rbp), %rdi
callq 0x5ad0
jmp 0x752b
jmp 0x752d
movl -0x46c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x46c(%rbp)
jmp 0x74ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x5a60
jmp 0x7631
movsbl -0x25(%rbp), %esi
movl -0x4c(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x468(%rbp), %rdi
callq 0x86c0
movsd %xmm0, -0xb40(%rbp)
jmp 0x7588
movq -0xa70(%rbp), %rax
movq -0xa78(%rbp), %rdx
movsd -0xb40(%rbp), %xmm0
movsd %xmm0, -0x478(%rbp)
movsd -0x478(%rbp), %xmm0
movslq -0x380(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x384(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xae24(%rip), %rsi      # 0x123f4
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xb48(%rbp)
jmp 0x75e5
movq -0xb48(%rbp), %rdi
movsd -0x478(%rbp), %xmm0
callq 0x2350
movq %rax, -0xb50(%rbp)
jmp 0x7602
movq -0xb50(%rbp), %rdi
movq 0x129b0(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7617
leaq -0x468(%rbp), %rdi
callq 0x5a60
leaq -0x430(%rbp), %rdi
callq 0x5a60
jmp 0x7642
leaq -0x430(%rbp), %rdi
callq 0x5a60
jmp 0x7758
leaq -0x3c8(%rbp), %rdi
movq %rdi, -0xb60(%rbp)
callq 0x6a10
movq -0xb60(%rbp), %rdi
movq %rax, -0x480(%rbp)
callq 0x69f0
movq %rax, -0x488(%rbp)
movl -0x4c(%rbp), %esi
movq -0x480(%rbp), %rdx
movq -0x488(%rbp), %rcx
leaq -0x398(%rbp), %rdi
callq 0x2800
movsd %xmm0, -0xb58(%rbp)
jmp 0x7696
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movsd -0xb58(%rbp), %xmm0
movsd %xmm0, -0x490(%rbp)
movsd -0x490(%rbp), %xmm0
movslq -0x380(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x384(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xad2c(%rip), %rsi      # 0x1240a
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xb68(%rbp)
jmp 0x76f3
movq -0xb68(%rbp), %rdi
movsd -0x490(%rbp), %xmm0
callq 0x2350
movq %rax, -0xb70(%rbp)
jmp 0x7710
movq -0xb70(%rbp), %rdi
movq 0x128a2(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7725
imull $0xa, -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x384(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x384(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0x5a60
leaq -0x398(%rbp), %rdi
callq 0x95d0
jmp 0x70b9
leaq -0x3c8(%rbp), %rdi
callq 0x5a60
leaq -0x398(%rbp), %rdi
callq 0x95d0
jmp 0x8450
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x380(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x380(%rbp)
jmp 0x702c
leaq -0x2d0(%rbp), %rdi
callq 0x2240
jmp 0x77a0
movq -0x10(%rbp), %rsi
leaq -0x370(%rbp), %rdi
movl $0x1, %edx
callq 0x8470
jmp 0x77b7
leaq -0x2d0(%rbp), %rdi
leaq -0x370(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x77d1
leaq -0x690(%rbp), %rdi
callq 0x22e0
jmp 0x77df
movq -0x10(%rbp), %rsi
leaq -0x730(%rbp), %rdi
movl $0x5, %edx
callq 0x8470
jmp 0x77f6
leaq -0x690(%rbp), %rdi
leaq -0x730(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x7810
leaq -0x930(%rbp), %rdi
callq 0x22e0
jmp 0x781e
movq -0x10(%rbp), %rsi
leaq -0x9d0(%rbp), %rdi
movl $0x3, %edx
callq 0x8470
jmp 0x7835
leaq -0x930(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x784f
movl -0x4c(%rbp), %eax
movl %eax, -0xb78(%rbp)
movsbl -0x25(%rbp), %edi
callq 0x8780
movl %eax, -0xb74(%rbp)
jmp 0x7869
movl -0xb74(%rbp), %ecx
movl -0xb78(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x9d4(%rbp)
movl $0x0, -0x9d8(%rbp)
movl -0x9d8(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x8099
movq -0xa68(%rbp), %rax
movslq -0x9d8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -0x2d0(%rbp), %rdi
callq 0x2300
movq %rax, -0xb80(%rbp)
jmp 0x78bc
movq -0xb80(%rbp), %rdi
leaq 0xab48(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x78d1
movq -0xa68(%rbp), %rax
movslq -0x9d8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -0x690(%rbp), %rdi
callq 0x2300
movq %rax, -0xb88(%rbp)
jmp 0x78f7
movq -0xb88(%rbp), %rdi
leaq 0xab0d(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x790c
xorps %xmm0, %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl $0x0, -0x9e4(%rbp)
movl -0x9e4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7a35
movq -0xa90(%rbp), %rax
movq -0xa98(%rbp), %rdx
movslq -0x9e4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xb90(%rbp)
jmp 0x796e
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movslq -0x9e4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xb98(%rbp)
jmp 0x79ac
movsd -0xb98(%rbp), %xmm1
movsd -0xb90(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9520
movsd %xmm0, -0xba0(%rbp)
jmp 0x79cf
movsd -0xba0(%rbp), %xmm0
addsd -0x9e0(%rbp), %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl -0x9e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9e4(%rbp)
jmp 0x7921
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x8444
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x930(%rbp), %rdi
callq 0x2260
jmp 0x8444
movsd -0x9e0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
jmp 0x7a54
fldz
fstpt -0xa00(%rbp)
movl $0x0, -0xa04(%rbp)
movl -0xa04(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7afe
movq -0xa48(%rbp), %rax
movq -0xa50(%rbp), %rsi
movq -0xa58(%rbp), %rcx
movq -0xa60(%rbp), %r8
movslq -0xa04(%rbp), %rdx
movq %rdx, %rdi
imulq %r8, %rdi
leaq (%rcx,%rdi,8), %rdi
movslq -0x9d8(%rbp), %rcx
cvtsi2sdq (%rdi,%rcx,8), %xmm0
imulq %rsi, %rdx
leaq (%rax,%rdx,8), %rax
cvtsi2sdq (%rax,%rcx,8), %xmm1
movsd 0xa68a(%rip), %xmm2     # 0x12150
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xa40(%rbp)
fldl -0xa40(%rbp)
fldt -0xa00(%rbp)
faddp %st, %st(1)
fstpt -0xa00(%rbp)
movl -0xa04(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa04(%rbp)
jmp 0x7a66
fldt -0xa00(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xa34(%rbp)
fildl -0xa34(%rbp)
fdivrp %st, %st(1)
subq $0x10, %rsp
movq %rsp, %rax
fstpt (%rax)
leaq -0x690(%rbp), %rdi
callq 0x21e0
addq $0x10, %rsp
movq %rax, -0xba8(%rbp)
jmp 0x7b37
movq -0xba8(%rbp), %rdi
movq 0x1247b(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7b4c
cmpl $0x0, -0x3c(%rbp)
je 0x7dac
xorps %xmm0, %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl $0x0, -0xa08(%rbp)
movl -0xa08(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7c45
movq -0xa80(%rbp), %rax
movq -0xa88(%rbp), %rdx
movslq -0xa08(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xbb0(%rbp)
jmp 0x7bb8
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movslq -0xa08(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xbb8(%rbp)
jmp 0x7bf6
movsd -0xbb8(%rbp), %xmm1
movsd -0xbb0(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9520
movsd %xmm0, -0xbc0(%rbp)
jmp 0x7c19
movsd -0xbc0(%rbp), %xmm0
addsd -0x9e0(%rbp), %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl -0xa08(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa08(%rbp)
jmp 0x7b6b
leaq 0xa7c6(%rip), %rsi      # 0x12412
leaq -0x2d0(%rbp), %rdi
callq 0x21b0
movq %rax, -0xbc8(%rbp)
jmp 0x7c61
movq -0xbc8(%rbp), %rdi
movsd -0x9e0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x2350
movq %rax, -0xbd0(%rbp)
jmp 0x7c87
movq -0xbd0(%rbp), %rdi
leaq 0xa77d(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x7c9c
xorps %xmm0, %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl $0x0, -0xa0c(%rbp)
movl -0xa0c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7d8b
movq -0xa70(%rbp), %rax
movq -0xa78(%rbp), %rdx
movslq -0xa0c(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xbd8(%rbp)
jmp 0x7cfe
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movslq -0xa0c(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xbe0(%rbp)
jmp 0x7d3c
movsd -0xbe0(%rbp), %xmm1
movsd -0xbd8(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9520
movsd %xmm0, -0xbe8(%rbp)
jmp 0x7d5f
movsd -0xbe8(%rbp), %xmm0
addsd -0x9e0(%rbp), %xmm0
movsd %xmm0, -0x9e0(%rbp)
movl -0xa0c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0c(%rbp)
jmp 0x7cb1
movsd -0x9e0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
jmp 0x7daa
jmp 0x7dac
movq 0x1220d(%rip), %rsi     # 0x19fc0
leaq -0x2d0(%rbp), %rdi
callq 0x21d0
jmp 0x7dc1
leaq 0xa64c(%rip), %rsi      # 0x12414
leaq -0x930(%rbp), %rdi
callq 0x21b0
movq %rax, -0xbf0(%rbp)
jmp 0x7ddd
movq -0xbf0(%rbp), %rdi
movq -0xa68(%rbp), %rax
movslq -0x9d8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x2300
movq %rax, -0xbf8(%rbp)
jmp 0x7e03
movq -0xbf8(%rbp), %rdi
movq 0x121af(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7e18
movl $0x0, -0xa10(%rbp)
movl -0xa10(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8083
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movslq -0xa10(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xc00(%rbp)
jmp 0x7e6f
movsd -0xc00(%rbp), %xmm0
leaq -0x930(%rbp), %rdi
callq 0x2350
movq %rax, -0xc08(%rbp)
jmp 0x7e8c
movq -0xc08(%rbp), %rdi
leaq 0xa588(%rip), %rsi      # 0x12422
callq 0x21b0
movq %rax, -0xc10(%rbp)
jmp 0x7ea8
movq -0xc10(%rbp), %rdi
movq 0x1210a(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7ebd
movq -0xa90(%rbp), %rax
movq -0xa98(%rbp), %rdx
movslq -0xa10(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xc18(%rbp)
jmp 0x7efb
movsd -0xc18(%rbp), %xmm0
leaq -0x930(%rbp), %rdi
callq 0x2350
movq %rax, -0xc20(%rbp)
jmp 0x7f18
movq -0xc20(%rbp), %rdi
leaq 0xa504(%rip), %rsi      # 0x1242a
callq 0x21b0
movq %rax, -0xc28(%rbp)
jmp 0x7f34
movq -0xc28(%rbp), %rdi
movq 0x1207e(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7f49
cmpl $0x0, -0x3c(%rbp)
je 0x806d
movq -0xa80(%rbp), %rax
movq -0xa88(%rbp), %rdx
movslq -0xa10(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xc30(%rbp)
jmp 0x7f91
movsd -0xc30(%rbp), %xmm0
leaq -0x930(%rbp), %rdi
callq 0x2350
movq %rax, -0xc38(%rbp)
jmp 0x7fae
movq -0xc38(%rbp), %rdi
leaq 0xa472(%rip), %rsi      # 0x1242e
callq 0x21b0
movq %rax, -0xc40(%rbp)
jmp 0x7fca
movq -0xc40(%rbp), %rdi
movq 0x11fe8(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7fdf
movq -0xa70(%rbp), %rax
movq -0xa78(%rbp), %rdx
movslq -0xa10(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x9d8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x9d4(%rbp), %edi
callq 0x5260
movsd %xmm0, -0xc48(%rbp)
jmp 0x801d
movsd -0xc48(%rbp), %xmm0
leaq -0x930(%rbp), %rdi
callq 0x2350
movq %rax, -0xc50(%rbp)
jmp 0x803a
movq -0xc50(%rbp), %rdi
leaq 0xa3ea(%rip), %rsi      # 0x12432
callq 0x21b0
movq %rax, -0xc58(%rbp)
jmp 0x8056
movq -0xc58(%rbp), %rdi
movq 0x11f5c(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x806b
jmp 0x806d
jmp 0x806f
movl -0xa10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa10(%rbp)
jmp 0x7e22
jmp 0x8085
movl -0x9d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9d8(%rbp)
jmp 0x7887
leaq -0x930(%rbp), %rdi
callq 0x2240
jmp 0x80a7
leaq -0x2d0(%rbp), %rdi
callq 0x2240
jmp 0x80b5
leaq -0x690(%rbp), %rdi
callq 0x2240
jmp 0x80c3
movq -0x10(%rbp), %rsi
leaq -0x370(%rbp), %rdi
movl $0x2, %edx
callq 0x8470
jmp 0x80da
leaq -0x2d0(%rbp), %rdi
leaq -0x370(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x80f4
movl $0x0, -0xa14(%rbp)
movl -0xa14(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x819e
movl $0x0, -0xa18(%rbp)
movl -0xa18(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8188
movq -0xaa0(%rbp), %rax
movq -0xaa8(%rbp), %rdx
movslq -0xa18(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0xa14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
movq %rax, -0xc60(%rbp)
jmp 0x8160
movq -0xc60(%rbp), %rdi
leaq 0xa2a4(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x8175
jmp 0x8177
movl -0xa18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa18(%rbp)
jmp 0x8117
jmp 0x818a
movl -0xa14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa14(%rbp)
jmp 0x80fe
movq 0x11e1b(%rip), %rsi     # 0x19fc0
leaq -0x2d0(%rbp), %rdi
callq 0x21d0
jmp 0x81b3
movl $0x0, -0xa1c(%rbp)
movl -0xa1c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x825d
movl $0x0, -0xa20(%rbp)
movl -0xa20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8247
movq -0xa90(%rbp), %rax
movq -0xa98(%rbp), %rdx
movslq -0xa20(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0xa1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
movq %rax, -0xc68(%rbp)
jmp 0x821f
movq -0xc68(%rbp), %rdi
leaq 0xa1e5(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x8234
jmp 0x8236
movl -0xa20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa20(%rbp)
jmp 0x81d6
jmp 0x8249
movl -0xa1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa1c(%rbp)
jmp 0x81bd
movq 0x11d5c(%rip), %rsi     # 0x19fc0
leaq -0x2d0(%rbp), %rdi
callq 0x21d0
jmp 0x8272
cmpl $0x0, -0x3c(%rbp)
je 0x83fc
movl $0x0, -0xa24(%rbp)
movl -0xa24(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x8326
movl $0x0, -0xa28(%rbp)
movl -0xa28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8310
movq -0xa80(%rbp), %rax
movq -0xa88(%rbp), %rdx
movslq -0xa28(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0xa24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
movq %rax, -0xc70(%rbp)
jmp 0x82e8
movq -0xc70(%rbp), %rdi
leaq 0xa11c(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x82fd
jmp 0x82ff
movl -0xa28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa28(%rbp)
jmp 0x829f
jmp 0x8312
movl -0xa24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa24(%rbp)
jmp 0x8286
movq 0x11c93(%rip), %rsi     # 0x19fc0
leaq -0x2d0(%rbp), %rdi
callq 0x21d0
jmp 0x833b
movl $0x0, -0xa2c(%rbp)
movl -0xa2c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x83e5
movl $0x0, -0xa30(%rbp)
movl -0xa30(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x83cf
movq -0xa70(%rbp), %rax
movq -0xa78(%rbp), %rdx
movslq -0xa30(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0xa2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2d0(%rbp), %rdi
callq 0x2350
movq %rax, -0xc78(%rbp)
jmp 0x83a7
movq -0xc78(%rbp), %rdi
leaq 0xa05d(%rip), %rsi      # 0x12412
callq 0x21b0
jmp 0x83bc
jmp 0x83be
movl -0xa30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa30(%rbp)
jmp 0x835e
jmp 0x83d1
movl -0xa2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa2c(%rbp)
jmp 0x8345
movq 0x11bd4(%rip), %rsi     # 0x19fc0
leaq -0x2d0(%rbp), %rdi
callq 0x21d0
jmp 0x83fa
jmp 0x83fc
leaq -0x2d0(%rbp), %rdi
callq 0x2240
jmp 0x840a
movl $0x0, -0x4(%rbp)
leaq -0x930(%rbp), %rdi
callq 0x2260
leaq -0x690(%rbp), %rdi
callq 0x2260
leaq -0x2d0(%rbp), %rdi
callq 0x2260
movq -0x68(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x690(%rbp), %rdi
callq 0x2260
leaq -0x2d0(%rbp), %rdi
callq 0x2260
movq -0x378(%rbp), %rdi
callq 0x2320
nopl (%rax,%rax)