// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkio.cc
// Function: readCIFFile(char*, ATOM_NETWORK*, bool)
bool readCIFFile(char *filename, ATOM_NETWORK *cell, bool radial){
  string line;
  // Known markers in CIF File if you change the order it will affect the code
  string descriptor[] = {"data_",
			 "_cell_length_a", //case 1
			 "_cell_length_b", //2
			 "_cell_length_c", //3
			 "_cell_angle_alpha", //4
			 "_cell_angle_beta", //5
			 "_cell_angle_gamma", //6
			 "loop_", //7
			 "_symmetry_equiv_pos_as_xyz", //8
			 "_space_group_symop_operation_xyz", //9
			 "_atom_site_label", //10
			 "_atom_site_type_symbol", //11
			 "_atom_site_fract_x", //12
			 "_atom_site_fract_y", //13
			 "_atom_site_fract_z", //14
			 "_atom_site_charge", //15
       "_symmetry_Int_Tables_number", //16
			 "_atom_site_Cartn_x", //17
			 "_atom_site_Cartn_y", //18
			 "_atom_site_Cartn_z", //19
                         "_symmetry_equiv_pos_site_id", // 20
			 "NULL"};
  int ndx;
  vector<string> list = strAry2StrVec(descriptor);
  vector<string> token;

  vector<string> sym_x;
  vector<string> sym_y;
  vector<string> sym_z;
  vector<string> atom_label;
  vector<string> atom_type;
  vector<double> atom_x;
  vector<double> atom_y;
  vector<double> atom_z;
  vector<double> atom_charge;

  int symmetry_Int_Table_number = -1; //set to dummy value so we can check if anything was read
  bool symmetry_equiv_pos_site_id_Flag = false; // this is to read symmetry lines from lines that have sym. id.

  // Try opening the file if it opens proceed with processing
  ifstream ciffile;
  cout << "Opening File: " << filename << endl;
  ciffile.open(filename);
  bool read_a = false, read_b = false, read_c = false, read_alpha = false, read_beta = false, read_gamma = false, initialized_cell = false; //keep track of when all cell params are parsed, so the cell can be created
  if(ciffile.is_open()) {
    while(!ciffile.eof()) {
      if(read_a && read_b && read_c && read_alpha && read_beta && read_gamma && !initialized_cell) {cell->initialize(); initialized_cell=true;}
      getline(ciffile,line);
//printf("DEBUG: read line %s\n", line.c_str());
      token = split(line," ()\r\t");
      exception: //I needed an easy way to jump out of the _loop command if an unknown command was found
      if (token.size() > 0) {
	      //Where all non-loop commands should be added
	      if(token[0].substr(0,5).compare(list[0]) == 0){ //name of unit cell
	        cell->name=token[0].substr(5);
	      }
	      else if (token[0].compare(list[1]) == 0){ //length a
	        cell->a=convertToDouble(token[1]);
          read_a = true;
	      }
	      else if (token[0].compare(list[2]) == 0){ //length b
	        cell->b=convertToDouble(token[1]);
          read_b = true;
	      }
	      else if (token[0].compare(list[3]) == 0){ //length c
	        cell->c=convertToDouble(token[1]);
          read_c = true;
	      }
	      else if (token[0].compare(list[4]) == 0){ //alpha
	        cell->alpha=convertToDouble(token[1]);
          read_alpha = true;
	      }
	      else if (token[0].compare(list[5]) == 0){ //beta
	        cell->beta=convertToDouble(token[1]);
          read_beta = true;
	      }
	      else if (token[0].compare(list[6]) == 0){ //gamma
	        cell->gamma=convertToDouble(token[1]);
          read_gamma = true;
	      }
        else if (token[0].compare(list[16]) == 0){ //_symmetry_Int_Tables_number
	        symmetry_Int_Table_number = convertToInt(token[1]);
	      }
	      else if (token[0].compare(list[7]) == 0){ //loop_
//printf("DEBUG: inside a \"loop_\" section\n");
	        vector<string> column_labels;
	        getline(ciffile,line);
	        token = split(line," \r\t");
          bool tokenized = false, in_loop = true;
          if(token.size()>0) tokenized=true;
//	        while (token[0].at(0)=='_') { //collect all of the collumn labels
	        while (tokenized && in_loop) { //collect all of the collumn labels
            if(token[0].at(0)=='_') {
	            column_labels.push_back(token[0]);
//printf("DEBUG: within loop, parsed a column header \"%s\"\n", token[0].c_str());
	            getline(ciffile,line);
//printf("DEBUG: read line \"%s\" - tokenizing ...\n", line.c_str());
	            token = split(line," \r\t");
              if(token.size()<=0) tokenized=false;
            } else in_loop = false;
	        }
          if(!tokenized) {
printf("\n#####\n##### WARNING: parsed a loop in cif file, but data was not present\n#####\n\n");
          } else {
//printf("DEBUG: exited loop successfully, having read data line \"%s\"\n", line.c_str());
            //collecting the data associated with each column and put
            // in correct place
            token = split(line," ,'\r\t"); //This is needed to split data
            bool need_to_convert_to_fractional = false;
            while(token.size()>0){
              if (token[0].at(0) =='_' || token[0].compare("loop_")==0 || token[0].at(0) == '#'){
                goto exception; // unexpected input
              }
              if (token.size()!=column_labels.size() && column_labels[0].compare(list[8]) != 0 && column_labels[0].compare(list[9]) != 0 && column_labels[0].compare(list[20]) != 0){
                goto exception; //unexpected input
              }
              for (unsigned int i=0; i<column_labels.size(); i++){
                switch (strCmpList(list,column_labels[i])){
  //printf("SYM DEBUG: checking for symmetry section ...\n");
	              //Where all loop commands should be added
                case 8: //_symmetry_equiv_pos_as_xyz and
                case 9: //_space_group_symop_operation_xyz have the same meaning
  //printf("SYM DEBUG: symmetry section found!\n");
	              if (!((token.size()==3&&symmetry_equiv_pos_site_id_Flag==false)||(token.size()==4&&symmetry_equiv_pos_site_id_Flag==true))){
	                cerr << "Error: Expected 3 strings for _symmetry_equiv_pos_as_xyz (or 4 if _symmetry_equiv_pos_site_id is present)" << endl;
  //	              abort();
                  ciffile.close();
                  return false;
	              }
                      if(token.size()==3) {
	                sym_x.push_back(token[0]);
	                sym_y.push_back(token[1]);
	                sym_z.push_back(token[2]);}
                        else {
                        sym_x.push_back(token[1]);
                        sym_y.push_back(token[2]);
                        sym_z.push_back(token[3]);
                        };
  //printf("SYM DEBUG: pushing back %s %s %s\n", token[0].c_str(), token[1].c_str(), token[2].c_str());
	              break;
                case 10:
	              atom_label.push_back(token[i]);
	              break;
                case 11:
	              atom_type.push_back(token[i]);
	              break;
                case 12:
	              atom_x.push_back(trans_to_origuc(convertToDouble(token[i])));
	              break;
                case 13:
	              atom_y.push_back(trans_to_origuc(convertToDouble(token[i])));
	              break;
                case 14:
	              atom_z.push_back(trans_to_origuc(convertToDouble(token[i])));
	              break;
                case 15:
	              atom_charge.push_back(convertToDouble(token[i]));
	              break;
                case 17:
	              atom_x.push_back(convertToDouble(token[i]));
                need_to_convert_to_fractional = true;
	              break;
                case 18:
	              atom_y.push_back(convertToDouble(token[i]));
                need_to_convert_to_fractional = true;
	              break;
                case 19:
	              atom_z.push_back(convertToDouble(token[i]));
                need_to_convert_to_fractional = true;
	              break;
                case 20:
                      symmetry_equiv_pos_site_id_Flag = true;
                      break;
                }
              }
              //now we've finished parsing this line, we might need to convert Cartesian to fractional coords
              if(need_to_convert_to_fractional) {
                Point tempcoor;
                int this_ID = atom_x.size()-1;
        	      tempcoor = cell->xyz_to_abc(atom_x.at(this_ID),atom_y.at(this_ID),atom_z.at(this_ID));
//printf("DEBUG: atom at Cartesian %.3f %.3f %.3f written to fractional %.3f %.3f %.3f\n", atom_x.at(this_ID),atom_y.at(this_ID),atom_z.at(this_ID), tempcoor[0], tempcoor[1], tempcoor[2]);
                atom_x.at(this_ID) = tempcoor[0];
                atom_y.at(this_ID) = tempcoor[1];
                atom_z.at(this_ID) = tempcoor[2];
              }
              getline(ciffile,line);
              token = split(line," ',\r\t");
            }
            column_labels.clear();
          }
        }
        token.clear();
      }
    }
    ciffile.close();

    //If no symmetry info was provided, we can assume that none is required (i.e., structure has 'P 1' symmetry), ONLY IF we did not read a symmetry_Int_Tables_Number!=1
    if (sym_x.size()==0 || sym_y.size()==0 || sym_z.size()==0){
      //no symmetry provided
      if (symmetry_Int_Table_number>=0 && symmetry_Int_Table_number!=1) {
        //read a symmetry table number, but it was not 1
        printf("ERROR:\n\tcif file provided no symmetry operations; however, a symmetry_Int_Tables_Number of %d was provided,\n\tindicating symmetry which is not 'P 1' (no symmetry operations);\n\tcannot proceed with insufficient symmetry information\nExiting ...\n", symmetry_Int_Table_number);
//        exit(EXIT_FAILURE);
        return false;
      } else {
        sym_x.push_back("x");
        sym_y.push_back("y");
        sym_z.push_back("z");
      }
    }

    //Now determine whether it is correct to use atom_label or atom_type (atom_label used only if atom_type has no data)
    bool CIF_USE_LABEL = atom_type.size()==0;

    //Now determine whether charges are used - only if they were provided
    bool CIF_CHARGES = atom_charge.size()>0;

    //Parse out the numbers from atom labels and types, if specified (defined in network.h)
    if (CIF_RMV_NUMS_FROM_ATOM_TYPE){
      if (!CIF_USE_LABEL){
	      for (unsigned int i=0; i<atom_type.size(); i++){
	        atom_type[i] = split(atom_type[i],"0123456789").at(0);
	      }
      }
      else{
	      for (unsigned int i=0; i<atom_label.size(); i++){
	        atom_label[i] = split(atom_label[i],"0123456789").at(0);
	      }
      }
    }

    //Error checking
    if (sym_x.size()==0 || sym_y.size()==0 || sym_z.size()==0 ){
      cerr << "Error: No .cif symmetry information given" << endl;
      cerr << "DEBUG SHOULDN'T HAPPEN" << endl;
      return false;
//      abort();
    }
    if (atom_label.size()==0 && CIF_USE_LABEL == true){
      cerr << "Error: No ''_atom_site_label'' or ''_atom_site_type_symbol'' information " << endl;
      cerr << "This structure appears to be invalid: there are no atom identifying element types or labels - if this is not the case, then this is a bug; please contact the developers." << endl;
      return false;
    }
    if (atom_type.size()==0 && CIF_USE_LABEL == false){
      cerr << "Error: No ''_atom_site_type_symbol'' information" << endl;
      cerr << "DEBUG SHOULDN'T HAPPEN" << endl;
      return false;
//      abort();
    }
    if (atom_x.size()!=atom_y.size() || atom_y.size()!=atom_z.size() || atom_x.size()==0){
      cerr << "Error: Atom coordinates not read properly (" << atom_x.size() << " x coords, " << atom_y.size() << " y coords, " << atom_z.size() << " z coords)" << endl;
//      abort();
      return false;
    }

    //If no name for the unit cell is given the filename becomes its name
    if (cell->name.size() == 0){
      cell->name = *filename;
    }

    //Now to fully assemble the ATOM_NETWORK initialize constructor
//    cell->initialize(); //this should now happen much earlier, during parsing

    ATOM tempatom;
    Point tempcoor;
    for (unsigned int i=0; i<atom_x.size(); i++){ //atoms
      if (CIF_USE_LABEL){
	      tempatom.type = atom_label[i];
      }
      else {
	      tempatom.type = atom_type[i];
      }
      tempatom.radius = lookupRadius(tempatom.type, radial);
      if(CIF_CHARGES) {
        tempatom.charge = atom_charge[i];
      } else tempatom.charge = 0;
      for (unsigned int j=0;j<sym_x.size(); j++){ //symmetries
	      tempatom.a_coord = trans_to_origuc(symbCalc(sym_x[j],atom_x[i],atom_y[i],atom_z[i]));
	      tempatom.b_coord = trans_to_origuc(symbCalc(sym_y[j],atom_x[i],atom_y[i],atom_z[i]));
	      tempatom.c_coord = trans_to_origuc(symbCalc(sym_z[j],atom_x[i],atom_y[i],atom_z[i]));
	      tempcoor = cell->abc_to_xyz (tempatom.a_coord,tempatom.b_coord,tempatom.c_coord);
	      tempatom.x = tempcoor[0];
	      tempatom.y = tempcoor[1];
	      tempatom.z = tempcoor[2];
	      tempatom.specialID = (i*sym_x.size())+j;

	      //make sure that no duplicate atoms are writen
	      int match=1;
	      for (unsigned int k=0;k<cell->atoms.size(); k++){
                if(cell->calcDistance(cell->atoms[k],tempatom)<thresholdLarge) { match=0;
/*
	        if (tempatom.a_coord-thresholdLarge < cell->atoms[k].a_coord && cell->atoms[k].a_coord < tempatom.a_coord+thresholdLarge)
          if (tempatom.b_coord-thresholdLarge < cell->atoms[k].b_coord && cell->atoms[k].b_coord < tempatom.b_coord+thresholdLarge )
          if (tempatom.c_coord-thresholdLarge < cell->atoms[k].c_coord && cell->atoms[k].c_coord < tempatom.c_coord+thresholdLarge ){
            match=0;
*/
          }
        }
        if (match == 1){
          cell->atoms.push_back(tempatom);
        }
      }
    }
    cell->numAtoms = cell->atoms.size();
  }
  else{
    cout << "Failed to open: " << filename << endl;
    ciffile.close();
//    exit(1);
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x998, %rsp            # imm = 0x998
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x220(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xe0473(%rip), %rsi     # 0xfcc01
leaq 0x4d0(%rsp), %r14
leaq 0x790(%rsp), %rdx
movq %r14, %rdi
callq 0x1b80e
leaq 0x4f0(%rsp), %r15
leaq 0xe0452(%rip), %rsi     # 0xfcc07
leaq 0x230(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x510(%rsp), %r15
leaq 0xe0442(%rip), %rsi     # 0xfcc16
leaq 0x88(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x530(%rsp), %r15
leaq 0xe0432(%rip), %rsi     # 0xfcc25
movq %rsp, %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x550(%rsp), %r15
leaq 0xe0427(%rip), %rsi     # 0xfcc34
leaq 0xe0(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x570(%rsp), %r15
leaq 0xe041a(%rip), %rsi     # 0xfcc46
leaq 0x130(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x590(%rsp), %r15
leaq 0xe040c(%rip), %rsi     # 0xfcc57
leaq 0x110(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x5b0(%rsp), %r15
leaq 0xe03ff(%rip), %rsi     # 0xfcc69
leaq 0x1c0(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x5d0(%rsp), %r15
leaq 0xe03e6(%rip), %rsi     # 0xfcc6f
leaq 0x1a0(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x5f0(%rsp), %r15
leaq 0xe03e2(%rip), %rsi     # 0xfcc8a
leaq 0x60(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x610(%rsp), %r15
leaq 0xe03e7(%rip), %rsi     # 0xfccab
leaq 0xc0(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x630(%rsp), %r15
leaq 0xe03d9(%rip), %rsi     # 0xfccbc
leaq 0xa0(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x650(%rsp), %r15
leaq 0xe03d1(%rip), %rsi     # 0xfccd3
leaq 0x180(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x670(%rsp), %r15
leaq 0xe03c5(%rip), %rsi     # 0xfcce6
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x690(%rsp), %r15
leaq 0xe03bc(%rip), %rsi     # 0xfccf9
leaq 0x168(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x6b0(%rsp), %r15
leaq 0xe03b0(%rip), %rsi     # 0xfcd0c
leaq 0x5f(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x6d0(%rsp), %r15
leaq 0xe03a6(%rip), %rsi     # 0xfcd1e
leaq 0x5e(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x6f0(%rsp), %r15
leaq 0xe03a6(%rip), %rsi     # 0xfcd3a
leaq 0x5d(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x710(%rsp), %r15
leaq 0xe039d(%rip), %rsi     # 0xfcd4d
leaq 0x5c(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x730(%rsp), %r15
leaq 0xe0394(%rip), %rsi     # 0xfcd60
leaq 0x5b(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x750(%rsp), %r15
leaq 0xe038b(%rip), %rsi     # 0xfcd73
leaq 0x5a(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x770(%rsp), %r15
leaq 0xe4885(%rip), %rsi     # 0x101289
leaq 0x59(%rsp), %rdx
movq %r15, %rdi
callq 0x1b80e
leaq 0x88(%rsp), %rdi
leaq 0x4d0(%rsp), %rsi
callq 0x3841a
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movaps %xmm0, 0xe0(%rsp)
andq $0x0, 0xf0(%rsp)
movaps %xmm0, 0x130(%rsp)
andq $0x0, 0x140(%rsp)
movaps %xmm0, 0x110(%rsp)
andq $0x0, 0x120(%rsp)
movaps %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movaps %xmm0, 0x1a0(%rsp)
andq $0x0, 0x1b0(%rsp)
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movaps %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movaps %xmm0, 0x180(%rsp)
andq $0x0, 0x190(%rsp)
leaq 0x790(%rsp), %rdi
callq 0x4500
movq 0x1334e6(%rip), %rdi    # 0x14ffc0
leaq 0xe02ae(%rip), %rsi     # 0xfcd8f
callq 0x4480
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0x790(%rsp), %rdi
pushq $0x8
popq %rdx
movq %r12, %rsi
callq 0x42b0
leaq 0x808(%rsp), %rdi
callq 0x4130
testb %al, %al
je 0x1d67e
movq %r12, 0x2d0(%rsp)
movl %ebp, 0x164(%rsp)
movq %rbx, 0x20(%rsp)
leaq 0x320(%rbx), %rax
movq %rax, 0x1e0(%rsp)
pushq $-0x1
popq %rax
movl %eax, 0x84(%rsp)
movq $0x0, 0x78(%rsp)
leaq 0x3d8(%rsp), %rbp
leaq 0x430(%rsp), %r12
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
movq $0x0, 0x108(%rsp)
movq %rax, 0x100(%rsp)
movq %rcx, 0x208(%rsp)
andb %cl, %al
movq %rdx, 0x200(%rsp)
movl %edx, %ecx
movq %rsi, 0x1f8(%rsp)
andb %sil, %cl
andb %al, %cl
movq %rdi, 0x1f0(%rsp)
movl %edi, %eax
movq %r8, 0x1e8(%rsp)
andb %r8b, %al
andb %cl, %al
xorb $0x1, %al
movb %al, 0x150(%rsp)
movq 0x790(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x7b0(%rsp,%rax)
jne 0x1d7bf
movb 0x150(%rsp), %al
orb 0x108(%rsp), %al
testb $0x1, %al
jne 0x1cc09
movb $0x1, %al
movq %rax, 0x108(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3e5a4
leaq 0x790(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x40e0
leaq 0x3b8(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x45d0
leaq 0x4b0(%rsp), %r15
movq %r15, %rdi
leaq 0xe0159(%rip), %rsi     # 0xfcd9e
leaq 0x30(%rsp), %rdx
callq 0x1b80e
leaq 0x230(%rsp), %rbx
movq %rbx, %rdi
leaq 0x3b8(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x38311
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2472c
movq %rbx, %rdi
callq 0x244fc
movq %r15, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4210
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rsp)
je 0x1cbc9
leaq 0x230(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
pushq $0x5
popq %rcx
callq 0x44d0
movq 0x88(%rsp), %rsi
movq %r15, %rdi
callq 0x4040
movl %eax, %ebx
movq %r15, %rdi
callq 0x4210
testl %ebx, %ebx
je 0x1d521
movq (%rsp), %rdi
movq 0x88(%rsp), %rsi
addq $0x20, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d558
movq 0x88(%rsp), %rsi
addq $0x40, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d57a
movq 0x88(%rsp), %rsi
addq $0x60, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d59c
movq 0x88(%rsp), %rsi
subq $-0x80, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d5bb
movq 0x88(%rsp), %rsi
movl $0xa0, %eax
addq %rax, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d5da
movq 0x88(%rsp), %rsi
movl $0xc0, %eax
addq %rax, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d5f9
movq 0x88(%rsp), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
callq 0x4040
movq (%rsp), %rdi
testl %eax, %eax
je 0x1d618
movq 0x88(%rsp), %rsi
movl $0xe0, %eax
addq %rax, %rsi
callq 0x4040
testl %eax, %eax
jne 0x1d628
xorps %xmm0, %xmm0
movaps %xmm0, 0x230(%rsp)
andq $0x0, 0x240(%rsp)
leaq 0x790(%rsp), %rdi
leaq 0x210(%rsp), %rbx
movq %rbx, %rsi
callq 0x40e0
leaq 0x398(%rsp), %rdi
movq %rbx, %rsi
callq 0x45d0
leaq 0x490(%rsp), %r13
movq %r13, %rdi
leaq 0xdff88(%rip), %rsi     # 0xfcda4
leaq 0x168(%rsp), %rdx
callq 0x1b80e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x398(%rsp), %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x38311
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2472c
movq %rbx, %rdi
callq 0x244fc
movq %r13, %rdi
callq 0x4210
movq %r15, %rdi
callq 0x4210
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
setne %al
movb $0x1, %bl
testb $0x1, %al
je 0x1cf44
testb $0x1, %bl
je 0x1cf44
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x4820
cmpb $0x5f, (%rax)
sete %bl
movb $0x1, %al
jne 0x1ce75
movq (%rsp), %rsi
leaq 0x230(%rsp), %rdi
callq 0x2451e
leaq 0x790(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x40e0
leaq 0x378(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x45d0
leaq 0x470(%rsp), %r14
movq %r14, %rdi
leaq 0xdfebc(%rip), %rsi     # 0xfcda4
leaq 0x168(%rsp), %rdx
callq 0x1b80e
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x378(%rsp), %r13
movq %r13, %rsi
movq %r14, %rdx
callq 0x38311
movq %rsp, %rdi
movq %r15, %rsi
callq 0x2472c
movq %r15, %rdi
callq 0x244fc
movq %r14, %rdi
callq 0x4210
movq %r13, %rdi
callq 0x4210
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
setne %al
jmp 0x1ce75
testb $0x1, %al
je 0x1d665
leaq 0x358(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x45d0
leaq 0x450(%rsp), %r15
movq %r15, %rdi
leaq 0xdfe35(%rip), %rsi     # 0xfcda8
leaq 0x168(%rsp), %rdx
callq 0x1b80e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x358(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x38311
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2472c
movq %rbx, %rdi
callq 0x244fc
movq %r15, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4210
movl $0x0, 0x28(%rsp)
movq (%rsp), %rdi
cmpq %rdi, 0x8(%rsp)
je 0x1d504
xorl %esi, %esi
callq 0x4820
cmpb $0x5f, (%rax)
je 0x1d4f2
movq (%rsp), %rdi
leaq 0xdfc79(%rip), %rsi     # 0xfcc69
callq 0x4190
testl %eax, %eax
je 0x1d4f2
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x4820
cmpb $0x23, (%rax)
je 0x1d4f2
movq 0x8(%rsp), %rax
subq (%rsp), %rax
movq 0x230(%rsp), %rdi
movq 0x238(%rsp), %rcx
subq %rdi, %rcx
cmpq %rcx, %rax
je 0x1d091
movq 0x88(%rsp), %rsi
movl $0x100, %eax            # imm = 0x100
addq %rax, %rsi
callq 0x4040
testl %eax, %eax
je 0x1d091
movq 0x230(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
callq 0x4040
testl %eax, %eax
je 0x1d091
movq 0x230(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl $0x280, %eax            # imm = 0x280
addq %rax, %rsi
callq 0x4040
testl %eax, %eax
jne 0x1d4f2
xorl %r13d, %r13d
movl %r13d, %r13d
movq 0x238(%rsp), %rax
subq 0x230(%rsp), %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x1d317
movq %rbp, %rdi
leaq 0x88(%rsp), %rsi
callq 0x2454a
movq %r13, %r15
shlq $0x5, %r15
movq 0x230(%rsp), %rsi
addq %r15, %rsi
movq %r12, %rdi
callq 0x45d0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x382c4
movl %eax, %ebx
movq %r12, %rdi
callq 0x4210
movq %rbp, %rdi
callq 0x244fc
addl $-0x8, %ebx
cmpl $0xc, %ebx
ja 0x1d30f
leaq 0xdfa32(%rip), %rcx     # 0xfcb40
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x1d1de
movq 0x78(%rsp), %rcx
andb $0x1, %cl
jne 0x1d1de
leaq 0xe0(%rsp), %rdi
callq 0x2451e
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x130(%rsp), %rdi
callq 0x2451e
movq (%rsp), %r15
addq $0x40, %r15
jmp 0x1d223
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
movsd %xmm0, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d309
addq (%rsp), %r15
leaq 0x1c0(%rsp), %rdi
jmp 0x1d290
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
callq 0x6377f
movsd %xmm0, 0x30(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d30f
movb $0x1, %al
movq %rax, 0x78(%rsp)
jmp 0x1d30f
cmpq $0x80, %rax
jne 0x1d6b3
testb $0x1, 0x78(%rsp)
je 0x1d6b3
addq $0x20, %rsi
leaq 0xe0(%rsp), %rdi
callq 0x2451e
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0x130(%rsp), %rdi
callq 0x2451e
movq (%rsp), %r15
addq $0x60, %r15
leaq 0x110(%rsp), %rdi
jmp 0x1d290
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
callq 0x6377f
movsd %xmm0, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d30f
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
movsd %xmm0, 0x30(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d30f
addq (%rsp), %r15
leaq 0x1a0(%rsp), %rdi
movq %r15, %rsi
callq 0x2451e
jmp 0x1d30f
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
callq 0x6377f
movsd %xmm0, 0x30(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d30f
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
movsd %xmm0, 0x30(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
jmp 0x1d309
addq (%rsp), %r15
movq %r15, %rdi
callq 0x38473
movsd %xmm0, 0x30(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xf9fe
movb $0x1, %al
movl %eax, 0x28(%rsp)
incl %r13d
jmp 0x1d094
testb $0x1, 0x28(%rsp)
je 0x1d466
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
leaq 0x30(%rsp), %rdi
callq 0x63c46
movq 0x68(%rsp), %r15
subq 0x60(%rsp), %r15
shlq $0x1d, %r15
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r15
sarq $0x20, %r15
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd (%rax), %xmm0
movsd %xmm0, 0x158(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd (%rax), %xmm2
leaq 0x168(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x50(%rsp), %xmm0
movsd 0x158(%rsp), %xmm1
callq 0x3f1ce
movq 0x178(%rsp), %rax
movq %rax, 0x40(%rsp)
movups 0x168(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x30(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0xaa50
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x790(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x40e0
leaq 0x338(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x45d0
leaq 0x410(%rsp), %r15
movq %r15, %rdi
leaq 0xdf976(%rip), %rsi     # 0xfce18
leaq 0x168(%rsp), %rdx
callq 0x1b80e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x338(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x38311
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2472c
movq %rbx, %rdi
callq 0x244fc
movq %r15, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4210
jmp 0x1cfc6
leaq 0x230(%rsp), %rdi
callq 0x244fc
jmp 0x1cc90
leaq 0x230(%rsp), %rbx
movq %rbx, %rdi
callq 0x2459e
movq %rbx, %rdi
callq 0x244fc
jmp 0x1d628
movq (%rsp), %rsi
leaq 0x230(%rsp), %rbx
movq %rbx, %rdi
pushq $0x5
popq %rdx
pushq $-0x1
popq %rcx
callq 0x44d0
movq 0x1e0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4560
movq %rbx, %rdi
callq 0x4210
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movb $0x1, %al
movq %rax, 0x100(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movb $0x1, %al
movq %rax, 0x208(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movb $0x1, %al
movq %rax, 0x200(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x20(%rax)
movb $0x1, %al
movq %rax, 0x1f8(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movb $0x1, %al
movq %rax, 0x1f0(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38473
movq 0x20(%rsp), %rax
movsd %xmm0, 0x30(%rax)
movb $0x1, %al
movq %rax, 0x1e8(%rsp)
jmp 0x1d628
addq $0x20, %rdi
callq 0x38503
movl %eax, 0x84(%rsp)
movq %rsp, %rdi
callq 0x2459e
movq 0x100(%rsp), %rax
movq 0x208(%rsp), %rcx
movq 0x200(%rsp), %rdx
movq 0x1f8(%rsp), %rsi
movq 0x1f0(%rsp), %rdi
movq 0x1e8(%rsp), %r8
jmp 0x1cb80
leaq 0xe0230(%rip), %rdi     # 0xfd89c
callq 0x4670
leaq 0x230(%rsp), %rdi
jmp 0x1d517
movq 0x13293b(%rip), %rdi    # 0x14ffc0
leaq 0xdfa08(%rip), %rsi     # 0xfd094
callq 0x4480
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0x790(%rsp), %rdi
callq 0x40f0
jmp 0x1d6e8
movq 0x132936(%rip), %rdi    # 0x14fff0
leaq 0xdf6ed(%rip), %rsi     # 0xfcdae
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0x790(%rsp), %rdi
callq 0x40f0
leaq 0x230(%rsp), %rdi
callq 0x244fc
xorl %ebx, %ebx
leaq 0x790(%rsp), %rdi
callq 0x4160
leaq 0x180(%rsp), %rdi
callq 0xb25c
leaq 0xa0(%rsp), %rdi
callq 0xb25c
leaq 0xc0(%rsp), %rdi
callq 0xb25c
leaq 0x60(%rsp), %rdi
callq 0xb25c
leaq 0x1a0(%rsp), %rdi
callq 0x244fc
leaq 0x1c0(%rsp), %rdi
callq 0x244fc
leaq 0x110(%rsp), %rdi
callq 0x244fc
leaq 0x130(%rsp), %rdi
callq 0x244fc
leaq 0xe0(%rsp), %rdi
callq 0x244fc
movq %rsp, %rdi
callq 0x244fc
leaq 0x88(%rsp), %rdi
callq 0x244fc
movl $0x2a0, %r14d           # imm = 0x2A0
leaq (%rsp,%r14), %rdi
addq $0x4d0, %rdi            # imm = 0x4D0
callq 0x4210
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x1d784
leaq 0x210(%rsp), %rdi
callq 0x4210
movl %ebx, %eax
addq $0x998, %rsp            # imm = 0x998
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x790(%rsp), %rdi
callq 0x40f0
movq 0x2d0(%rsp), %rbx
movq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %rcx
cmpq %rax, %rcx
movq 0x20(%rsp), %rbp
movl 0x84(%rsp), %esi
je 0x1d81d
movq 0x138(%rsp), %rdx
cmpq 0x130(%rsp), %rdx
je 0x1d81d
movq 0x118(%rsp), %rdx
cmpq 0x110(%rsp), %rdx
jne 0x1d902
testl %esi, %esi
sets %al
cmpl $0x1, %esi
sete %cl
orb %al, %cl
jne 0x1d841
leaq 0xdf5eb(%rip), %rdi     # 0xfce1e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4050
jmp 0x1d6ea
leaq 0xdf503(%rip), %rsi     # 0xfcd4b
leaq 0x230(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x1b80e
leaq 0xe0(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x24a2c
leaq 0x230(%rsp), %rdi
callq 0x4210
leaq 0xdeff5(%rip), %rsi     # 0xfc878
leaq 0x230(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x1b80e
leaq 0x130(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x24a2c
leaq 0x230(%rsp), %rdi
callq 0x4210
leaq 0xe5732(%rip), %rsi     # 0x102ff0
leaq 0x230(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x1b80e
leaq 0x110(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x24a2c
leaq 0x230(%rsp), %rdi
callq 0x4210
movq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %rcx
cmpq %rax, %rcx
je 0x1d9ae
movq 0x138(%rsp), %rax
cmpq 0x130(%rsp), %rax
je 0x1d9ae
movq 0x118(%rsp), %rax
cmpq 0x110(%rsp), %rax
je 0x1d9ae
movq 0x1a0(%rsp), %rax
movq 0x1a8(%rsp), %rcx
movq 0x180(%rsp), %rdx
movq %rdx, 0x108(%rsp)
movq 0x188(%rsp), %rdx
movq %rdx, 0x150(%rsp)
movq %rax, 0x50(%rsp)
movq %rcx, 0x158(%rsp)
cmpq %rax, %rcx
jne 0x1d9e8
movq 0x1c0(%rsp), %rax
cmpq %rax, 0x1c8(%rsp)
jne 0x1d9e8
movq 0x132662(%rip), %rbx    # 0x14fff0
leaq 0xdf5bc(%rip), %rsi     # 0xfcf51
movq %rbx, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0xdf5ef(%rip), %rsi     # 0xfcf9b
jmp 0x1d9d3
movq 0x13263b(%rip), %rbx    # 0x14fff0
leaq 0xdf554(%rip), %rsi     # 0xfcf10
movq %rbx, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x4230
leaq 0xdf567(%rip), %rsi     # 0xfcf3a
movq %rbx, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x4230
jmp 0x1d6e8
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %rax
movq 0xc8(%rsp), %rsi
subq 0xc0(%rsp), %rsi
cmpq %rsi, %rax
jne 0x1ddf8
cmpq %rcx, %rdx
je 0x1ddf8
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
jne 0x1ddf8
cmpq $0x0, 0x328(%rbp)
jne 0x1da4d
movsbl (%rbx), %esi
movq 0x1e0(%rsp), %rdi
callq 0x4700
leaq 0x230(%rsp), %rdi
callq 0x3dc5a
leaq 0x30(%rsp), %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x63c46
leaq 0x270(%rsp), %r15
leaq 0x2f0(%rbp), %rax
movq %rax, 0x78(%rsp)
xorl %ebx, %ebx
movzbl 0x164(%rsp), %eax
movl %eax, 0x100(%rsp)
movl $0x98, %r14d
leaq 0x230(%rsp), %r12
xorl %esi, %esi
movl %esi, %esi
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
sarq $0x3, %rax
cmpq %rsi, %rax
jbe 0x1de86
movq 0x158(%rsp), %rax
cmpq 0x50(%rsp), %rax
leaq 0x1c0(%rsp), %rax
leaq 0x1a0(%rsp), %rcx
cmovneq %rcx, %rax
movq %rsi, 0x28(%rsp)
shlq $0x5, %rsi
addq (%rax), %rsi
movq %r15, %rdi
callq 0x4270
leaq 0x3f0(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x45d0
movq %r13, %rdi
movl 0x100(%rsp), %esi
callq 0x1b1bb
movsd %xmm0, 0x260(%rsp)
movq %r13, %rdi
callq 0x4210
movq 0x150(%rsp), %rax
cmpq 0x108(%rsp), %rax
je 0x1db49
movq 0x180(%rsp), %rax
movq 0x28(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
jmp 0x1db4c
xorps %xmm0, %xmm0
movsd %xmm0, 0x2b8(%rsp)
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x1dde4
movq %r15, %r13
shlq $0x5, %r13
addq %r13, %rsi
leaq 0x318(%rsp), %rdi
callq 0x45d0
movq 0x60(%rsp), %rax
movq 0x28(%rsp), %rcx
cvtsd2ss (%rax,%rcx,8), %xmm0
movq 0xc0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm1
movq 0xa0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm2
leaq 0x318(%rsp), %rdi
callq 0x38690
cvtss2sd %xmm0, %xmm0
callq 0x6377f
movsd %xmm0, 0x248(%rsp)
leaq 0x318(%rsp), %rdi
callq 0x4210
movq 0x130(%rsp), %rsi
addq %r13, %rsi
leaq 0x2f8(%rsp), %rdi
callq 0x45d0
movq 0x60(%rsp), %rax
movq 0x28(%rsp), %rcx
cvtsd2ss (%rax,%rcx,8), %xmm0
movq 0xc0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm1
movq 0xa0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm2
leaq 0x2f8(%rsp), %rdi
callq 0x38690
cvtss2sd %xmm0, %xmm0
callq 0x6377f
movsd %xmm0, 0x250(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x4210
addq 0x110(%rsp), %r13
leaq 0x2d8(%rsp), %rdi
movq %r13, %rsi
callq 0x45d0
movq 0x60(%rsp), %rax
movq 0x28(%rsp), %rcx
cvtsd2ss (%rax,%rcx,8), %xmm0
movq 0xc0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm1
movq 0xa0(%rsp), %rax
cvtsd2ss (%rax,%rcx,8), %xmm2
leaq 0x2d8(%rsp), %rdi
callq 0x38690
cvtss2sd %xmm0, %xmm0
callq 0x6377f
movsd %xmm0, 0x258(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x4210
movsd 0x248(%rsp), %xmm0
movsd 0x250(%rsp), %xmm1
movsd 0x258(%rsp), %xmm2
leaq 0x168(%rsp), %rdi
movq %rbp, %rsi
callq 0x3f0e6
movq 0x178(%rsp), %rax
movq %rax, 0x40(%rsp)
movups 0x168(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x230(%rsp)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x238(%rsp)
leaq 0x30(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x240(%rsp)
movq 0xe8(%rsp), %rax
subq 0xe0(%rsp), %rax
shrq $0x5, %rax
imull 0x28(%rsp), %eax
addl %r15d, %eax
movl %eax, 0x2b0(%rsp)
xorl %ebp, %ebp
pushq $0x1
popq %r13
movl %ebp, %ebp
movq 0x20(%rsp), %rdi
movq 0x2f0(%rdi), %rsi
movq 0x2f8(%rdi), %rax
subq %rsi, %rax
cqto
idivq %r14
cmpq %rbp, %rax
jbe 0x1ddc4
imulq $0x98, %rbp, %rax
addq %rax, %rsi
movq %r12, %rdx
callq 0x3f612
movsd 0xde290(%rip), %xmm1    # 0xfc048
ucomisd %xmm0, %xmm1
cmoval %ebx, %r13d
incl %ebp
jmp 0x1dd7c
cmpl $0x1, %r13d
jne 0x1ddd7
movq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0xa7d8
incl %r15d
movq 0x20(%rsp), %rbp
jmp 0x1db58
movq 0x28(%rsp), %rsi
incl %esi
leaq 0x270(%rsp), %r15
jmp 0x1daa2
movq 0x1321f1(%rip), %rdi    # 0x14fff0
leaq 0xdf23f(%rip), %rsi     # 0xfd045
callq 0x4480
movq 0x68(%rsp), %rsi
subq 0x60(%rsp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x42e0
leaq 0xdf249(%rip), %rsi     # 0xfd071
movq %rax, %rdi
callq 0x4480
movq 0xc8(%rsp), %rsi
subq 0xc0(%rsp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x42e0
leaq 0xdf22a(%rip), %rsi     # 0xfd07d
movq %rax, %rdi
callq 0x4480
movq 0xa8(%rsp), %rsi
subq 0xa0(%rsp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rbx
leaq 0xdf208(%rip), %rsi     # 0xfd089
jmp 0x1d9d3
movq 0x2f8(%rbp), %rax
subq 0x2f0(%rbp), %rax
movl $0x98, %ecx
cqto
idivq %rcx
movl %eax, 0x110(%rbp)
leaq 0x230(%rsp), %rdi
callq 0xa808
movb $0x1, %bl
jmp 0x1d6ea
jmp 0x1e093
jmp 0x1e059
jmp 0x1e00d
jmp 0x1e059
jmp 0x1e00d
jmp 0x1e059
jmp 0x1e00d
jmp 0x1e059
movq %rax, %rbx
leaq 0x3f0(%rsp), %rdi
jmp 0x1e003
jmp 0x1e093
jmp 0x1e059
jmp 0x1e059
jmp 0x1e059
jmp 0x1e093
jmp 0x1e093
movq %rax, %rbx
leaq 0x450(%rsp), %rdi
callq 0x4210
jmp 0x1df23
movq %rax, %rbx
leaq 0x358(%rsp), %rdi
jmp 0x1e08a
jmp 0x1e0d1
movq %rax, %rbx
jmp 0x1e0ee
movq %rax, %rbx
jmp 0x1e175
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
jmp 0x1df6d
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x4210
cmpq %r14, %r15
jne 0x1df70
jmp 0x1e195
movq %rax, %rbx
jmp 0x1e195
movq %rax, %rbx
leaq 0x4b0(%rsp), %rdi
callq 0x4210
jmp 0x1dfa3
movq %rax, %rbx
leaq 0x3b8(%rsp), %rdi
jmp 0x1e018
jmp 0x1e059
movq %rax, %rbx
leaq 0x490(%rsp), %rdi
callq 0x4210
jmp 0x1dfc7
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
jmp 0x1e08a
jmp 0x1e0d1
jmp 0x1e0d1
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
jmp 0x1e003
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
jmp 0x1e003
movq %rax, %rbx
leaq 0x318(%rsp), %rdi
callq 0x4210
jmp 0x1e096
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0x4210
jmp 0x1e0e1
jmp 0x1e059
jmp 0x1e0d1
jmp 0x1e059
jmp 0x1e0d1
jmp 0x1e059
movq %rax, %rbx
leaq 0x410(%rsp), %rdi
callq 0x4210
jmp 0x1e047
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
jmp 0x1e08a
jmp 0x1e0d1
jmp 0x1e093
jmp 0x1e059
jmp 0x1e0d1
movq %rax, %rbx
jmp 0x1e0e1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
movq %rax, %rbx
leaq 0x470(%rsp), %rdi
callq 0x4210
jmp 0x1e082
movq %rax, %rbx
leaq 0x378(%rsp), %rdi
callq 0x4210
jmp 0x1e0d4
jmp 0x1e0d1
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0xa808
jmp 0x1e0e1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
jmp 0x1e0d1
movq %rax, %rbx
jmp 0x1e0c2
movq %rax, %rbx
leaq 0x430(%rsp), %rdi
callq 0x4210
leaq 0x3d8(%rsp), %rdi
callq 0x244fc
jmp 0x1e0d4
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0x244fc
leaq 0x790(%rsp), %rdi
callq 0x4160
leaq 0x180(%rsp), %rdi
callq 0xb25c
leaq 0xa0(%rsp), %rdi
callq 0xb25c
leaq 0xc0(%rsp), %rdi
callq 0xb25c
leaq 0x60(%rsp), %rdi
callq 0xb25c
leaq 0x1a0(%rsp), %rdi
callq 0x244fc
leaq 0x1c0(%rsp), %rdi
callq 0x244fc
leaq 0x110(%rsp), %rdi
callq 0x244fc
leaq 0x130(%rsp), %rdi
callq 0x244fc
leaq 0xe0(%rsp), %rdi
callq 0x244fc
movq %rsp, %rdi
callq 0x244fc
leaq 0x88(%rsp), %rdi
callq 0x244fc
movl $0x2a0, %r14d           # imm = 0x2A0
leaq (%rsp,%r14), %rdi
addq $0x4d0, %rdi            # imm = 0x4D0
callq 0x4210
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x1e17b
leaq 0x210(%rsp), %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x4780