// File: /workspace/github_cpp_makefile_star2_O1/atfrank[P]PCASA/src/casa.cpp
// Function: main
int main (int argc, char **argv){
  int i;
  unsigned int j;
  double cutoff;
  int beta;
  std::vector<std::string> pdbs;
  std::string currArg;
  std::string fparmfile;
  std::string freffile;
  std::string fsasa;
  std::vector<std::string> trajs;
  int start=0;
  int stop=std::numeric_limits<int>::max();
  int skip=0;
  bool startFlag=false;
  unsigned int itrj;
  std::ifstream trjin;
  Trajectory *ftrjin;
  unsigned int nframe;
  AnalyzeCasa *anin;
  std::string fchemshift;
  std::string identification;
  std::string errorType;
  bool header;
  bool predict;
  
  trajs.clear();
  ftrjin=NULL;
  nframe=0;
  anin=NULL;
  fparmfile="";
  freffile="";
  fsasa="";
  cutoff=10.0;
  beta=-1;
  header=false;
  predict=false;
  identification="test";

  for (i=1; i<argc; i++){
    currArg=argv[i];
    if (currArg.compare("-h") == 0 || currArg.compare("-help") == 0){
      usage();
    }
    else if (currArg.compare("-parmfile") == 0 || currArg.compare("-P") == 0 ){
      currArg=argv[++i];
      fparmfile=currArg;
    }      
    else if (currArg.compare("-reffile") == 0 || currArg.compare("-R") == 0 ){
      currArg=argv[++i];
      freffile=currArg;
    }      
    else if (currArg.compare("-sasafile") == 0 || currArg.compare("-S") == 0 ){
      currArg=argv[++i];
      fsasa=currArg;
    }      
    else if (currArg.compare("-header") == 0 || currArg.compare("-head") == 0 ){
      header=true;
    }
    else if (currArg.compare("-predict") == 0 || currArg.compare("-p") == 0 ){
      predict=true;
    }
    else if (currArg.compare("-cutoff") == 0 || currArg.compare("-c") == 0 ){
      currArg=argv[++i];
      cutoff=atof(currArg.c_str());
    }
    else if (currArg.compare("-beta") == 0 || currArg.compare("-b") == 0 ){
      currArg=argv[++i];
      std::stringstream(currArg) >> beta;
    }    
    else if (currArg.compare("-trj") == 0 || currArg.compare("-traj") == 0 || currArg.compare("-t") == 0){
      currArg=argv[++i];
      trajs.push_back(currArg);
    }
    else if (currArg.compare("-skip") == 0){
      currArg=argv[++i];
      std::stringstream(currArg) >> skip;
    }
    else if (currArg.compare("-start") == 0){
      currArg=argv[++i];
      std::stringstream(currArg) >> start;
      start--;
      startFlag=true;
    }
    else if (currArg.compare("-stop") == 0){
      currArg=argv[++i];
      std::stringstream(currArg) >> stop;
    }
    else if (currArg.compare("-identification") == 0 || currArg.compare("-i") == 0 ){
      currArg=argv[++i];
      identification=currArg;
    }
    else if (currArg.compare(0,1,"-") == 0){
      std::cerr << "Warning: Skipping unknown option \"" << currArg << "\"" << std::endl;
    }
    else{
      pdbs.push_back(currArg);
    }
  }

  if (pdbs.size() == 0){
    std::cerr << std::endl << "Error: Please provide an input file" << std::endl << std::endl;
    usage();
  }


  Molecule *mol=NULL;
  anin=new AnalyzeCasa;

  if (trajs.size() > 0){
    if (pdbs.size() > 1){
      std::cerr << std::endl << "Warning: Only the first PDB structure is used for trajectory analysis" << std::endl << std::endl;
    }
    /* Trajectory analysis */
    anin->addSel(":.CA");
    mol=Molecule::readPDB(pdbs.at(0));
    anin->preAnalysis(mol);
    
    /* Process trajectories */
    for (itrj=0; itrj< trajs.size(); itrj++){
      trjin.open(trajs.at(itrj).c_str(), std::ios::binary);
      if (trjin.is_open()){
        ftrjin=new Trajectory;
        ftrjin->setMolecule(mol);
        if (ftrjin->findFormat(trjin) == true){
          ftrjin->readHeader(trjin);
          if (skip > 0 && startFlag == false){
            start=skip;
          }
          /* Loop through desired frames */
          for (i=start; i< ftrjin->getNFrame() && i< stop; i=i+1+skip){
            if( ftrjin->readFrame(trjin, i) == false){
              std::cerr << "Warning: EOF found before the next frame could be read" << std::endl;
              break;
            }
            nframe++;
            anin->clearMol();
            anin->preAnalysis(mol);
            anin->runAnalysisCasa(nframe,identification,header,predict,fparmfile,freffile,fsasa,cutoff,beta);
          }
        }
        else{
          std::cerr << "Warning: Skipping unknown trajectory format \"";
          std::cerr << trajs.at(itrj) << "\"" << std::endl;
        }
        if (ftrjin != NULL){
          delete ftrjin;
        }
      }
      trjin.close();
    }
  }
  else { 
    Molecule *mol=NULL;
      for (j=0; j< pdbs.size(); j++){
        mol=Molecule::readPDB(pdbs.at(j));
        anin->addSel(":.CA");
        anin->preAnalysis(mol);
        anin->runAnalysisCasa(j+1,identification,header,predict,fparmfile,freffile,fsasa,cutoff,beta);
        delete mol;
      }
      if (anin != NULL){
        delete anin;
      }

      return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x698, %rsp            # imm = 0x698
movq %rsi, %rbx
movl %edi, 0x18(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
leaq 0x98(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x118(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xf8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xd8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movl %eax, 0xc(%rsp)
movl $0x7fffffff, 0x3c(%rsp) # imm = 0x7FFFFFFF
movl %eax, 0x10(%rsp)
leaq 0x490(%rsp), %rdi
callq 0x4330
leaq 0x2f8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xb8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x2d8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq 0x40(%rsp), %r14
movq 0x48(%rsp), %r15
cmpq %r14, %r15
je 0x4d80
leaq 0x10(%r14), %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x4d6a
movq (%r12), %rsi
incq %rsi
callq 0x42e0
leaq 0x20(%r12), %rax
addq $0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0x4d54
movq %r14, 0x48(%rsp)
leaq 0x108(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x37723(%rip), %rcx     # 0x3c4b6
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x4470
leaq 0xe8(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x37706(%rip), %rcx     # 0x3c4b6
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x4470
leaq 0xc8(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x376e9(%rip), %rcx     # 0x3c4b6
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x4470
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
leaq 0xa8(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x37364(%rip), %rcx     # 0x3c156
movl $0x4, %r8d
xorl %esi, %esi
callq 0x4470
cmpl $0x2, 0x18(%rsp)
jl 0x53ba
leaq 0x308(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x60(%rsp)
movl $0x1, %r14d
movsd 0x371dd(%rip), %xmm0    # 0x3c008
movsd %xmm0, 0x68(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x88(%rsp), %r12
movq $0x0, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
movslq %r14d, %rbp
movq (%rbx,%rbp,8), %r13
movq 0x90(%rsp), %r15
movq %r13, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x4470
movq %r12, %rdi
leaq 0x372d3(%rip), %rsi     # 0x3c15b
callq 0x40e0
testl %eax, %eax
je 0x5edb
movq %r12, %rdi
leaq 0x372bf(%rip), %rsi     # 0x3c15e
callq 0x40e0
testl %eax, %eax
je 0x5edb
movq %r12, %rdi
leaq 0x372ae(%rip), %rsi     # 0x3c164
callq 0x40e0
testl %eax, %eax
je 0x50d6
movq %r12, %rdi
leaq 0x372a1(%rip), %rsi     # 0x3c16e
callq 0x40e0
testl %eax, %eax
je 0x50d6
movq %r12, %rdi
leaq 0x3728d(%rip), %rsi     # 0x3c171
callq 0x40e0
testl %eax, %eax
je 0x5110
movq %r12, %rdi
leaq 0x3727f(%rip), %rsi     # 0x3c17a
callq 0x40e0
testl %eax, %eax
je 0x5110
movq %r12, %rdi
leaq 0x3726b(%rip), %rsi     # 0x3c17d
callq 0x40e0
testl %eax, %eax
je 0x514a
movq %r12, %rdi
leaq 0x3725e(%rip), %rsi     # 0x3c187
callq 0x40e0
testl %eax, %eax
je 0x514a
movq %r12, %rdi
leaq 0x3724a(%rip), %rsi     # 0x3c18a
callq 0x40e0
testl %eax, %eax
je 0x5198
movq %r12, %rdi
leaq 0x3723b(%rip), %rsi     # 0x3c192
callq 0x40e0
testl %eax, %eax
je 0x5198
movq %r12, %rdi
leaq 0x3722a(%rip), %rsi     # 0x3c198
callq 0x40e0
testl %eax, %eax
je 0x51a1
movq %r12, %rdi
leaq 0x3721c(%rip), %rsi     # 0x3c1a1
callq 0x40e0
testl %eax, %eax
je 0x51a1
movq %r12, %rdi
leaq 0x37208(%rip), %rsi     # 0x3c1a4
callq 0x40e0
testl %eax, %eax
je 0x51aa
movq %r12, %rdi
leaq 0x371f9(%rip), %rsi     # 0x3c1ac
callq 0x40e0
testl %eax, %eax
je 0x51aa
movq %r12, %rdi
leaq 0x371e5(%rip), %rsi     # 0x3c1af
callq 0x40e0
testl %eax, %eax
je 0x51ea
movq %r12, %rdi
leaq 0x371d4(%rip), %rsi     # 0x3c1b5
callq 0x40e0
testl %eax, %eax
je 0x51ea
movq %r12, %rdi
leaq 0x371c0(%rip), %rsi     # 0x3c1b8
callq 0x40e0
testl %eax, %eax
je 0x5258
movq %r12, %rdi
leaq 0x371ae(%rip), %rsi     # 0x3c1bd
callq 0x40e0
testl %eax, %eax
je 0x5258
movq %r12, %rdi
leaq 0x3719d(%rip), %rsi     # 0x3c1c3
callq 0x40e0
testl %eax, %eax
je 0x5258
movq %r12, %rdi
leaq 0x37189(%rip), %rsi     # 0x3c1c6
callq 0x40e0
testl %eax, %eax
je 0x5277
movq %r12, %rdi
leaq 0x37178(%rip), %rsi     # 0x3c1cc
callq 0x40e0
testl %eax, %eax
je 0x52ab
movq %r12, %rdi
leaq 0x37168(%rip), %rsi     # 0x3c1d3
callq 0x40e0
testl %eax, %eax
je 0x532b
movq %r12, %rdi
leaq 0x37157(%rip), %rsi     # 0x3c1d9
callq 0x40e0
testl %eax, %eax
je 0x5309
movq %r12, %rdi
leaq 0x37150(%rip), %rsi     # 0x3c1e9
callq 0x40e0
testl %eax, %eax
je 0x5309
movl $0x1, %edx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x38383(%rip), %rcx     # 0x3d43a
callq 0x43c0
testl %eax, %eax
je 0x5362
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x62fa
jmp 0x5185
movq 0x8(%rbx,%rbp,8), %r15
movq 0x90(%rsp), %r13
movq %r15, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4470
leaq 0x108(%rsp), %rdi
movq %r12, %rsi
callq 0x4180
jmp 0x5182
movq 0x8(%rbx,%rbp,8), %r15
movq 0x90(%rsp), %r13
movq %r15, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4470
leaq 0xe8(%rsp), %rdi
movq %r12, %rsi
callq 0x4180
jmp 0x5182
movq 0x8(%rbx,%rbp,8), %r15
movq 0x90(%rsp), %r13
movq %r15, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4470
leaq 0xc8(%rsp), %rdi
movq %r12, %rsi
callq 0x4180
incl %r14d
incl %r14d
cmpl 0x18(%rsp), %r14d
jl 0x4e54
jmp 0x53d4
movb $0x1, %al
movq %rax, 0x30(%rsp)
jmp 0x5185
movb $0x1, %al
movq %rax, 0x28(%rsp)
jmp 0x5185
movq 0x8(%rbx,%rbp,8), %r15
movq 0x90(%rsp), %r13
movq %r15, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4470
incl %r14d
movq 0x88(%rsp), %rdi
callq 0x4380
movsd %xmm0, 0x68(%rsp)
jmp 0x5185
movq 0x8(%rbx,%rbp,8), %r15
movq 0x90(%rsp), %r13
movq %r15, %rdi
callq 0x4140
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4470
leaq 0x308(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x4490
movq %r15, %rdi
leaq 0x14(%rsp), %rsi
callq 0x41b0
incl %r14d
movq %r15, %rdi
movq 0x3ebd64(%rip), %rsi    # 0x3f0fa8
callq 0x4240
movq 0x60(%rsp), %rdi
callq 0x4110
jmp 0x5185
movq 0x8(%rbx,%rbp,8), %rsi
movq %r12, %rdi
callq 0x43f0
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x62fa
jmp 0x5182
movq 0x8(%rbx,%rbp,8), %rsi
movq %r12, %rdi
callq 0x43f0
leaq 0x308(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x4490
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x41b0
jmp 0x5237
movq 0x8(%rbx,%rbp,8), %rsi
movq %r12, %rdi
callq 0x43f0
leaq 0x308(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x4490
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x41b0
incl %r14d
movq %r15, %rdi
movq 0x3ebcbe(%rip), %rsi    # 0x3f0fa8
callq 0x4240
movq 0x60(%rsp), %rdi
callq 0x4110
decl 0xc(%rsp)
movb $0x1, %al
movq %rax, 0x20(%rsp)
jmp 0x5185
movq 0x8(%rbx,%rbp,8), %rsi
movq %r12, %rdi
callq 0x43f0
leaq 0xa8(%rsp), %rdi
movq %r12, %rsi
callq 0x4180
jmp 0x5182
movq 0x8(%rbx,%rbp,8), %rsi
movq %r12, %rdi
callq 0x43f0
leaq 0x308(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x4490
movq %r15, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x41b0
jmp 0x5237
movl $0x22, %edx
movq 0x3ebc82(%rip), %rdi    # 0x3f0ff0
leaq 0x36e77(%rip), %rsi     # 0x3c1ec
callq 0x4340
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0x3ebc5f(%rip), %rdi    # 0x3f0ff0
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x38108(%rip), %rsi     # 0x3d4b0
callq 0x4340
movq %r15, %rdi
callq 0x4150
jmp 0x5185
movb $0x1, 0x20(%rsp)
movsd 0x36c41(%rip), %xmm0    # 0x3c008
movsd %xmm0, 0x68(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x53e8
testb $0x1, 0x20(%rsp)
sete 0x20(%rsp)
movq 0x28(%rsp), %r13
movq 0x30(%rsp), %rbp
movq 0x78(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x5e44
movl $0xd0, %edi
callq 0x42d0
movq %rax, %rbx
leaq 0x2b8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x36e1b(%rip), %rsi     # 0x3c233
leaq 0x36e15(%rip), %rdx     # 0x3c234
leaq 0x2a8(%rsp), %rdi
callq 0x6516
leaq 0x2a8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6c54
movq 0x2a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5459
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x48(%rsp), %rdx
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x40(%rsp), %rdx
je 0x59f7
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x5517
movq 0x3ebb69(%rip), %rdi    # 0x3f0ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq 0x3ebb4e(%rip), %rdi    # 0x3f0ff0
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq %rax, %r14
leaq 0x36d7c(%rip), %rsi     # 0x3c235
movl $0x45, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
leaq 0x318(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x36d51(%rip), %rsi     # 0x3c27b
leaq 0x36d4e(%rip), %rdx     # 0x3c27f
leaq 0x308(%rsp), %rdi
callq 0x6516
leaq 0x308(%rsp), %rsi
movq %rbx, %rdi
callq 0x6ee0
movq 0x308(%rsp), %rdi
cmpq %r15, %rdi
je 0x556b
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x5ee0
leaq 0x298(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x288(%rsp), %rdi
callq 0x6486
leaq 0x278(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36f04(%rip), %rdx     # 0x3c4b6
leaq 0x268(%rsp), %rdi
movq %rdx, %rsi
callq 0x6516
leaq 0x288(%rsp), %rdi
leaq 0x268(%rsp), %rdx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x237ee
movq %rax, 0x18(%rsp)
movq 0x268(%rsp), %rdi
cmpq %r12, %rdi
je 0x5600
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x561d
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0xd532
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x5d0c
xorl %r15d, %r15d
movzbl %bpl, %ecx
andl $0x1, %ecx
movl %ecx, 0x30(%rsp)
movzbl %r13b, %ecx
andl $0x1, %ecx
movl %ecx, 0x28(%rsp)
xorl %ebp, %ebp
movq %r15, %r13
shlq $0x5, %r13
movq (%rax,%r13), %rsi
leaq 0x490(%rsp), %rdi
movl $0x4, %edx
callq 0x41c0
leaq 0x508(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x59c8
movl $0x198, %edi            # imm = 0x198
callq 0x42d0
movq %rax, %r12
movq %rax, %rdi
callq 0x37530
movq %r12, %rdi
movq 0x18(%rsp), %rsi
callq 0x39988
movq %r12, %rdi
leaq 0x490(%rsp), %rsi
callq 0x3781e
testb %al, %al
je 0x58e1
movq %r12, %rdi
leaq 0x490(%rsp), %rsi
callq 0x37950
movl 0x10(%rsp), %eax
testl %eax, %eax
setg %cl
andb 0x20(%rsp), %cl
cmpb $0x1, %cl
jne 0x56e7
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %r13d
movq %r12, %rdi
callq 0x38720
cmpl %eax, %r13d
jge 0x59b3
cmpl 0x3c(%rsp), %r13d
jge 0x59b3
movq %r12, %rdi
leaq 0x490(%rsp), %rsi
movl %r13d, %edx
callq 0x38b58
testb %al, %al
je 0x5969
movq %rbx, %rdi
callq 0x6fa0
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0xd532
leaq 0x1f8(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0x6486
leaq 0x1d8(%rsp), %rax
movq %rax, 0x1c8(%rsp)
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1c8(%rsp), %rdi
callq 0x6486
leaq 0x1b8(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0x6486
leaq 0x258(%rsp), %rax
movq %rax, 0x248(%rsp)
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x248(%rsp), %r14
movq %r14, %rdi
callq 0x6486
incl %ebp
movl 0x14(%rsp), %eax
subq $0x8, %rsp
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x1f0(%rsp), %rdx
movl 0x38(%rsp), %ecx
movl 0x30(%rsp), %r8d
leaq 0x1d0(%rsp), %r9
movsd 0x70(%rsp), %xmm0
pushq %rax
pushq %r14
leaq 0x1c0(%rsp), %rax
pushq %rax
callq 0x103aa
addq $0x20, %rsp
movq 0x248(%rsp), %rdi
leaq 0x258(%rsp), %rax
cmpq %rax, %rdi
je 0x5863
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0x5888
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x58ad
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x58d2
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x10(%rsp), %eax
addl %eax, %r13d
incl %r13d
jmp 0x56ec
movl $0x2d, %edx
movq 0x3eb703(%rip), %rdi    # 0x3f0ff0
leaq 0x369c3(%rip), %rsi     # 0x3c2b7
callq 0x4340
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x5ee5
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq 0x3eb6cd(%rip), %rdi    # 0x3f0ff0
callq 0x4340
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x37b76(%rip), %rsi     # 0x3d4b0
callq 0x4340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
jmp 0x59b3
movl $0x36, %edx
movq 0x3eb67b(%rip), %rdi    # 0x3f0ff0
leaq 0x36904(%rip), %rsi     # 0x3c280
callq 0x4340
movq 0x3eb668(%rip), %rcx    # 0x3f0ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq 0x3eb64a(%rip), %rdi    # 0x3f0ff0
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq %r12, %rdi
callq 0x6338
movl $0x198, %esi            # imm = 0x198
movq %r12, %rdi
callq 0x42e0
leaq 0x490(%rsp), %rdi
callq 0x4090
incl %r15d
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
ja 0x5655
jmp 0x5d0c
cmpq %rax, %rcx
je 0x5d03
movq %r13, %rdx
movq %rbp, %rsi
movl $0x1, %ebp
xorl %ecx, %ecx
movzbl %sil, %r13d
andl $0x1, %r13d
movzbl %dl, %r14d
andl $0x1, %r14d
shlq $0x5, %rcx
leaq 0x198(%rsp), %rdx
movq %rdx, 0x188(%rsp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0x188(%rsp), %rdi
callq 0x6486
leaq 0x238(%rsp), %rax
movq %rax, 0x228(%rsp)
leaq 0x228(%rsp), %r12
movq %r12, %rdi
leaq 0x36a4a(%rip), %rdx     # 0x3c4b6
movq %rdx, %rsi
callq 0x6516
leaq 0x188(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x237ee
movq %rax, %r12
movq 0x228(%rsp), %rdi
leaq 0x238(%rsp), %rax
cmpq %rax, %rdi
je 0x5ab3
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x5ad8
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x318(%rsp), %rax
movq %rax, 0x308(%rsp)
leaq 0x308(%rsp), %r15
movq %r15, %rdi
leaq 0x36781(%rip), %rsi     # 0x3c27b
leaq 0x3677e(%rip), %rdx     # 0x3c27f
callq 0x6516
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6ee0
movq 0x308(%rsp), %rdi
leaq 0x318(%rsp), %rax
cmpq %rax, %rdi
je 0x5b36
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd532
leaq 0x178(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x6486
leaq 0x158(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x6486
leaq 0x138(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x6486
leaq 0x218(%rsp), %rax
movq %rax, 0x208(%rsp)
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x208(%rsp), %r15
movq %r15, %rdi
callq 0x6486
movl 0x14(%rsp), %eax
subq $0x8, %rsp
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x170(%rsp), %rdx
movl %r13d, %ecx
movl %r14d, %r8d
leaq 0x150(%rsp), %r9
movsd 0x70(%rsp), %xmm0
pushq %rax
pushq %r15
leaq 0x140(%rsp), %rax
pushq %rax
callq 0x103aa
addq $0x20, %rsp
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x5c67
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x5c8c
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x5cb1
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x5cd6
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x42e0
testq %r12, %r12
je 0x5ce5
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movl %ebp, %ecx
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x5a1d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq 0x2c8(%rsp), %rdi
leaq 0x2d8(%rsp), %rax
cmpq %rax, %rdi
je 0x5d31
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x5d56
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x2e8(%rsp), %rdi
leaq 0x2f8(%rsp), %rax
cmpq %rax, %rdi
je 0x5d7b
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x490(%rsp), %rdi
callq 0x40c0
leaq 0x40(%rsp), %rdi
callq 0x6420
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x5db7
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x5ddc
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x5e01
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x5e26
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x70(%rsp), %rdi
callq 0x6420
xorl %eax, %eax
addq $0x698, %rsp            # imm = 0x698
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3eb1a5(%rip), %rdi    # 0x3f0ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq 0x3eb18a(%rip), %rdi    # 0x3f0ff0
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq %rax, %rbx
leaq 0x36392(%rip), %rsi     # 0x3c20f
movl $0x23, %edx
movq %rax, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
callq 0x4b5c
xorl %r15d, %r15d
xorl %edx, %edx
leaq 0x3643d(%rip), %rdi     # 0x3c329
movq %r15, %rsi
xorl %eax, %eax
callq 0x4440
jmp 0x5f0b
jmp 0x61ca
jmp 0x5f0b
jmp 0x61ca
jmp 0x5f0b
jmp 0x61ca
movq %rax, %r14
movq 0x3eb093(%rip), %rsi    # 0x3f0fa8
leaq 0x308(%rsp), %rdi
callq 0x4240
leaq 0x388(%rsp), %rdi
callq 0x4110
jmp 0x61cd
jmp 0x61ca
movq %rax, %r14
movq 0x268(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f5e
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x5f5e
movq %rax, %r14
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x61cd
movq 0x298(%rsp), %rsi
jmp 0x61be
movq %rax, %r14
movq 0x308(%rsp), %rdi
cmpq %r15, %rdi
jne 0x6058
jmp 0x61cd
jmp 0x61ca
movq %rax, %r14
movq 0x2a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5fbf
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x5fbf
movq %rax, %r14
movl $0xd0, %esi
movq %rbx, %rdi
jmp 0x61c1
movq %rax, %r14
jmp 0x6249
movq %rax, %r14
movl $0x198, %esi            # imm = 0x198
movq %r12, %rdi
jmp 0x61c1
movq %rax, %r14
jmp 0x6011
movq %rax, %r14
movq 0x228(%rsp), %rdi
leaq 0x238(%rsp), %rax
cmpq %rax, %rdi
je 0x6011
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x61cd
movq 0x198(%rsp), %rsi
jmp 0x61be
jmp 0x61ca
movq %rax, %r14
movq 0x308(%rsp), %rdi
leaq 0x318(%rsp), %rax
cmpq %rax, %rdi
je 0x61cd
movq 0x318(%rsp), %rsi
jmp 0x61be
movq %rax, %r14
jmp 0x60e6
movq %rax, %r14
jmp 0x60c1
movq %rax, %r14
jmp 0x609c
movq %rax, %r14
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x609c
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x60c1
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x60e6
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x61cd
movq 0x178(%rsp), %rsi
jmp 0x61be
jmp 0x61ca
jmp 0x61ca
jmp 0x61ca
jmp 0x61ca
movq %rax, %r14
movq 0x248(%rsp), %rdi
leaq 0x258(%rsp), %rax
cmpq %rax, %rdi
je 0x614d
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x614d
movq %rax, %r14
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0x6177
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x6177
movq %rax, %r14
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x61a1
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x61a1
movq %rax, %r14
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x61cd
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x61cd
jmp 0x61ca
movq %rax, %r14
movq 0x2c8(%rsp), %rdi
leaq 0x2d8(%rsp), %rax
cmpq %rax, %rdi
je 0x61f2
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6217
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x2e8(%rsp), %rdi
leaq 0x2f8(%rsp), %rax
cmpq %rax, %rdi
je 0x623c
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x490(%rsp), %rdi
callq 0x40c0
leaq 0x40(%rsp), %rdi
callq 0x6420
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6278
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x629d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x62c2
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x62e7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x70(%rsp), %rdi
callq 0x6420
movq %r14, %rdi
callq 0x4550
nop