// File: /workspace/github_cpp_makefile_star2_O1/j-faria[P]kima/src/Data.cpp
// Function: Data::load_multi(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void Data::load_multi(vector<std::string> filenames, const std::string units, 
                      int skip, const vector<std::string>& indicators)
{

  data_t data;

  // Empty the vectors
  t.clear();
  y.clear();
  sig.clear();
  obsi.clear();

  // check for indicator correlations and store stuff
  int nempty = count(indicators.begin(), indicators.end(), "");
  number_indicators = indicators.size() - nempty;
  indicator_correlations = number_indicators > 0;
  indicator_names = indicators;
  indicator_names.erase(
    std::remove( indicator_names.begin(), indicator_names.end(), "" ), 
    indicator_names.end() );

  // Empty the indicator vectors as well
  actind.clear();
  actind.resize(number_indicators);
  for (unsigned n = 0; n < number_indicators; n++)
    actind[n].clear();


  std::string dump; // to dump the first skip lines of each file
  int filecount = 1;
  int last_file_size = 0;

  // Read the files into the data container
  for (auto &filename : filenames) {
    ifstream infile( filename );
    for (int i=0; i<skip; i++)  // skip the first `skip` lines of each file
      getline(infile, dump);
    infile >> data;

    // Complain if something went wrong.
    if (!infile.eof())
    {
      printf("Could not read data file (%s)!\n", filename.c_str());
      exit(1);
    }

    infile.close();

    // Assign instrument int identifier to obsi
    for(unsigned i=last_file_size; i<data.size(); i++){
      obsi.push_back(filecount);
    }
    
    last_file_size = data.size();
    filecount++;
  }

  datafile = "";
  datafiles = filenames;
  dataunits = units;
  dataskip = skip;
  datamulti = true;


  double factor = 1.;
  if(units == "kms") factor = 1E3;

  for (unsigned n=0; n<data.size(); n++)
    {
      // if (n<skip) continue;
      t.push_back(data[n][0]);
      y.push_back(data[n][1] * factor);
      sig.push_back(data[n][2] * factor);

      if (indicator_correlations)
      {
        int j = 0;
        for (unsigned i = 0; i < number_indicators + nempty; i++)
        {
          if (indicators[i] == "")
            continue; // skip column
          else
          {
            actind[j].push_back(data[n][3+i] * factor);
            j++;
          }
        }
      }

    }

  // How many points did we read?
  printf("# Loaded %zu data points from files\n", t.size());
  cout << "#   ";
  for (auto f: filenames){
    cout << f.c_str();
    (f != filenames.back()) ? cout << " | " : cout << " ";
  }
  cout << endl;

  // Did we read activity indicators? how many?
  if(indicator_correlations){
    printf("# Loaded %d observations of %d activity indicators: ", actind[0].size(), actind.size());
    for (const auto i: indicators){
      if (i != ""){
        cout << "'" << i << "'";
        (i != indicators.back()) ? cout << ", " : cout << " ";
      }
    }
    cout << endl;
  }

  // Of how many instruments?
  std::set<int> s( obsi.begin(), obsi.end() );
  // set<int>::iterator iter;
  // for(iter=s.begin(); iter!=s.end();++iter) {  cout << (*iter) << endl;}
  printf("# RVs come from %zu different instruments.\n", s.size());
  number_instruments = s.size();

  if(units == "kms") 
    cout << "# Multiplied all RVs by 1000; units are now m/s." << endl;

  if(number_instruments > 1)
  {
    // We need to sort t because it comes from different instruments
    int N = t.size();
    std::vector<double> tt(N), yy(N);
    std::vector<double> sigsig(N), obsiobsi(N);
    std::vector<int> order(N);
    std::vector<std::vector<double>> actindactind(number_indicators, std::vector<double>(N));

    // order = argsort(t)
    int x=0;
    std::iota(order.begin(), order.end(), x++);
    sort( order.begin(),order.end(), [&](int i,int j){return t[i] < t[j];} );

    for(unsigned i=0; i<N; i++){
      tt[i] = t[order[i]];
      yy[i] = y[order[i]];
      sigsig[i] = sig[order[i]];
      obsiobsi[i] = obsi[order[i]];
      for(unsigned j=0; j<number_indicators; j++)
        actindactind[j][i] = actind[j][order[i]];
    }

    for(unsigned i=0; i<N; i++){
      t[i] = tt[i];
      y[i] = yy[i];
      sig[i] = sigsig[i];
      obsi[i] = obsiobsi[i];
      for(unsigned j=0; j<number_indicators; j++)
        actind[j][i] = actindactind[j][i];
    }

    // debug
    // for(std::vector<int>::size_type i = 0; i != t.size(); i++)
    //     cout << t[i] << "\t" << y[i] << "\t" << sig[i] << "\t" << obsi[i] <<  endl;
  }

  // epoch for the mean anomaly, by default the time of the first observation
  M0_epoch = t[0];

  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %r8, 0x28(%rsp)
movl %ecx, 0x18(%rsp)
movq %rdx, %r13
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x9f3f
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x9f4d
movq %rax, 0x20(%rbx)
movq 0x30(%rbx), %rax
cmpq %rax, 0x38(%rbx)
je 0x9f5b
movq %rax, 0x38(%rbx)
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x9f69
movq %rax, 0x50(%rbx)
movq 0x28(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %r12
xorl %ebp, %ebp
cmpq %r12, %r14
je 0x9f9e
leaq 0x35b1e(%rip), %r15     # 0x3faa1
movq %r14, %rdi
movq %r15, %rsi
callq 0x6100
cmpl $0x1, %eax
adcq $0x0, %rbp
addq $0x20, %r14
cmpq %r12, %r14
jne 0x9f83
movq 0x28(%rsp), %rsi
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x5, %rax
movq %rbp, 0x20(%rsp)
subl %ebp, %eax
movl %eax, 0x7c(%rbx)
testl %eax, %eax
setg 0x78(%rbx)
leaq 0x80(%rbx), %r14
movq %r14, %rdi
callq 0xb916
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
leaq 0x35abf(%rip), %rdx     # 0x3faa1
callq 0xc483
movq 0x88(%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xc5d0
leaq 0x60(%rbx), %r14
movq 0x60(%rbx), %rsi
movq %r14, %rdi
callq 0xc696
movslq 0x7c(%rbx), %rsi
movq %r14, 0x50(%rsp)
movq %r14, %rdi
callq 0xba90
movl 0x7c(%rbx), %ecx
testq %rcx, %rcx
je 0xa04d
movq 0x50(%rsp), %rax
movq (%rax), %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq (%rax,%rdx), %rsi
cmpq %rsi, 0x8(%rax,%rdx)
je 0xa044
movq %rsi, 0x8(%rax,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xa034
movq %r13, 0x60(%rsp)
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x1, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
cmpq %rax, %r14
je 0xa1b0
leaq 0x48(%rbx), %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
leaq 0x140(%rsp), %rbp
leaq 0x108(%rsp), %r15
movq %rbp, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x6640
movl 0x18(%rsp), %eax
movl %eax, %r13d
testl %eax, %eax
jle 0xa0ed
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x6780
decl %r13d
jne 0xa0c1
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x92a3
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x160(%rsp,%rax)
je 0xabd6
movq %rbp, %rdi
callq 0x60a0
movq 0x38(%rsp), %r13
subq 0x30(%rsp), %r13
movl %r12d, %eax
sarq $0x3, %r13
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %r13
cmpq %rax, %r13
jbe 0xa192
incl %r12d
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0xa15d
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%rbx)
jmp 0xa16b
movq (%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xcb20
movl %r12d, %eax
movq 0x38(%rsp), %r13
subq 0x30(%rsp), %r13
sarq $0x3, %r13
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %r13
incl %r12d
cmpq %rax, %r13
ja 0xa143
incl 0x8(%rsp)
movq %rbp, %rdi
callq 0x60e0
addq $0x20, %r14
movl %r13d, %r12d
cmpq 0x58(%rsp), %r14
jne 0xa0a6
leaq 0x98(%rbx), %rdi
movq 0xa0(%rbx), %rdx
leaq 0x358dc(%rip), %rcx     # 0x3faa1
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x6600
movq 0x60(%rsp), %r14
movq 0x28(%rsp), %r13
leaq 0xb8(%rbx), %rdi
movq 0x10(%rsp), %rsi
callq 0xb916
leaq 0xd0(%rbx), %rdi
movq %r14, %rsi
callq 0x6210
movl 0x18(%rsp), %eax
movl %eax, 0xf0(%rbx)
movb $0x1, 0xf4(%rbx)
leaq 0x352d7(%rip), %rsi     # 0x3f4e8
movq %r14, %rdi
callq 0x6100
xorl %ecx, %ecx
testl %eax, %eax
sete %dl
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rsi
je 0xa40f
leaq 0x18(%rbx), %rdi
movq %rdi, 0xe8(%rsp)
leaq 0x30(%rbx), %rdi
movq %rdi, 0xe0(%rsp)
movb %dl, %cl
leaq 0x3524a(%rip), %rdx     # 0x3f4a0
movsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
movl %esi, %ecx
negl %ecx
movl %ecx, 0x58(%rsp)
xorl %r14d, %r14d
leaq (%r14,%r14,2), %r15
movq (%rax,%r15,8), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xa28f
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xa297
movq %rbx, %rdi
callq 0xbf7a
movq 0x30(%rsp), %rax
movq (%rax,%r15,8), %rax
movsd 0x8(%rax), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0xa2cb
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x20(%rbx)
jmp 0xa2e0
movq 0xe8(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x744a
movq %r14, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq (%rax,%r15,8), %rax
movsd 0x10(%rax), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0xa319
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rbx)
jmp 0xa32e
movq 0xe0(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x744a
cmpb $0x1, 0x78(%rbx)
jne 0xa3df
movl 0x58(%rsp), %eax
cmpl %eax, 0x7c(%rbx)
je 0xa3df
xorl %r12d, %r12d
movl $0x3, %r14d
xorl %ebp, %ebp
movq (%r13), %rdi
addq %r12, %rdi
leaq 0x35743(%rip), %rsi     # 0x3faa1
callq 0x6100
testl %eax, %eax
je 0xa3c0
movslq %ebp, %rax
movq 0x50(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x30(%rsp), %rax
movl %r14d, %ecx
movq (%rax,%r15,8), %rax
movsd (%rax,%rcx,8), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xa3b1
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xa3be
leaq 0x140(%rsp), %rdx
callq 0x744a
incl %ebp
movl 0x7c(%rbx), %eax
addl 0x20(%rsp), %eax
leaq 0x1(%r14), %rcx
addq $0x20, %r12
addq $-0x2, %r14
cmpq %rax, %r14
movq %rcx, %r14
jb 0xa350
movq 0x18(%rsp), %r14
incl %r14d
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %r14, %rcx
ja 0xa26b
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
leaq 0x3515a(%rip), %rdi     # 0x3f57b
xorl %eax, %eax
callq 0x6050
movq 0x48b69(%rip), %r14     # 0x52f98
leaq 0x3516a(%rip), %rsi     # 0x3f5a0
movl $0x4, %edx
movq %r14, %rdi
callq 0x64a0
movq 0x10(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %r15
cmpq %r15, %r13
je 0xa546
leaq 0x150(%rsp), %rbp
movq %rbp, 0x140(%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x140(%rsp), %rdi
callq 0xbeb6
movq 0x140(%rsp), %r12
testq %r12, %r12
je 0xa4a5
movq %r12, %rdi
callq 0x61a0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x64a0
jmp 0xa4bd
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x6690
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x148(%rsp), %rdx
movl $0x3, %r12d
cmpq -0x18(%rax), %rdx
jne 0xa50a
testq %rdx, %rdx
je 0xa4fb
movq -0x20(%rax), %rsi
movq 0x140(%rsp), %rdi
callq 0x6470
leaq 0x350ae(%rip), %rsi     # 0x3f5a5
testl %eax, %eax
jne 0xa511
movl $0x1, %r12d
leaq 0x3509b(%rip), %rsi     # 0x3f5a3
jmp 0xa511
leaq 0x35094(%rip), %rsi     # 0x3f5a5
movq %r14, %rdi
movq %r12, %rdx
callq 0x64a0
movq 0x140(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa539
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x6460
addq $0x20, %r13
cmpq %r15, %r13
jne 0xa460
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %esi
movq 0x48a34(%rip), %rdi     # 0x52f98
callq 0x6030
movq %rax, %rdi
callq 0x6300
cmpb $0x1, 0x78(%rbx)
jne 0xa70d
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdx
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x3, %rsi
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
leaq 0x34fff(%rip), %rdi     # 0x3f5a9
xorl %eax, %eax
callq 0x6050
movq 0x28(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0xa6de
leaq 0x150(%rsp), %rbp
leaq 0x140(%rsp), %r15
movq %rbp, 0x140(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xbeb6
movq %r15, %rdi
leaq 0x354a5(%rip), %rsi     # 0x3faa1
callq 0x6100
testl %eax, %eax
je 0xa6b4
movl $0x1, %edx
movq 0x48983(%rip), %rdi     # 0x52f98
leaq 0x35482(%rip), %rsi     # 0x3fa9e
callq 0x64a0
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
movq 0x48960(%rip), %rdi     # 0x52f98
callq 0x64a0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35452(%rip), %rsi     # 0x3fa9e
callq 0x64a0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x148(%rsp), %rdx
movl $0x2, %r14d
cmpq -0x18(%rax), %rdx
jne 0xa69e
testq %rdx, %rdx
je 0xa68f
movq -0x20(%rax), %rsi
movq 0x140(%rsp), %rdi
callq 0x6470
leaq 0x3da00(%rip), %rsi     # 0x4808b
testl %eax, %eax
jne 0xa6a5
movl $0x1, %r14d
leaq 0x34f07(%rip), %rsi     # 0x3f5a3
jmp 0xa6a5
leaq 0x3d9e6(%rip), %rsi     # 0x4808b
movq 0x488ec(%rip), %rdi     # 0x52f98
movq %r14, %rdx
callq 0x64a0
movq 0x140(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa6d1
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x6460
addq $0x20, %r12
cmpq %r13, %r12
jne 0xa5d6
movq 0x488b3(%rip), %rdi     # 0x52f98
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %esi
movq 0x48898(%rip), %rdi     # 0x52f98
callq 0x6030
movq %rax, %rdi
callq 0x6300
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
leaq 0x140(%rsp), %rdi
callq 0xbb1a
movq 0x60(%rsp), %r14
movq 0x168(%rsp), %rsi
leaq 0x34e19(%rip), %rdi     # 0x3f54f
xorl %eax, %eax
callq 0x6050
movl 0x168(%rsp), %eax
movl %eax, 0xf8(%rbx)
leaq 0x34d97(%rip), %rsi     # 0x3f4e8
movq %r14, %rdi
callq 0x6100
testl %eax, %eax
jne 0xa7a3
movq 0x48834(%rip), %r14     # 0x52f98
leaq 0x34ee8(%rip), %rsi     # 0x3f653
movl $0x30, %edx
movq %r14, %rdi
callq 0x64a0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x6430
movsbl %al, %esi
movq 0x48802(%rip), %rdi     # 0x52f98
callq 0x6030
movq %rax, %rdi
callq 0x6300
cmpl $0x2, 0xf8(%rbx)
jl 0xab79
movq 0x8(%rbx), %r13
subq (%rbx), %r13
shrq $0x3, %r13
movslq %r13d, %r14
leaq 0xc8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
movq %r14, %rsi
callq 0xbb9c
leaq 0xb0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
movq %r14, %rsi
callq 0xbb9c
leaq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movq %r14, %rsi
callq 0xbb9c
leaq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %r14, %rsi
callq 0xbb9c
leaq 0x68(%rsp), %rdi
leaq 0x128(%rsp), %rdx
movq %r14, %rsi
callq 0xbc26
movslq 0x7c(%rbx), %r15
leaq 0xf0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0xbb9c
leaq 0x128(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %r15, %rsi
callq 0xbcb0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0xa883
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq 0x68(%rsp), %r15
movq 0x70(%rsp), %r14
cmpq %r14, %r15
je 0xa948
xorl %eax, %eax
movq %r15, %rcx
movl %eax, (%rcx)
incl %eax
addq $0x4, %rcx
cmpq %r14, %rcx
jne 0xa89b
cmpq %r14, %r15
je 0xa948
movq %r14, %r12
subq %r15, %r12
movq %r12, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0xb4db
cmpq $0x41, %r12
jl 0xa93a
leaq 0x40(%r15), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xb790
cmpq %r14, %r12
je 0xa948
movq (%rbx), %rax
movslq (%r12), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq -0x4(%r12), %rdx
movsd (%rax,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
movq %r12, %rsi
jbe 0xa92d
movq %r12, %rsi
movl %edx, (%rsi)
movslq -0x8(%rsi), %rdx
movsd (%rax,%rdx,8), %xmm1
addq $-0x4, %rsi
ucomisd %xmm0, %xmm1
ja 0xa918
movl %ecx, (%rsi)
addq $0x4, %r12
cmpq %r14, %r12
jne 0xa8f9
jmp 0xa948
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb790
testl %r13d, %r13d
je 0xaae1
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%rbx), %rax
movq %rax, (%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x50(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x30(%rbx), %r8
movq 0x98(%rsp), %r9
movq 0x48(%rbx), %r10
movq 0x80(%rsp), %r11
movl 0x7c(%rbx), %r14d
movq 0x60(%rbx), %r15
movq 0x128(%rsp), %r12
movq %r13, 0x10(%rsp)
movl %r13d, %ebp
movq %r14, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r13
xorl %eax, %eax
movq 0x20(%rsp), %rcx
movslq (%rcx,%rax,4), %rcx
movq (%rsp), %rdx
movsd (%rdx,%rcx,8), %xmm0
movq 0x18(%rsp), %rdx
movsd %xmm0, (%rdx,%rax,8)
movq 0x50(%rsp), %rdx
movsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, (%rdi,%rax,8)
movsd (%r8,%rcx,8), %xmm0
movsd %xmm0, (%r9,%rax,8)
xorps %xmm0, %xmm0
cvtsi2sdl (%r10,%rcx,4), %xmm0
movsd %xmm0, (%r11,%rax,8)
testl %r14d, %r14d
je 0xaa25
xorl %edx, %edx
movq (%r15,%rdx), %rsi
movsd (%rsi,%rcx,8), %xmm0
movq (%r12,%rdx), %rsi
movsd %xmm0, (%rsi,%rax,8)
addq $0x18, %rdx
cmpq %rdx, %r13
jne 0xaa0a
incq %rax
cmpq %rbp, %rax
jne 0xa9bd
movq 0xc8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%rbx), %rcx
movq 0x18(%rbx), %rdx
movq 0xb0(%rsp), %rsi
movq 0x98(%rsp), %rdi
movq 0x30(%rbx), %r8
movq 0x80(%rsp), %r9
movq 0x48(%rbx), %r10
movq 0x128(%rsp), %r11
movq 0x60(%rbx), %r14
movl 0x10(%rsp), %r15d
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r12,8)
movsd (%rsi,%r12,8), %xmm0
movsd %xmm0, (%rdx,%r12,8)
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%r8,%r12,8)
cvttsd2si (%r9,%r12,8), %ebp
movl %ebp, (%r10,%r12,4)
movl 0x7c(%rbx), %r13d
testq %r13, %r13
je 0xaad9
shlq $0x3, %r13
leaq (%r13,%r13,2), %r13
xorl %ebp, %ebp
movq (%r11,%rbp), %rax
movsd (%rax,%r12,8), %xmm0
movq (%r14,%rbp), %rax
movsd %xmm0, (%rax,%r12,8)
addq $0x18, %rbp
cmpq %rbp, %r13
jne 0xaabc
incq %r12
cmpq %r15, %r12
jne 0xaa75
leaq 0x128(%rsp), %rdi
callq 0xbacc
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xab05
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xab22
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xab3f
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xab5c
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xab79
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
movq (%rbx), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x100(%rbx)
leaq 0x140(%rsp), %rdi
callq 0xbe66
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0xabba
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x6460
leaq 0x30(%rsp), %rdi
callq 0xbacc
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0x348e8(%rip), %rdi     # 0x3f4c8
xorl %eax, %eax
callq 0x6050
movl $0x1, %edi
callq 0x64e0
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0xac16
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xac16
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xac32
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xac32
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xac54
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xac54
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xac76
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xac76
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xac98
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xac98
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xacc2
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6460
jmp 0xacc2
jmp 0xacbf
jmp 0xad0c
jmp 0xacd1
jmp 0xacd1
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0xbe66
jmp 0xad23
movq %rax, %rbx
jmp 0xad48
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xad0c
jmp 0xacea
jmp 0xad13
movq %rax, %rbx
movq 0x140(%rsp), %rdi
cmpq %rbp, %rdi
je 0xad23
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x6460
jmp 0xad23
movq %rax, %rbx
jmp 0xad23
jmp 0xad13
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x60e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0xad48
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x6460
leaq 0x30(%rsp), %rdi
callq 0xbacc
movq %rbx, %rdi
callq 0x6710