// File: DavidLBruce[P]sim3dof/build/../src/MslTse6.cpp
// Function: MslTse6::FrameUpdate()
void MslTse6::FrameUpdate()
{
  double cth;
  double sth;

  simTime = GetSimTime();

  //
  // Get true states
  //
  tgtPxf = pTgt->pxf;
  tgtPyf = pTgt->pyf;

  tgtVxf = pTgt->vxf;
  tgtVyf = pTgt->vyf;

  tgtAxf = pTgt->axf;
  tgtAyf = pTgt->ayf;

  tgtJxf = pTgt->jxf;
  tgtJyf = pTgt->jyf;

  mslPxf = pMsl->pxf;
  mslPyf = pMsl->pyf;

  mslVxf = pMsl->vxf;
  mslVyf = pMsl->vyf;

  mslAxf = pMsl->axf;
  mslAyf = pMsl->ayf;

  omega = pTgt->omega;

  truRelPxf = tgtPxf - mslPxf;
  truRelPyf = tgtPyf - mslPyf;

  truRelVxf = tgtVxf - mslVxf;
  truRelVyf = tgtVyf - mslVyf;

  truRelAxf = tgtAxf - mslAxf;
  truRelAyf = tgtAyf - mslAyf;

  truRng2 = truRelPxf*truRelPxf + truRelPyf*truRelPyf;

  truRng = sqrt( truRng2 );

  truLosAng = atan2( truRelPyf, truRelPxf );

  truLosr = ( truRelPxf * truRelVyf - truRelPyf * truRelVxf ) / truRng2;

  truRdot = ( truRelVxf * truRelPxf + truRelVyf * truRelPyf ) / truRng;

  cth = cos( truLosAng );
  sth = sin( truLosAng );

  truAccLosX = truRelAxf * cth - truRelAyf * sth;
  truAccLosY = truRelAxf * sth + truRelAyf * cth;

  truState(0) = truLosAng;

  truState(1) = truLosr;

  truState(2) = 1.0 / truRng;

  truState(3) = truRdot * truState(2);

  truState(4) = truAccLosX  * truState(2);

  truState(5) = truAccLosY  * truState(2);

  if ( simTime >= nextUpLinkTime - SMALL )
  {
    //
    // Get the datalink message.
    //
    nextUpLinkTime = simTime + datalinkStep;

    dlTimeStamp = pTse6->timeStamp;
    priorDlTime = dlTimeStamp;

    rdrPxf = pRdr->pxf;
    rdrPyf = pRdr->pyf;
    rdrVxf = pRdr->vxf;
    rdrVyf = pRdr->vyf;
        
    if ( !pTgt->weaveInit )
    {
      //
      // Target is not weaving.  The Fire control TSE6 estimates are good.
      //
      dlAccX = pTse6->estAccX;
      dlAccY = pTse6->estAccY;
      dlLosAng = pTse6->estLosAng;
      dlLosr = pTse6->estLosr;
      dlRng = pTse6->estRng;
      dlRdot = pTse6->estRdot;

      cth = cos( dlLosAng );
      sth = sin( dlLosAng );
      
      dlTgtPxf = rdrPxf + dlRng * cth;
      dlTgtPyf = rdrPyf + dlRng * sth;
      
      dlTgtVxf = rdrVxf + dlRdot * cth - dlRng * dlLosr * sth;
      
      dlTgtVyf = rdrVyf + dlRdot * sth + dlRng * dlLosr * cth;
      
      dlTgtAxf = dlAccX;
      dlTgtAyf = dlAccY;

      dlState(0) = dlTgtPxf;
      dlState(1) = dlTgtPyf;

      dlState(2) = dlTgtVxf;
      dlState(3) = dlTgtVyf;

      dlState(4) = dlTgtAxf;
      dlState(5) = dlTgtAyf;

    }  // end if ( !pTgt->weaveInit )
    else
    {
      dlOmega = pTseO->estOmega;

      dlOmega2 = pTseO->estOmega2;

      dlRng = pTse6->estRng;
      dlRdot = pTse6->estRdot;

      //
      // Small angle approximation
      //
      dlLosAng = pTseO->estPosY / dlRng;

      sth = sin( dlLosAng );
  
      cth = cos( dlLosAng );
      
      dlTgtPxf = rdrPxf + dlRng * cth;
      dlTgtPyf = rdrPyf + dlRng * sth;

      dlPosYdot = pTseO->estPosYdot;

      dlLosr = dlPosYdot / dlRng;
      
      dlTgtVxf = rdrVxf + dlRdot * cth - dlRng * dlLosr * sth;
      
      dlTgtVyf = rdrVyf + dlRdot * sth + dlRng * dlLosr * cth;

      dlTgtAxf = pTse6->cartRel(4);
      dlTgtAyf = -dlTgtPyf * dlOmega2;

      dlTgtJxf = 0.0;

      dlTgtJyf = dlTgtPyf * dlOmega2 * dlOmega;

    }  // end if ( !pTgt->weaveInit )
  }  // end if ( simTime >= nextUpLinkTime - SMALL )

//  if ( pSkr->timeStamp > dlTimeStamp )
  if ( pSkr->timeStamp != dlTimeStamp )
  {
    //
    // Propagate the datalink states up to the seeker time stamp
    //
    dlState(0) = dlTgtPxf;
    dlState(1) = dlTgtPyf;
                             
    dlState(2) = dlTgtVxf;
    dlState(3) = dlTgtVyf;
                             
    dlState(4) = dlTgtAxf;
    dlState(5) = dlTgtAyf;

    IntegrateRK2( dlState, pSkr->timeStamp - priorDlTime );
    priorDlTime = pSkr->timeStamp;

    dlTgtPxf = dlState(0);
    dlTgtPyf = dlState(1);

    dlTgtVxf = dlState(2);
    dlTgtVyf = dlState(3);

    dlTgtAxf = dlState(4);
    dlTgtAyf = dlState(5);

  }  // end if ( simTime >= nextUpLinkTime - SMALL ) else

  measRelPxf = dlTgtPxf - mslPxf;
  measRelPyf = dlTgtPyf - mslPyf;

  measRelVxf = dlTgtVxf - mslVxf;
  measRelVyf = dlTgtVyf - mslVyf;

  measRng2 = measRelPxf*measRelPxf + measRelPyf*measRelPyf;

  measRng = sqrt( measRng2 );

  measRdot = ( measRelVxf * measRelPxf + measRelVyf * measRelPyf ) / measRng;

  //
  // Get the Seeker measurements
  //
  measAng = pSkr->measAng;
  angSig = pSkr->rinAng; 

  //
  // Use the datalink range and range rate as pseudo radar measurements,
  // but use the more accurate seeker angle measurement. Use the Radar
  // range and range rate measurement noise instead of the TSE covariance
  // to compensate for the fact that the TSE output is corelated.
  //
  dlRngSig = pRdr->rinRng;
  dlRdotSig = pRdr->rinRdot;

  rngSig = dlRngSig;

  rDotSig = dlRdotSig;

  measVec(0) = measAng;
  measVec(1) = 1.0 / measRng;
  measVec(2) = measRdot / measRng;

  PropStates( pSkr->timeStamp - timeStamp );

  timeStamp = pSkr->timeStamp;

  UpdateStates();

  estLosAng = mscState(0);
  estLosr = mscState(1);
  estRng = 1.0 / mscState(2);
  estRdot = mscState(3) * estRng;
  estAccX = mscState(4) * estRng;
  estAccY = mscState(5) * estRng;

  estTgtPxf = mslPxf + cartRel(0);
  estTgtPyf = mslPyf + cartRel(1);

  estTgtVxf = mslVxf + cartRel(2);
  estTgtVyf = mslVyf + cartRel(3);

  estTgtAxf = mslAxf + cartRel(4);
  estTgtAyf = mslAyf + cartRel(5);

  estTgtJxf = 0.0;
  estTgtJyf = estTgtPyf * dlOmega2*dlOmega;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x3c40
movq -0x20(%rbp), %rax
movsd %xmm0, 0x4d0(%rax)
movq 0x530(%rax), %rcx
movsd 0x160(%rcx), %xmm0
movsd %xmm0, 0x250(%rax)
movq 0x530(%rax), %rcx
movsd 0x168(%rcx), %xmm0
movsd %xmm0, 0x258(%rax)
movq 0x530(%rax), %rcx
movsd 0x180(%rcx), %xmm0
movsd %xmm0, 0x260(%rax)
movq 0x530(%rax), %rcx
movsd 0x190(%rcx), %xmm0
movsd %xmm0, 0x268(%rax)
movq 0x530(%rax), %rcx
movsd 0x130(%rcx), %xmm0
movsd %xmm0, 0x230(%rax)
movq 0x530(%rax), %rcx
movsd 0x140(%rcx), %xmm0
movsd %xmm0, 0x238(%rax)
movq 0x530(%rax), %rcx
movsd 0x148(%rcx), %xmm0
movsd %xmm0, 0x240(%rax)
movq 0x530(%rax), %rcx
movsd 0x150(%rcx), %xmm0
movsd %xmm0, 0x248(%rax)
movq 0x518(%rax), %rcx
movsd 0x130(%rcx), %xmm0
movsd %xmm0, 0x410(%rax)
movq 0x518(%rax), %rcx
movsd 0x138(%rcx), %xmm0
movsd %xmm0, 0x418(%rax)
movq 0x518(%rax), %rcx
movsd 0x150(%rcx), %xmm0
movsd %xmm0, 0x420(%rax)
movq 0x518(%rax), %rcx
movsd 0x160(%rcx), %xmm0
movsd %xmm0, 0x428(%rax)
movq 0x518(%rax), %rcx
movsd 0x118(%rcx), %xmm0
movsd %xmm0, 0x400(%rax)
movq 0x518(%rax), %rcx
movsd 0x128(%rcx), %xmm0
movsd %xmm0, 0x408(%rax)
movq 0x530(%rax), %rcx
movsd 0x158(%rcx), %xmm0
movsd %xmm0, 0x430(%rax)
movsd 0x250(%rax), %xmm0
subsd 0x410(%rax), %xmm0
movsd %xmm0, 0x4d8(%rax)
movsd 0x258(%rax), %xmm0
subsd 0x418(%rax), %xmm0
movsd %xmm0, 0x4e0(%rax)
movsd 0x260(%rax), %xmm0
subsd 0x420(%rax), %xmm0
movsd %xmm0, 0x4e8(%rax)
movsd 0x268(%rax), %xmm0
subsd 0x428(%rax), %xmm0
movsd %xmm0, 0x4f0(%rax)
movsd 0x230(%rax), %xmm0
subsd 0x400(%rax), %xmm0
movsd %xmm0, 0x4f8(%rax)
movsd 0x238(%rax), %xmm0
subsd 0x408(%rax), %xmm0
movsd %xmm0, 0x500(%rax)
movsd 0x4d8(%rax), %xmm0
movsd 0x4d8(%rax), %xmm2
movsd 0x4e0(%rax), %xmm1
mulsd 0x4e0(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x508(%rax)
movsd 0x508(%rax), %xmm0
callq 0x3190
movq -0x20(%rbp), %rax
movsd %xmm0, 0x1e0(%rax)
movsd 0x4e0(%rax), %xmm0
movsd 0x4d8(%rax), %xmm1
callq 0x3070
movq -0x20(%rbp), %rax
movsd %xmm0, 0x1d0(%rax)
movsd 0x4d8(%rax), %xmm0
movsd 0x4f0(%rax), %xmm2
movsd 0x4e0(%rax), %xmm1
mulsd 0x4e8(%rax), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x508(%rax), %xmm0
movsd %xmm0, 0x1d8(%rax)
movsd 0x4e8(%rax), %xmm0
movsd 0x4d8(%rax), %xmm2
movsd 0x4f0(%rax), %xmm1
mulsd 0x4e0(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x1e0(%rax), %xmm0
movsd %xmm0, 0x1e8(%rax)
movsd 0x1d0(%rax), %xmm0
callq 0x3430
movq -0x20(%rbp), %rax
movsd %xmm0, -0x10(%rbp)
movsd 0x1d0(%rax), %xmm0
callq 0x30a0
movq -0x20(%rbp), %rdi
movsd %xmm0, -0x18(%rbp)
movsd 0x4f8(%rdi), %xmm0
movsd -0x10(%rbp), %xmm2
movsd 0x500(%rdi), %xmm1
mulsd -0x18(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rdi)
movsd 0x4f8(%rdi), %xmm0
movsd -0x18(%rbp), %xmm2
movsd 0x500(%rdi), %xmm1
mulsd -0x10(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c8(%rdi)
movsd 0x1d0(%rdi), %xmm0
movsd %xmm0, -0x68(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
xorl %esi, %esi
callq 0x1fd40
movsd -0x68(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x1d8(%rdi), %xmm0
movsd %xmm0, -0x60(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x1, %esi
callq 0x1fd40
movsd -0x60(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x11554(%rip), %xmm0    # 0x24008
divsd 0x1e0(%rdi), %xmm0
movsd %xmm0, -0x58(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x2, %esi
callq 0x1fd40
movsd -0x58(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x1e8(%rdi), %xmm0
movsd %xmm0, -0x50(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x2, %esi
callq 0x1fd40
movsd -0x50(%rbp), %xmm0
movq -0x20(%rbp), %rdi
mulsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x3, %esi
callq 0x1fd40
movsd -0x48(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x1c0(%rdi), %xmm0
movsd %xmm0, -0x40(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x2, %esi
callq 0x1fd40
movsd -0x40(%rbp), %xmm0
movq -0x20(%rbp), %rdi
mulsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x4, %esi
callq 0x1fd40
movsd -0x38(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x1c8(%rdi), %xmm0
movsd %xmm0, -0x30(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x2, %esi
callq 0x1fd40
movsd -0x30(%rbp), %xmm0
movq -0x20(%rbp), %rdi
mulsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
addq $0x1f0, %rdi            # imm = 0x1F0
movl $0x5, %esi
callq 0x1fd40
movsd -0x28(%rbp), %xmm0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movsd %xmm0, (%rcx)
movsd 0x4d0(%rax), %xmm0
movsd 0x108(%rax), %xmm1
movsd 0x11b2c(%rip), %xmm2    # 0x24710
subsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x131bc
movq -0x20(%rbp), %rax
movsd 0x4d0(%rax), %xmm0
addsd 0x100(%rax), %xmm0
movsd %xmm0, 0x108(%rax)
movq 0x538(%rax), %rcx
movsd 0x158(%rcx), %xmm0
movsd %xmm0, 0x308(%rax)
movsd 0x308(%rax), %xmm0
movsd %xmm0, 0x468(%rax)
movq 0x520(%rax), %rcx
movsd 0x140(%rcx), %xmm0
movsd %xmm0, 0x478(%rax)
movq 0x520(%rax), %rcx
movsd 0x148(%rcx), %xmm0
movsd %xmm0, 0x480(%rax)
movq 0x520(%rax), %rcx
movsd 0x170(%rcx), %xmm0
movsd %xmm0, 0x488(%rax)
movq 0x520(%rax), %rcx
movsd 0x178(%rcx), %xmm0
movsd %xmm0, 0x490(%rax)
movq 0x530(%rax), %rax
testb $0x1, 0x198(%rax)
jne 0x12f76
movq -0x20(%rbp), %rax
movq 0x538(%rax), %rcx
movsd 0x128(%rcx), %xmm0
movsd %xmm0, 0x278(%rax)
movq 0x538(%rax), %rcx
movsd 0x130(%rcx), %xmm0
movsd %xmm0, 0x280(%rax)
movq 0x538(%rax), %rcx
movsd 0x138(%rcx), %xmm0
movsd %xmm0, 0x288(%rax)
movq 0x538(%rax), %rcx
movsd 0x140(%rcx), %xmm0
movsd %xmm0, 0x290(%rax)
movq 0x538(%rax), %rcx
movsd 0x148(%rcx), %xmm0
movsd %xmm0, 0x2a8(%rax)
movq 0x538(%rax), %rcx
movsd 0x150(%rcx), %xmm0
movsd %xmm0, 0x298(%rax)
movsd 0x288(%rax), %xmm0
callq 0x3430
movq -0x20(%rbp), %rax
movsd %xmm0, -0x10(%rbp)
movsd 0x288(%rax), %xmm0
callq 0x30a0
movq -0x20(%rbp), %rdi
movsd %xmm0, -0x18(%rbp)
movsd 0x478(%rdi), %xmm1
movsd 0x2a8(%rdi), %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2e8(%rdi)
movsd 0x480(%rdi), %xmm1
movsd 0x2a8(%rdi), %xmm0
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2f0(%rdi)
movsd 0x488(%rdi), %xmm0
movsd 0x298(%rdi), %xmm1
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x2a8(%rdi), %xmm0
mulsd 0x290(%rdi), %xmm0
movsd -0x18(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2f8(%rdi)
movsd 0x490(%rdi), %xmm0
movsd 0x298(%rdi), %xmm1
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x2a8(%rdi), %xmm0
mulsd 0x290(%rdi), %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x300(%rdi)
movsd 0x278(%rdi), %xmm0
movsd %xmm0, 0x2d8(%rdi)
movsd 0x280(%rdi), %xmm0
movsd %xmm0, 0x2e0(%rdi)
movsd 0x2e8(%rdi), %xmm0
movsd %xmm0, -0x98(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
xorl %esi, %esi
callq 0x1fd40
movsd -0x98(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2f0(%rdi), %xmm0
movsd %xmm0, -0x90(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x1, %esi
callq 0x1fd40
movsd -0x90(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2f8(%rdi), %xmm0
movsd %xmm0, -0x88(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x2, %esi
callq 0x1fd40
movsd -0x88(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x300(%rdi), %xmm0
movsd %xmm0, -0x80(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x3, %esi
callq 0x1fd40
movsd -0x80(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2d8(%rdi), %xmm0
movsd %xmm0, -0x78(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x4, %esi
callq 0x1fd40
movsd -0x78(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2e0(%rdi), %xmm0
movsd %xmm0, -0x70(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x5, %esi
callq 0x1fd40
movsd -0x70(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x131ba
movq -0x20(%rbp), %rax
movq 0x540(%rax), %rcx
movsd 0x148(%rcx), %xmm0
movsd %xmm0, 0x208(%rax)
movq 0x540(%rax), %rcx
movsd 0x150(%rcx), %xmm0
movsd %xmm0, 0x210(%rax)
movq 0x538(%rax), %rcx
movsd 0x148(%rcx), %xmm0
movsd %xmm0, 0x2a8(%rax)
movq 0x538(%rax), %rcx
movsd 0x150(%rcx), %xmm0
movsd %xmm0, 0x298(%rax)
movq 0x540(%rax), %rcx
movsd 0x138(%rcx), %xmm0
divsd 0x2a8(%rax), %xmm0
movsd %xmm0, 0x288(%rax)
movsd 0x288(%rax), %xmm0
callq 0x30a0
movq -0x20(%rbp), %rax
movsd %xmm0, -0x18(%rbp)
movsd 0x288(%rax), %xmm0
callq 0x3430
movq -0x20(%rbp), %rax
movsd %xmm0, -0x10(%rbp)
movsd 0x478(%rax), %xmm1
movsd 0x2a8(%rax), %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2e8(%rax)
movsd 0x480(%rax), %xmm1
movsd 0x2a8(%rax), %xmm0
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2f0(%rax)
movq 0x540(%rax), %rcx
movsd 0x140(%rcx), %xmm0
movsd %xmm0, 0x218(%rax)
movsd 0x218(%rax), %xmm0
divsd 0x2a8(%rax), %xmm0
movsd %xmm0, 0x290(%rax)
movsd 0x488(%rax), %xmm0
movsd 0x298(%rax), %xmm1
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x2a8(%rax), %xmm0
mulsd 0x290(%rax), %xmm0
movsd -0x18(%rbp), %xmm2
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2f8(%rax)
movsd 0x490(%rax), %xmm0
movsd 0x298(%rax), %xmm1
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x2a8(%rax), %xmm0
mulsd 0x290(%rax), %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x300(%rax)
movq 0x538(%rax), %rdi
addq $0x110, %rdi            # imm = 0x110
movl $0x4, %esi
callq 0x1fd40
movq %rax, %rcx
movq -0x20(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x2d8(%rax)
movsd 0x2f0(%rax), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd 0x210(%rax), %xmm0
movsd %xmm0, 0x2e0(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x220(%rax)
movsd 0x2f0(%rax), %xmm0
mulsd 0x210(%rax), %xmm0
mulsd 0x208(%rax), %xmm0
movsd %xmm0, 0x228(%rax)
jmp 0x131bc
movq -0x20(%rbp), %rax
movq 0x528(%rax), %rcx
movsd 0x128(%rcx), %xmm0
ucomisd 0x308(%rax), %xmm0
jne 0x131e0
jp 0x131e0
jmp 0x1340e
movq -0x20(%rbp), %rdi
movsd 0x2e8(%rdi), %xmm0
movsd %xmm0, -0xc8(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
xorl %esi, %esi
callq 0x1fd40
movsd -0xc8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2f0(%rdi), %xmm0
movsd %xmm0, -0xc0(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x1, %esi
callq 0x1fd40
movsd -0xc0(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2f8(%rdi), %xmm0
movsd %xmm0, -0xb8(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x2, %esi
callq 0x1fd40
movsd -0xb8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x300(%rdi), %xmm0
movsd %xmm0, -0xb0(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x3, %esi
callq 0x1fd40
movsd -0xb0(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2d8(%rdi), %xmm0
movsd %xmm0, -0xa8(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x4, %esi
callq 0x1fd40
movsd -0xa8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x2e0(%rdi), %xmm0
movsd %xmm0, -0xa0(%rbp)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x5, %esi
callq 0x1fd40
movsd -0xa0(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movq %rdi, %rsi
addq $0x2c0, %rsi            # imm = 0x2C0
movq 0x528(%rdi), %rax
movsd 0x128(%rax), %xmm0
subsd 0x468(%rdi), %xmm0
callq 0x138c0
movq -0x20(%rbp), %rdi
movq 0x528(%rdi), %rax
movsd 0x128(%rax), %xmm0
movsd %xmm0, 0x468(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
xorl %esi, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x2e8(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x1, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x2f0(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x2, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x2f8(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x3, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x300(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x4, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x2d8(%rdi)
addq $0x2c0, %rdi            # imm = 0x2C0
movl $0x5, %esi
callq 0x1fd40
movq %rax, %rcx
movq -0x20(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x2e0(%rax)
movq -0x20(%rbp), %rax
movsd 0x2e8(%rax), %xmm0
subsd 0x410(%rax), %xmm0
movsd %xmm0, 0x3a0(%rax)
movsd 0x2f0(%rax), %xmm0
subsd 0x418(%rax), %xmm0
movsd %xmm0, 0x3a8(%rax)
movsd 0x2f8(%rax), %xmm0
subsd 0x420(%rax), %xmm0
movsd %xmm0, 0x3b0(%rax)
movsd 0x300(%rax), %xmm0
subsd 0x428(%rax), %xmm0
movsd %xmm0, 0x3b8(%rax)
movsd 0x3a0(%rax), %xmm0
movsd 0x3a0(%rax), %xmm2
movsd 0x3a8(%rax), %xmm1
mulsd 0x3a8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3c8(%rax)
movsd 0x3c8(%rax), %xmm0
callq 0x3190
movq -0x20(%rbp), %rdi
movsd %xmm0, 0x3c0(%rdi)
movsd 0x3b0(%rdi), %xmm0
movsd 0x3a0(%rdi), %xmm2
movsd 0x3b8(%rdi), %xmm1
mulsd 0x3a8(%rdi), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x3c0(%rdi), %xmm0
movsd %xmm0, 0x398(%rdi)
movq 0x528(%rdi), %rax
movsd 0x118(%rax), %xmm0
movsd %xmm0, 0x390(%rdi)
movq 0x528(%rdi), %rax
movsd 0x110(%rax), %xmm0
movsd %xmm0, 0x270(%rdi)
movq 0x520(%rdi), %rax
movsd 0x120(%rax), %xmm0
movsd %xmm0, 0x2b8(%rdi)
movq 0x520(%rdi), %rax
movsd 0x118(%rax), %xmm0
movsd %xmm0, 0x2a0(%rdi)
movsd 0x2b8(%rdi), %xmm0
movsd %xmm0, 0x4b0(%rdi)
movsd 0x2a0(%rdi), %xmm0
movsd %xmm0, 0x470(%rdi)
movsd 0x390(%rdi), %xmm0
movsd %xmm0, -0x110(%rbp)
addq $0x3d0, %rdi            # imm = 0x3D0
xorl %esi, %esi
callq 0x1fd40
movsd -0x110(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x10a63(%rip), %xmm0    # 0x24008
divsd 0x3c0(%rdi), %xmm0
movsd %xmm0, -0x108(%rbp)
addq $0x3d0, %rdi            # imm = 0x3D0
movl $0x1, %esi
callq 0x1fd40
movsd -0x108(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x398(%rdi), %xmm0
divsd 0x3c0(%rdi), %xmm0
movsd %xmm0, -0x100(%rbp)
addq $0x3d0, %rdi            # imm = 0x3D0
movl $0x2, %esi
callq 0x1fd40
movsd -0x100(%rbp), %xmm0
movq -0x20(%rbp), %rdi
movsd %xmm0, (%rax)
movq 0x528(%rdi), %rax
movsd 0x128(%rax), %xmm0
subsd 0x1a8(%rdi), %xmm0
callq 0x13d60
movq -0x20(%rbp), %rdi
movq 0x528(%rdi), %rax
movsd 0x128(%rax), %xmm0
movsd %xmm0, 0x1a8(%rdi)
callq 0x149b0
movq -0x20(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
xorl %esi, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x148(%rdi)
addq $0x3e8, %rdi            # imm = 0x3E8
movl $0x1, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x150(%rdi)
addq $0x3e8, %rdi            # imm = 0x3E8
movl $0x2, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd 0x1095d(%rip), %xmm0    # 0x24008
divsd (%rax), %xmm0
movsd %xmm0, 0x158(%rdi)
addq $0x3e8, %rdi            # imm = 0x3E8
movl $0x3, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
mulsd 0x158(%rdi), %xmm0
movsd %xmm0, 0x160(%rdi)
addq $0x3e8, %rdi            # imm = 0x3E8
movl $0x4, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
mulsd 0x158(%rdi), %xmm0
movsd %xmm0, 0x138(%rdi)
addq $0x3e8, %rdi            # imm = 0x3E8
movl $0x5, %esi
callq 0x1fd40
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
mulsd 0x158(%rdi), %xmm0
movsd %xmm0, 0x140(%rdi)
movsd 0x410(%rdi), %xmm0
movsd %xmm0, -0xf8(%rbp)
addq $0x120, %rdi            # imm = 0x120
xorl %esi, %esi
callq 0x1fd40
movsd -0xf8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, 0x168(%rdi)
movsd 0x418(%rdi), %xmm0
movsd %xmm0, -0xf0(%rbp)
addq $0x120, %rdi            # imm = 0x120
movl $0x1, %esi
callq 0x1fd40
movsd -0xf0(%rbp), %xmm0
movq -0x20(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, 0x170(%rdi)
movsd 0x420(%rdi), %xmm0
movsd %xmm0, -0xe8(%rbp)
addq $0x120, %rdi            # imm = 0x120
movl $0x2, %esi
callq 0x1fd40
movsd -0xe8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, 0x178(%rdi)
movsd 0x428(%rdi), %xmm0
movsd %xmm0, -0xe0(%rbp)
addq $0x120, %rdi            # imm = 0x120
movl $0x3, %esi
callq 0x1fd40
movsd -0xe0(%rbp), %xmm0
movq -0x20(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, 0x180(%rdi)
movsd 0x400(%rdi), %xmm0
movsd %xmm0, -0xd8(%rbp)
addq $0x120, %rdi            # imm = 0x120
movl $0x4, %esi
callq 0x1fd40
movsd -0xd8(%rbp), %xmm0
movq -0x20(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, 0x188(%rdi)
movsd 0x408(%rdi), %xmm0
movsd %xmm0, -0xd0(%rbp)
addq $0x120, %rdi            # imm = 0x120
movl $0x5, %esi
callq 0x1fd40
movsd -0xd0(%rbp), %xmm0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addsd (%rcx), %xmm0
movsd %xmm0, 0x190(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x198(%rax)
movsd 0x170(%rax), %xmm0
mulsd 0x210(%rax), %xmm0
mulsd 0x208(%rax), %xmm0
movsd %xmm0, 0x1a0(%rax)
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)