// File: /workspace/github_cpp_makefile_star2_O1/atfrank[P]PCASA/lib/Trajectory.cpp
// Function: Trajectory::readFrame(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int)
bool Trajectory::readFrame(std::ifstream &trjin, unsigned int frame){
  double *dbuffer; //Needed for crystal!
  float *xbuffer;
  float *ybuffer;
  float *zbuffer;
  int length;
  int i;
  unsigned int j;
  unsigned int maxSeekFrame;

  if (this->getFrameSize() == 0){
    this->setFrameSize((this->getNAtom()*sizeof(float)+sizeof(int)*2)*3);
    if (qcrystal > 0){
      this->setFrameSize(this->getFrameSize()+sizeof(double)*6+2*sizeof(int));
    }
  }

  maxSeekFrame=(std::numeric_limits<int>::max()/this->getFrameSize())-10; //10 buffer

  //Assume header has been read
  //Seek frames
  if (frame-this->getLastFrame() > maxSeekFrame){
    //Seek frame by frame to be safe
    for (j=0; j< frame-this->getLastFrame(); j++){
      trjin.seekg(this->getFrameSize(), std::ios::cur);
    }
  }
  else{
    trjin.seekg((frame-this->getLastFrame())*this->getFrameSize(), std::ios::cur);
  }
  this->setLastFrame(frame+1); 
  //The "+1" positions the pointer at the end of this frame after it has been read


  if (trjin.tellg() == this->getLastPos()){
    //End-of-file, note that trjin.good()/trjin.eof() wouldn't work!
    return false;
  }

  this->iframe++;
  if (this->getShow() == true || this->getScan() == true){
    std::cout << std::fixed;
    std::cout << "Frame : " << this->iframe << " ( " << frame+1 << " / " << getNFrame() << " ) " << std::endl; 
  }

  dbuffer=NULL;
  xbuffer=NULL;
  ybuffer=NULL;
  zbuffer=NULL;

  if (qcrystal > 0){
    dbuffer=readFortran(trjin, dbuffer, length);

    if (this->getScan() == false){ //
      pb.resize(6);
      for (j=0; j< pb.size(); j++){
        pb.at(j)=dbuffer[j];
      }

      //Box dimensions
      pbx=sqrt(pb.at(0)*pb.at(0)+pb.at(1)*pb.at(1)+pb.at(3)*pb.at(3));
      pby=sqrt(pb.at(1)*pb.at(1)+pb.at(2)*pb.at(2)+pb.at(4)*pb.at(4));
      pbz=sqrt(pb.at(3)*pb.at(3)+pb.at(4)*pb.at(4)+pb.at(5)*pb.at(5));

      //Box angles
      pbalpha=acos(pb.at(4)*(pb.at(2)+pb.at(5))+pb.at(1)*pb.at(3)/(pby*pbz))*180.0/PI;
      pbbeta=acos(pb.at(3)*(pb.at(0)+pb.at(5))+pb.at(1)*pb.at(4)/(pbz*pbx))*180.0/PI;
      pbgamma=acos(pb.at(1)*(pb.at(0)+pb.at(2))+pb.at(3)*pb.at(4)/(pbx*pby))*180.0/PI;

      if (this->getShow() == true){ 
        std::cout << "Periodic Box :  ";
        std::cout << pbx << " x " << pby << " x " << pbz << " ";
        std::cout << "( " << pbalpha << " x " << pbbeta << " x " << pbgamma << " )" << std::endl;
      }
    }

    if (dbuffer != NULL){
      delete dbuffer;
    }
  }

  //Coordinates
  xbuffer=readFortran(trjin, xbuffer, length);
  ybuffer=readFortran(trjin, ybuffer, length);
  zbuffer=readFortran(trjin, zbuffer, length);

  if (this->getScan() == false){
    if (x.size() == 0 || y.size() == 0 || z.size() == 0){
      x.resize(natom);
      y.resize(natom);
      z.resize(natom);
    }
    if (natom != static_cast<int>(x.size()) || 
      natom != static_cast<int>(y.size()) || 
      natom != static_cast<int>(z.size())){
        std::cerr << "Error: The number of atoms \"natom\" does not match the number of atoms in each frame" << std::endl;
    }

    if (nfixed > 0){
      for (i=0; i< nfixed; i++){
        //Do something
      }
      std::cerr << "Warning: Fixed atoms has yet to be implemented"<< std::endl;
    }
    else{
      if (mol != NULL && length/sizeof(float) != mol->getNAtom()){
        std::cerr << "Error: The natom mismatch!" << std::endl;
      }
      for (i=0; i< natom; i++){
        if (mol == NULL){
          x.at(i)=xbuffer[i];
          y.at(i)=ybuffer[i];
          z.at(i)=zbuffer[i];
        }
        else{
          mol->getAtom(i)->setCoor(Coor(static_cast<double>(xbuffer[i]), static_cast<double>(ybuffer[i]), static_cast<double>(zbuffer[i])));
        }
  
        if (this->getShow() == true){
          std::cout << std::fixed;
          std::cout << "coor" << std::setw(10) << std::right << i+1;
          std::cout << std::setw(14) << xbuffer[i] << " ";
          std::cout << std::setw(14) << ybuffer[i] << " ";
          std::cout << std::setw(14) << zbuffer[i] << std::endl;
        } 
      }
    }
  }

  if (xbuffer != NULL){
    delete xbuffer;
  }
  if (ybuffer != NULL){
    delete ybuffer;
  }
  if (zbuffer != NULL){
    delete zbuffer;
  }

  return true; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x3c(%rdi)
jne 0x38b98
movl 0xc8(%rbx), %eax
shll $0x2, %eax
leal (%rax,%rax,2), %ecx
addl $0x18, %ecx
movl %ecx, 0x3c(%rbx)
cmpl $0x0, 0x9c(%rbx)
jle 0x38b98
leal (%rax,%rax,2), %eax
addl $0x50, %eax
movl %eax, 0x3c(%rbx)
movl 0x3c(%rbx), %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
addl $-0xa, %eax
movl %ebp, %esi
subl 0x40(%rbx), %esi
cmpl %eax, %esi
jbe 0x38bd7
cmpl %ebp, 0x40(%rbx)
je 0x38be7
xorl %r14d, %r14d
movl 0x3c(%rbx), %esi
movq %r15, %rdi
movl $0x1, %edx
callq 0x43e0
incl %r14d
movl %ebp, %eax
subl 0x40(%rbx), %eax
cmpl %eax, %r14d
jb 0x38bb8
jmp 0x38be7
imull %ecx, %esi
movq %r15, %rdi
movl $0x1, %edx
callq 0x43e0
incl %ebp
movl %ebp, 0x40(%rbx)
movq %r15, %rdi
callq 0x4510
movq %rax, %r14
movq 0x48(%rbx), %r12
cmpq %r12, %rax
je 0x395dc
movq %r12, 0x30(%rsp)
movq %r14, 0x38(%rsp)
incl 0x34(%rbx)
cmpb $0x0, 0x30(%rbx)
jne 0x38c21
cmpb $0x1, 0x31(%rbx)
jne 0x38ce1
movq 0x3b83a0(%rip), %r14    # 0x3f0fc8
movq (%r14), %rax
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%r14,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%r14,%rax)
leaq 0x5515(%rip), %rsi      # 0x3e15d
movl $0x8, %edx
movq %r14, %rdi
callq 0x4340
movl 0x34(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x54fc(%rip), %rsi      # 0x3e166
movl $0x3, %edx
movq %rax, %rdi
callq 0x4340
movl %ebp, %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x54df(%rip), %rsi      # 0x3e16a
movl $0x3, %edx
movq %rax, %rdi
callq 0x4340
movl 0x78(%rbx), %esi
movq %r14, %rdi
callq 0x4500
movq %rax, %r14
leaq 0x54c1(%rip), %rsi      # 0x3e16e
movl $0x3, %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
cmpl $0x0, 0x9c(%rbx)
jle 0x39163
leaq 0x1c(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x39d2e
movq %rax, %r12
cmpb $0x0, 0x31(%rbx)
jne 0x39151
leaq 0xe8(%rbx), %rdi
movl $0x6, %esi
callq 0x125b6
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0x38d52
xorl %esi, %esi
movsd (%r12,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
movl %esi, %edi
cmpq %rdi, %rdx
ja 0x38d3d
cmpq %rax, %rcx
je 0x39643
cmpq $0x1, %rdx
jbe 0x39619
cmpq $0x3, %rdx
jbe 0x395fd
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x18(%rax), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38da1
sqrtsd %xmm0, %xmm0
jmp 0x38da6
callq 0x4260
movsd %xmm0, 0x100(%rbx)
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x39619
cmpq $0x10, %rcx
je 0x39635
cmpq $0x4, %rdx
jbe 0x3960b
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x20(%rax), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38e17
sqrtsd %xmm0, %xmm0
jmp 0x38e1c
callq 0x4260
movsd %xmm0, 0x108(%rbx)
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0x395fd
cmpq $0x20, %rcx
je 0x3960b
cmpq $0x5, %rdx
jbe 0x39627
movsd 0x18(%rax), %xmm1
movsd 0x20(%rax), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x28(%rax), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38e8d
sqrtsd %xmm0, %xmm0
jmp 0x38e92
callq 0x4260
movsd %xmm0, 0x110(%rbx)
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x4, %rdx
jbe 0x3960b
cmpq $0x28, %rcx
je 0x39627
movsd 0x8(%rax), %xmm2
movsd 0x10(%rax), %xmm1
addsd 0x28(%rax), %xmm1
mulsd 0x18(%rax), %xmm2
mulsd 0x108(%rbx), %xmm0
divsd %xmm0, %xmm2
mulsd 0x20(%rax), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x4290
mulsd 0x3548(%rip), %xmm0     # 0x3c448
divsd 0x3b8430(%rip), %xmm0   # 0x3f1338
movsd %xmm0, 0x118(%rbx)
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x3, %rdx
jbe 0x395fd
cmpq $0x5, %rdx
jbe 0x39627
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
addsd 0x28(%rax), %xmm0
mulsd 0x20(%rax), %xmm1
movsd 0x110(%rbx), %xmm2
mulsd 0x100(%rbx), %xmm2
divsd %xmm2, %xmm1
mulsd 0x18(%rax), %xmm0
addsd %xmm1, %xmm0
callq 0x4290
mulsd 0x34d2(%rip), %xmm0     # 0x3c448
divsd 0x3b83ba(%rip), %xmm0   # 0x3f1338
movsd %xmm0, 0x120(%rbx)
movq 0xe8(%rbx), %rax
movq 0xf0(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x39619
cmpq $0x10, %rcx
je 0x39635
cmpq $0x3, %rdx
jbe 0x395fd
cmpq $0x20, %rcx
je 0x3960b
movsd (%rax), %xmm0
addsd 0x10(%rax), %xmm0
movsd 0x18(%rax), %xmm1
mulsd 0x20(%rax), %xmm1
movsd 0x100(%rbx), %xmm2
mulsd 0x108(%rbx), %xmm2
divsd %xmm2, %xmm1
mulsd 0x8(%rax), %xmm0
addsd %xmm1, %xmm0
callq 0x4290
mulsd 0x3445(%rip), %xmm0     # 0x3c448
divsd 0x3b832d(%rip), %xmm0   # 0x3f1338
movsd %xmm0, 0x128(%rbx)
cmpb $0x1, 0x30(%rbx)
jne 0x39151
movq 0x3b7fa4(%rip), %r13    # 0x3f0fc8
leaq 0x5147(%rip), %rsi      # 0x3e172
movl $0x10, %edx
movq %r13, %rdi
callq 0x4340
movsd 0x100(%rbx), %xmm0
movq %r13, %rdi
callq 0x44a0
movq %rax, %rbp
leaq 0x5131(%rip), %r14      # 0x3e183
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
movsd 0x108(%rbx), %xmm0
movq %rbp, %rdi
callq 0x44a0
movq %rax, %rbp
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
movsd 0x110(%rbx), %xmm0
movq %rbp, %rdi
callq 0x44a0
leaq 0x4604(%rip), %rsi      # 0x3d6a0
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x50b7(%rip), %rsi      # 0x3e167
movl $0x2, %edx
movq %r13, %rdi
callq 0x4340
movsd 0x118(%rbx), %xmm0
movq %r13, %rdi
callq 0x44a0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
movsd 0x120(%rbx), %xmm0
movq %r13, %rdi
callq 0x44a0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
movsd 0x128(%rbx), %xmm0
movq %r13, %rdi
callq 0x44a0
movq %rax, %r14
leaq 0x4278(%rip), %rsi      # 0x3d395
movl $0x2, %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
testq %r12, %r12
je 0x39163
movl $0x8, %esi
movq %r12, %rdi
callq 0x42e0
leaq 0x1c(%rsp), %r14
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x39dd8
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x39dd8
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x39dd8
movq %rax, 0x20(%rsp)
cmpb $0x0, 0x31(%rbx)
jne 0x39590
movq 0x138(%rbx), %rax
cmpq 0x130(%rbx), %rax
je 0x391e1
movq 0x150(%rbx), %rax
cmpq 0x148(%rbx), %rax
je 0x391e1
movq 0x168(%rbx), %rax
cmpq 0x160(%rbx), %rax
jne 0x3921a
leaq 0x130(%rbx), %rdi
movslq 0xc8(%rbx), %rsi
callq 0x3a066
leaq 0x148(%rbx), %rdi
movslq 0xc8(%rbx), %rsi
callq 0x3a066
leaq 0x160(%rbx), %rdi
movslq 0xc8(%rbx), %rsi
callq 0x3a066
movl 0xc8(%rbx), %eax
movq 0x138(%rbx), %rcx
subq 0x130(%rbx), %rcx
shrq $0x2, %rcx
cmpl %ecx, %eax
jne 0x39262
movq 0x150(%rbx), %rcx
subq 0x148(%rbx), %rcx
shrq $0x2, %rcx
cmpl %ecx, %eax
jne 0x39262
movq 0x168(%rbx), %rcx
subq 0x160(%rbx), %rcx
shrq $0x2, %rcx
cmpl %ecx, %eax
je 0x392a4
movq 0x3b7d87(%rip), %r14    # 0x3f0ff0
leaq 0x4f17(%rip), %rsi      # 0x3e187
movl $0x53, %edx
movq %r14, %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
cmpl $0x0, 0x94(%rbx)
jle 0x392f4
movq 0x3b7d3c(%rip), %rbx    # 0x3f0ff0
leaq 0x4d7e(%rip), %rsi      # 0x3e039
movl $0x2e, %edx
movq %rbx, %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
jmp 0x39590
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x39354
movslq 0x1c(%rsp), %r14
shrq $0x2, %r14
callq 0x2577c
movl %eax, %eax
cmpq %rax, %r14
je 0x39354
movq 0x3b7cd7(%rip), %r14    # 0x3f0ff0
leaq 0x4ebb(%rip), %rsi      # 0x3e1db
movl $0x1a, %edx
movq %r14, %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
cmpl $0x0, 0xc8(%rbx)
jle 0x39590
xorl %ebp, %ebp
movq 0x3b7c5e(%rip), %r14    # 0x3f0fc8
movl $0xe, %r13d
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x393ce
movl %ebp, 0x2c(%rsp)
leaq 0x2c(%rsp), %rsi
callq 0x24776
movq %rax, %r15
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbp,4), %xmm0
movq 0x8(%rsp), %rax
xorps %xmm1, %xmm1
cvtss2sd (%rax,%rbp,4), %xmm1
movq 0x20(%rsp), %rax
xorps %xmm2, %xmm2
cvtss2sd (%rax,%rbp,4), %xmm2
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x3a28c
movq %r15, %rdi
movq %r12, %rsi
callq 0x1504e
jmp 0x39455
movq 0x130(%rbx), %rax
movq 0x138(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rbp, %rdx
jbe 0x395f1
movq 0x10(%rsp), %rcx
movss (%rcx,%rbp,4), %xmm0
movss %xmm0, (%rax,%rbp,4)
movq 0x148(%rbx), %rax
movq 0x150(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rbp, %rdx
jbe 0x395f1
movq 0x8(%rsp), %rcx
movss (%rcx,%rbp,4), %xmm0
movss %xmm0, (%rax,%rbp,4)
movq 0x160(%rbx), %rax
movq 0x168(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rbp, %rdx
jbe 0x395f1
movq 0x20(%rsp), %rcx
movss (%rcx,%rbp,4), %xmm0
movss %xmm0, (%rax,%rbp,4)
cmpb $0x1, 0x30(%rbx)
jne 0x3957d
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%r14,%rax)
movl $0x4, %edx
movq %r14, %rdi
leaq 0x4d6d(%rip), %rsi      # 0x3e1f6
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq $0xa, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl %edx, %ecx
orl $0x80, %ecx
movl %ecx, 0x18(%r14,%rax)
leal 0x1(%rbp), %esi
movq %r14, %rdi
callq 0x4500
movq (%r14), %rax
movq -0x18(%rax), %rax
movl $0xe, %ecx
movq %rcx, 0x10(%r14,%rax)
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r14, %rdi
callq 0x44a0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x41a7(%rip), %r12      # 0x3d6a0
movq %r12, %rsi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq 0x8(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r14, %rdi
callq 0x44a0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq 0x20(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r14, %rdi
callq 0x44a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
incq %rbp
movslq 0xc8(%rbx), %rax
cmpq %rax, %rbp
jl 0x39370
cmpq $0x0, 0x10(%rsp)
je 0x395a7
movl $0x4, %esi
movq 0x10(%rsp), %rdi
callq 0x42e0
cmpq $0x0, 0x8(%rsp)
je 0x395be
movl $0x4, %esi
movq 0x8(%rsp), %rdi
callq 0x42e0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
movq 0x38(%rsp), %r14
movq 0x30(%rsp), %r12
je 0x395dc
movl $0x4, %esi
callq 0x42e0
cmpq %r12, %r14
setne %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d31(%rip), %rdi      # 0x3c329
movq %rbp, %rsi
jmp 0x3964c
leaq 0x2d25(%rip), %rdi      # 0x3c329
movl $0x3, %esi
jmp 0x3964c
leaq 0x2d17(%rip), %rdi      # 0x3c329
movl $0x4, %esi
jmp 0x3964c
leaq 0x2d09(%rip), %rdi      # 0x3c329
movl $0x1, %esi
jmp 0x3964c
leaq 0x2cfb(%rip), %rdi      # 0x3c329
movl $0x5, %esi
jmp 0x3964c
leaq 0x2ced(%rip), %rdi      # 0x3c329
movl $0x2, %esi
jmp 0x3964c
leaq 0x2cdf(%rip), %rdi      # 0x3c329
xorl %esi, %esi
xorl %eax, %eax
callq 0x4440
nop