// File: ashlall[P]StreamStats/ChiSquareExperiments/VaryBinsOneSample.cpp
// Function: main
int main(int argc, char* argv[])
{
  if (argc < 10)
  {
    cout << "usage: VaryBinsOneSample lower-bins upper-bins num-streams(>0) [N|U|P|E] location scale [0|1] memory-percent stream-size" << 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 stream_size = 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 number of bins 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 (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
  int num_buckets;
  int num_sizes = 0, size = lower;
  while (size <= upper)
  {
    num_sizes++;
    size += 20;
  }

  // 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 bins[num_sizes];
  int sample_size = memory_percent * stream_size;

  // 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;
  data_file << "stream_size = " << stream_size << endl;

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

    // generates the data based on inputed parameters                         
    DataGenerator data(distribution_type, stream_size, seed, location, scale);
    double *stream = data.get_stream();
    while (num_buckets <= upper)  // runs tests for every number of buckets
    {
      if (i == 0)
        bins[j] = num_buckets;
      data_file << "num_buckets = " << num_buckets << endl;
      
      // computes GK estimate
      ChiSquareContinuous sketch1(sample_size, 1); 
      for (int i = 0; i < stream_size; i++)
        sketch1.insert(stream[i]);
      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;

      num_buckets += 20;
      j++;
    }
    seed++; // changes seed for next repeat
  }
  data_file.close();

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

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

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

    // 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 << "num_buckets = " << bins[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_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 $0x940, %rsp            # imm = 0x940
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xa, -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 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 0x2270
movl %eax, -0x3c(%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)
movl $0x1, -0x50(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x6c21
movq 0x133e7(%rip), %rdi     # 0x19fd0
leaq 0xb6da(%rip), %rsi      # 0x122ca
callq 0x21b0
movq %rax, %rdi
movq 0x133c1(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x13038(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movsbl -0x25(%rbp), %eax
cmpl $0x4e, %eax
je 0x6c84
movsbl -0x25(%rbp), %eax
cmpl $0x55, %eax
je 0x6c84
movsbl -0x25(%rbp), %eax
cmpl $0x50, %eax
je 0x6c84
movsbl -0x25(%rbp), %eax
cmpl $0x45, %eax
je 0x6c84
movq 0x13384(%rip), %rdi     # 0x19fd0
leaq 0xb6a8(%rip), %rsi      # 0x122fb
callq 0x21b0
movq %rax, %rdi
movq 0x1335e(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12fd5(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jb 0x6ccd
movq 0x1333b(%rip), %rdi     # 0x19fd0
leaq 0xb689(%rip), %rsi      # 0x12325
callq 0x21b0
movq %rax, %rdi
movq 0x13315(%rip), %rsi     # 0x19fc0
callq 0x21d0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f8c(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
xorps %xmm0, %xmm0
ucomisd -0x48(%rbp), %xmm0
jb 0x6d07
movq 0x132f2(%rip), %rdi     # 0x19fd0
leaq 0xb671(%rip), %rsi      # 0x12356
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f52(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
cmpl $0x0, -0x4c(%rbp)
jg 0x6d3d
movq 0x132bc(%rip), %rdi     # 0x19fd0
leaq 0xb667(%rip), %rsi      # 0x12382
callq 0x21b0
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x12f1c(%rip), %rsi     # 0x19c50
xorl %eax, %eax
movl %eax, %edx
callq 0x22d0
movl $0x0, -0x58(%rbp)
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x5c(%rbp)
cvtsi2sdl -0x5c(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x6d70
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x5c(%rbp)
jmp 0x6d4c
movl -0x24(%rbp), %eax
movl %eax, %ecx
movl -0x58(%rbp), %eax
movq %rax, -0x768(%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, -0x760(%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, -0x758(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x750(%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, -0x748(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x740(%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, -0x738(%rbp)
movq %rcx, %rdx
imulq %rax, %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x730(%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, -0x728(%rbp)
movq %rcx, %rsp
movq %rax, -0xb0(%rbp)
movsd -0x48(%rbp), %xmm0
cvtsi2sdl -0x4c(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xb4(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x22c0
movq -0x10(%rbp), %rsi
leaq -0x350(%rbp), %rdi
xorl %edx, %edx
callq 0x81d0
jmp 0x6ecc
leaq -0x2b8(%rbp), %rdi
leaq -0x350(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x6ee6
leaq 0xb4be(%rip), %rsi      # 0x123ab
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x770(%rbp)
jmp 0x6f02
movq -0x770(%rbp), %rdi
movsbl -0x25(%rbp), %esi
callq 0x21e0
movq %rax, -0x778(%rbp)
jmp 0x6f1b
movq -0x778(%rbp), %rdi
leaq 0xb491(%rip), %rsi      # 0x123ba
callq 0x21b0
movq %rax, -0x780(%rbp)
jmp 0x6f37
movq -0x780(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x2330
movq %rax, -0x788(%rbp)
jmp 0x6f51
movq -0x788(%rbp), %rdi
leaq 0xb469(%rip), %rsi      # 0x123c8
callq 0x21b0
movq %rax, -0x790(%rbp)
jmp 0x6f6d
movq -0x790(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x2330
movq %rax, -0x798(%rbp)
jmp 0x6f87
movq -0x798(%rbp), %rdi
movq 0x1302b(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6f9c
leaq 0xb430(%rip), %rsi      # 0x123d3
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x7a0(%rbp)
jmp 0x6fb8
movq -0x7a0(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x22e0
movq %rax, -0x7a8(%rbp)
jmp 0x6fd0
movq -0x7a8(%rbp), %rdi
movq 0x12fe2(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x6fe5
movl $0x0, -0x360(%rbp)
movl -0x360(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7691
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x364(%rbp)
leaq 0xb3cb(%rip), %rsi      # 0x123e2
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x7b0(%rbp)
jmp 0x702c
movq -0x7b0(%rbp), %rdi
movl -0x360(%rbp), %esi
incl %esi
callq 0x22e0
movq %rax, -0x7b8(%rbp)
jmp 0x7049
movq -0x7b8(%rbp), %rdi
leaq 0xb391(%rip), %rsi      # 0x123e8
callq 0x21b0
movq %rax, -0x7c0(%rbp)
jmp 0x7065
movq -0x7c0(%rbp), %rdi
movq 0x12f4d(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x707a
movsbl -0x25(%rbp), %esi
movl -0x4c(%rbp), %edx
movl -0x50(%rbp), %ecx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x378(%rbp), %rdi
callq 0x24e0
jmp 0x709c
leaq -0x378(%rbp), %rdi
callq 0x9300
movq %rax, -0x7c8(%rbp)
jmp 0x70b1
movq -0x7c8(%rbp), %rax
movq %rax, -0x380(%rbp)
cvtsi2sdl -0x54(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x7657
cmpl $0x0, -0x360(%rbp)
jne 0x7120
movq -0x728(%rbp), %rax
movl -0x54(%rbp), %edx
movslq -0x364(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x7120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
jmp 0x81ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
jmp 0x7680
leaq 0xb2c3(%rip), %rsi      # 0x123ea
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x7d0(%rbp)
jmp 0x713c
movq -0x7d0(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x22e0
movq %rax, -0x7d8(%rbp)
jmp 0x7154
movq -0x7d8(%rbp), %rdi
movq 0x12e5e(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7169
cvtsi2sdl -0xb4(%rbp), %xmm0
leaq -0x3a8(%rbp), %rdi
movl $0x1, %esi
callq 0x5890
jmp 0x7184
movl $0x0, -0x3ac(%rbp)
movl -0x3ac(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x71e4
movq -0x380(%rbp), %rax
movslq -0x3ac(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x3a8(%rbp), %rdi
callq 0x5ab0
jmp 0x71ba
jmp 0x71bc
movl -0x3ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3ac(%rbp)
jmp 0x718e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
jmp 0x7649
movsbl -0x25(%rbp), %esi
movl -0x54(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x3a8(%rbp), %rdi
callq 0x8410
movsd %xmm0, -0x7e0(%rbp)
jmp 0x720b
movq -0x750(%rbp), %rax
movq -0x758(%rbp), %rdx
movsd -0x7e0(%rbp), %xmm0
movsd %xmm0, -0x3b8(%rbp)
movsd -0x3b8(%rbp), %xmm0
movslq -0x360(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x364(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xb1a6(%rip), %rsi      # 0x123f9
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x7e8(%rbp)
jmp 0x7268
movq -0x7e8(%rbp), %rdi
movsd -0x3b8(%rbp), %xmm0
callq 0x2330
movq %rax, -0x7f0(%rbp)
jmp 0x7285
movq -0x7f0(%rbp), %rdi
movq 0x12d2d(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x729a
cmpl $0x0, -0x3c(%rbp)
je 0x753d
cvtsi2sdl -0xb4(%rbp), %xmm0
leaq -0x3e0(%rbp), %rdi
movl $0x2, %esi
callq 0x5890
jmp 0x72bf
movl $0x0, -0x3e4(%rbp)
movl -0x3e4(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x731f
movq -0x380(%rbp), %rax
movslq -0x3e4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x3e0(%rbp), %rdi
callq 0x5ab0
jmp 0x72f5
jmp 0x72f7
movl -0x3e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3e4(%rbp)
jmp 0x72c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
jmp 0x752c
movsbl -0x25(%rbp), %esi
movl -0x54(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x3e0(%rbp), %rdi
callq 0x8410
movsd %xmm0, -0x7f8(%rbp)
jmp 0x7346
movq -0x740(%rbp), %rax
movq -0x748(%rbp), %rdx
movsd -0x7f8(%rbp), %xmm0
movsd %xmm0, -0x3f0(%rbp)
movsd -0x3f0(%rbp), %xmm0
movslq -0x360(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x364(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xb071(%rip), %rsi      # 0x123ff
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x800(%rbp)
jmp 0x73a3
movq -0x800(%rbp), %rdi
movsd -0x3f0(%rbp), %xmm0
callq 0x2330
movq %rax, -0x808(%rbp)
jmp 0x73c0
movq -0x808(%rbp), %rdi
movq 0x12bf2(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x73d5
cvtsi2sdl -0xb4(%rbp), %xmm0
leaq -0x418(%rbp), %rdi
movl $0x3, %esi
callq 0x5890
jmp 0x73f0
movl $0x0, -0x41c(%rbp)
movl -0x41c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x745c
movq -0x380(%rbp), %rax
movslq -0x41c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x418(%rbp), %rdi
callq 0x5ab0
jmp 0x7426
jmp 0x7428
movl -0x41c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x41c(%rbp)
jmp 0x73fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x5a40
jmp 0x752c
movsbl -0x25(%rbp), %esi
movl -0x54(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq -0x418(%rbp), %rdi
callq 0x8410
movsd %xmm0, -0x810(%rbp)
jmp 0x7483
movq -0x730(%rbp), %rax
movq -0x738(%rbp), %rdx
movsd -0x810(%rbp), %xmm0
movsd %xmm0, -0x428(%rbp)
movsd -0x428(%rbp), %xmm0
movslq -0x360(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x364(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xaf3f(%rip), %rsi      # 0x1240a
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x818(%rbp)
jmp 0x74e0
movq -0x818(%rbp), %rdi
movsd -0x428(%rbp), %xmm0
callq 0x2330
movq %rax, -0x820(%rbp)
jmp 0x74fd
movq -0x820(%rbp), %rdi
movq 0x12ab5(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7512
leaq -0x418(%rbp), %rdi
callq 0x5a40
leaq -0x3e0(%rbp), %rdi
callq 0x5a40
jmp 0x753d
leaq -0x3e0(%rbp), %rdi
callq 0x5a40
jmp 0x7649
leaq -0x3a8(%rbp), %rdi
movq %rdi, -0x830(%rbp)
callq 0x69f0
movq -0x830(%rbp), %rdi
movq %rax, -0x430(%rbp)
callq 0x69d0
movq %rax, -0x438(%rbp)
movl -0x54(%rbp), %esi
movq -0x430(%rbp), %rdx
movq -0x438(%rbp), %rcx
leaq -0x378(%rbp), %rdi
callq 0x27e0
movsd %xmm0, -0x828(%rbp)
jmp 0x7591
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movsd -0x828(%rbp), %xmm0
movsd %xmm0, -0x440(%rbp)
movsd -0x440(%rbp), %xmm0
movslq -0x360(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x364(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
leaq 0xae47(%rip), %rsi      # 0x12420
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x838(%rbp)
jmp 0x75ee
movq -0x838(%rbp), %rdi
movsd -0x440(%rbp), %xmm0
callq 0x2330
movq %rax, -0x840(%rbp)
jmp 0x760b
movq -0x840(%rbp), %rdi
movq 0x129a7(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7620
movl -0x54(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x54(%rbp)
movl -0x364(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x364(%rbp)
leaq -0x3a8(%rbp), %rdi
callq 0x5a40
jmp 0x70bf
leaq -0x3a8(%rbp), %rdi
callq 0x5a40
jmp 0x7680
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x9320
movl -0x360(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x360(%rbp)
jmp 0x6fef
leaq -0x378(%rbp), %rdi
callq 0x9320
jmp 0x81ae
leaq -0x2b8(%rbp), %rdi
callq 0x2230
jmp 0x769f
movq -0x10(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x1, %edx
callq 0x81d0
jmp 0x76b6
leaq -0x2b8(%rbp), %rdi
leaq -0x350(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x76d0
leaq -0x640(%rbp), %rdi
callq 0x22c0
jmp 0x76de
movq -0x10(%rbp), %rsi
leaq -0x6e0(%rbp), %rdi
movl $0x3, %edx
callq 0x81d0
jmp 0x76f5
leaq -0x640(%rbp), %rdi
leaq -0x6e0(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x770f
movl $0x0, -0x6e8(%rbp)
movl -0x6e8(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x7e1d
movq -0x728(%rbp), %rax
movslq -0x6e8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -0x2b8(%rbp), %rdi
callq 0x22e0
movq %rax, -0x848(%rbp)
jmp 0x774e
movq -0x848(%rbp), %rdi
leaq 0xaccc(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x7763
movq -0x728(%rbp), %rax
movslq -0x6e8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x850(%rbp)
movsbl -0x25(%rbp), %edi
callq 0x84d0
movl %eax, -0x84c(%rbp)
jmp 0x778b
movl -0x84c(%rbp), %ecx
movl -0x850(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x6e4(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl $0x0, -0x6f4(%rbp)
movl -0x6f4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x78b1
movq -0x750(%rbp), %rax
movq -0x758(%rbp), %rdx
movslq -0x6f4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x858(%rbp)
jmp 0x7801
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movslq -0x6f4(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x860(%rbp)
jmp 0x783f
movsd -0x860(%rbp), %xmm1
movsd -0x858(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9270
movsd %xmm0, -0x868(%rbp)
jmp 0x7862
movsd -0x868(%rbp), %xmm0
addsd -0x6f0(%rbp), %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl -0x6f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6f4(%rbp)
jmp 0x77b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x358(%rbp)
movl %eax, -0x35c(%rbp)
leaq -0x640(%rbp), %rdi
callq 0x2250
jmp 0x81ae
movsd -0x6f0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
jmp 0x78d0
cmpl $0x0, -0x3c(%rbp)
je 0x7b30
xorps %xmm0, %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl $0x0, -0x6f8(%rbp)
movl -0x6f8(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x79c9
movq -0x740(%rbp), %rax
movq -0x748(%rbp), %rdx
movslq -0x6f8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x870(%rbp)
jmp 0x793c
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movslq -0x6f8(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x878(%rbp)
jmp 0x797a
movsd -0x878(%rbp), %xmm1
movsd -0x870(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9270
movsd %xmm0, -0x880(%rbp)
jmp 0x799d
movsd -0x880(%rbp), %xmm0
addsd -0x6f0(%rbp), %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl -0x6f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6f8(%rbp)
jmp 0x78ef
leaq 0xaa58(%rip), %rsi      # 0x12428
leaq -0x2b8(%rbp), %rdi
callq 0x21b0
movq %rax, -0x888(%rbp)
jmp 0x79e5
movq -0x888(%rbp), %rdi
movsd -0x6f0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x2330
movq %rax, -0x890(%rbp)
jmp 0x7a0b
movq -0x890(%rbp), %rdi
leaq 0xaa0f(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x7a20
xorps %xmm0, %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl $0x0, -0x6fc(%rbp)
movl -0x6fc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7b0f
movq -0x730(%rbp), %rax
movq -0x738(%rbp), %rdx
movslq -0x6fc(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x898(%rbp)
jmp 0x7a82
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movslq -0x6fc(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x8a0(%rbp)
jmp 0x7ac0
movsd -0x8a0(%rbp), %xmm1
movsd -0x898(%rbp), %xmm0
subsd %xmm1, %xmm0
callq 0x9270
movsd %xmm0, -0x8a8(%rbp)
jmp 0x7ae3
movsd -0x8a8(%rbp), %xmm0
addsd -0x6f0(%rbp), %xmm0
movsd %xmm0, -0x6f0(%rbp)
movl -0x6fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6fc(%rbp)
jmp 0x7a35
movsd -0x6f0(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
jmp 0x7b2e
jmp 0x7b30
movq 0x12489(%rip), %rsi     # 0x19fc0
leaq -0x2b8(%rbp), %rdi
callq 0x21d0
jmp 0x7b45
leaq 0xa89e(%rip), %rsi      # 0x123ea
leaq -0x640(%rbp), %rdi
callq 0x21b0
movq %rax, -0x8b0(%rbp)
jmp 0x7b61
movq -0x8b0(%rbp), %rdi
movq -0x728(%rbp), %rax
movslq -0x6e8(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x22e0
movq %rax, -0x8b8(%rbp)
jmp 0x7b87
movq -0x8b8(%rbp), %rdi
movq 0x1242b(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7b9c
movl $0x0, -0x700(%rbp)
movl -0x700(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7e07
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movslq -0x700(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x8c0(%rbp)
jmp 0x7bf3
movsd -0x8c0(%rbp), %xmm0
leaq -0x640(%rbp), %rdi
callq 0x2330
movq %rax, -0x8c8(%rbp)
jmp 0x7c10
movq -0x8c8(%rbp), %rdi
leaq 0xa80c(%rip), %rsi      # 0x1242a
callq 0x21b0
movq %rax, -0x8d0(%rbp)
jmp 0x7c2c
movq -0x8d0(%rbp), %rdi
movq 0x12386(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7c41
movq -0x750(%rbp), %rax
movq -0x758(%rbp), %rdx
movslq -0x700(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x8d8(%rbp)
jmp 0x7c7f
movsd -0x8d8(%rbp), %xmm0
leaq -0x640(%rbp), %rdi
callq 0x2330
movq %rax, -0x8e0(%rbp)
jmp 0x7c9c
movq -0x8e0(%rbp), %rdi
leaq 0xa788(%rip), %rsi      # 0x12432
callq 0x21b0
movq %rax, -0x8e8(%rbp)
jmp 0x7cb8
movq -0x8e8(%rbp), %rdi
movq 0x122fa(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7ccd
cmpl $0x0, -0x3c(%rbp)
je 0x7df1
movq -0x740(%rbp), %rax
movq -0x748(%rbp), %rdx
movslq -0x700(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x8f0(%rbp)
jmp 0x7d15
movsd -0x8f0(%rbp), %xmm0
leaq -0x640(%rbp), %rdi
callq 0x2330
movq %rax, -0x8f8(%rbp)
jmp 0x7d32
movq -0x8f8(%rbp), %rdi
leaq 0xa6f6(%rip), %rsi      # 0x12436
callq 0x21b0
movq %rax, -0x900(%rbp)
jmp 0x7d4e
movq -0x900(%rbp), %rdi
movq 0x12264(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7d63
movq -0x730(%rbp), %rax
movq -0x738(%rbp), %rdx
movslq -0x700(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x6e8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl -0x6e4(%rbp), %edi
callq 0x5240
movsd %xmm0, -0x908(%rbp)
jmp 0x7da1
movsd -0x908(%rbp), %xmm0
leaq -0x640(%rbp), %rdi
callq 0x2330
movq %rax, -0x910(%rbp)
jmp 0x7dbe
movq -0x910(%rbp), %rdi
leaq 0xa66e(%rip), %rsi      # 0x1243a
callq 0x21b0
movq %rax, -0x918(%rbp)
jmp 0x7dda
movq -0x918(%rbp), %rdi
movq 0x121d8(%rip), %rsi     # 0x19fc0
callq 0x21d0
jmp 0x7def
jmp 0x7df1
jmp 0x7df3
movl -0x700(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x700(%rbp)
jmp 0x7ba6
jmp 0x7e09
movl -0x6e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6e8(%rbp)
jmp 0x7719
leaq -0x640(%rbp), %rdi
callq 0x2230
jmp 0x7e2b
leaq -0x2b8(%rbp), %rdi
callq 0x2230
jmp 0x7e39
movq -0x10(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x2, %edx
callq 0x81d0
jmp 0x7e50
leaq -0x2b8(%rbp), %rdi
leaq -0x350(%rbp), %rsi
movl $0x10, %edx
callq 0x2050
jmp 0x7e6a
movl $0x0, -0x704(%rbp)
movl -0x704(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x7f14
movl $0x0, -0x708(%rbp)
movl -0x708(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7efe
movq -0x760(%rbp), %rax
movq -0x768(%rbp), %rdx
movslq -0x708(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x704(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
movq %rax, -0x920(%rbp)
jmp 0x7ed6
movq -0x920(%rbp), %rdi
leaq 0xa544(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x7eeb
jmp 0x7eed
movl -0x708(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x708(%rbp)
jmp 0x7e8d
jmp 0x7f00
movl -0x704(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x704(%rbp)
jmp 0x7e74
movq 0x120a5(%rip), %rsi     # 0x19fc0
leaq -0x2b8(%rbp), %rdi
callq 0x21d0
jmp 0x7f29
movl $0x0, -0x70c(%rbp)
movl -0x70c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x7fd3
movl $0x0, -0x710(%rbp)
movl -0x710(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7fbd
movq -0x750(%rbp), %rax
movq -0x758(%rbp), %rdx
movslq -0x710(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x70c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
movq %rax, -0x928(%rbp)
jmp 0x7f95
movq -0x928(%rbp), %rdi
leaq 0xa485(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x7faa
jmp 0x7fac
movl -0x710(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x710(%rbp)
jmp 0x7f4c
jmp 0x7fbf
movl -0x70c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70c(%rbp)
jmp 0x7f33
movq 0x11fe6(%rip), %rsi     # 0x19fc0
leaq -0x2b8(%rbp), %rdi
callq 0x21d0
jmp 0x7fe8
cmpl $0x0, -0x3c(%rbp)
je 0x8172
movl $0x0, -0x714(%rbp)
movl -0x714(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x809c
movl $0x0, -0x718(%rbp)
movl -0x718(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8086
movq -0x740(%rbp), %rax
movq -0x748(%rbp), %rdx
movslq -0x718(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x714(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
movq %rax, -0x930(%rbp)
jmp 0x805e
movq -0x930(%rbp), %rdi
leaq 0xa3bc(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x8073
jmp 0x8075
movl -0x718(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x718(%rbp)
jmp 0x8015
jmp 0x8088
movl -0x714(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x714(%rbp)
jmp 0x7ffc
movq 0x11f1d(%rip), %rsi     # 0x19fc0
leaq -0x2b8(%rbp), %rdi
callq 0x21d0
jmp 0x80b1
movl $0x0, -0x71c(%rbp)
movl -0x71c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x815b
movl $0x0, -0x720(%rbp)
movl -0x720(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x8145
movq -0x730(%rbp), %rax
movq -0x738(%rbp), %rdx
movslq -0x720(%rbp), %rcx
imulq %rdx, %rcx
leaq (%rax,%rcx,8), %rax
movslq -0x71c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x2b8(%rbp), %rdi
callq 0x2330
movq %rax, -0x938(%rbp)
jmp 0x811d
movq -0x938(%rbp), %rdi
leaq 0xa2fd(%rip), %rsi      # 0x12428
callq 0x21b0
jmp 0x8132
jmp 0x8134
movl -0x720(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x720(%rbp)
jmp 0x80d4
jmp 0x8147
movl -0x71c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x71c(%rbp)
jmp 0x80bb
movq 0x11e5e(%rip), %rsi     # 0x19fc0
leaq -0x2b8(%rbp), %rdi
callq 0x21d0
jmp 0x8170
jmp 0x8172
leaq -0x2b8(%rbp), %rdi
callq 0x2230
jmp 0x8180
movl $0x0, -0x4(%rbp)
leaq -0x640(%rbp), %rdi
callq 0x2250
leaq -0x2b8(%rbp), %rdi
callq 0x2250
movq -0x68(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x2b8(%rbp), %rdi
callq 0x2250
movq -0x358(%rbp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)