// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::UpdateBallInfo()
void WorldStateUpdater::UpdateBallInfo() {
  //更新别人是否可踢.
  UpdateOtherKick();

  //更新位置
  //计算公式见USTC_Material 第七章
  //公式：ballPos = playerPos + polar2vector(ballDist , neckGlobalAngle +
  //ballAngle)
  if (mpObserver->Ball().GetDist().time() == mpObserver->LatestSightTime()) {
    double dist =
        PlayerParam::instance().ConvertSightDist(mpObserver->Ball().Dist());

    if (mpObserver->GetPlayMode() == PM_Opp_Kick_In ||
        mpObserver->GetPlayMode() == PM_Opp_Corner_Kick ||
        mpObserver->GetPlayMode() == PM_Opp_Free_Kick ||
        mpObserver->GetPlayMode() == PM_Opp_Goalie_Free_Kick ||
        mpObserver->GetPlayMode() == PM_Opp_Offside_Kick ||
        mpObserver->GetPlayMode() == PM_Opp_Free_Kick_Fault_Kick) {
      //对方开球是,己方球员距离球最短为freekickBuffer ,暂时不知道这样做的作用 .
      dist = Max(dist, ServerParam::instance().offsideKickMargin() + FLOAT_EPS);
    }

    //发生碰撞时固定将球与人移开如此距离
    if (mpObserver->Sense().IsCollideWithBall()) {
      dist = GetSelf().GetPlayerSize() + ServerParam::instance().ballSize();
    }
    Vector pos =
        GetSelf().GetPos() +
        Polar2Vector(dist, GetNeckGlobalDirFromSightDelay(mSightDelay) +
                               mpObserver->Ball().Dir());

    //更新eps 球相对误差重要 球近身是不使用, 因为会影响到近身球速计算
    double eps =
        PlayerParam::instance().GetEpsInSight(mpObserver->Ball().Dist());
    eps = calcEps(dist, dist + eps, 0.1) + SelfState().GetPosEps();
    if (dist > ServerParam::instance().visibleDistance() * 2 &&
        !(mSightDelay == 0 && mIsOtherKick && !mIsHearBallPos)) {
      if (mSightDelay == 0 && eps > Ball().GetPosEps() &&
          pos.Dist(Ball().GetPos()) < Ball().GetPosEps()) {
        eps = Ball().GetPosEps();
        pos = Ball().GetPos();
      } else if (mSightDelay == 0 && eps > Ball().GetPosEps() &&
                 pos.Dist(Ball().GetPos()) >= Ball().GetPosEps() &&
                 !mIsOtherKick) {
        if (!mpWorldState->IsBallDropped() &&
            mpWorldState->GetPlayMode() == PM_Play_On &&
            mpWorldState->GetHistory(1)->GetBall().GetPosDelay() == 0) {
          /*
                  char filename[25] = {0};
                  sprintf(filename , "ballinfo_%d.txt" , mSelfUnum);

                  std::ofstream file(filename , std::ios::app);
                  file << mpWorldState->CurrentTime().T() << "\t" <<
             mpWorldState->CurrentTime().S() << "\t" << pos.X() << "\t" <<
             pos.Y();*/

          Vector normal = (pos - Ball().GetPos()).Normalize();
          pos = Ball().GetPos() + normal * Ball().GetPosEps();
          //	file << "\t" << pos.X() << "\t" << pos.Y() << std::endl;
          //	file.close();
        }
      }

      else if (mSightDelay == 0 && eps == Ball().GetPosEps() &&
               pos.Dist(Ball().GetPos()) < eps) {
        pos = (pos + Ball().GetPos()) / 2;
      }
    }

    // limited to field 仅当位于3米以外，否则球的相对位置不准
    if (dist > ServerParam::instance().visibleDistance()) {
      pos = LimitToField(pos);
    }

    Ball().UpdatePosEps(eps);
    Ball().UpdatePos(pos, mSightDelay, mBallConf);
    Ball().UpdateGuessedTimes(0);
  }

  //更新速度
  if (mpObserver->Ball().GetDistChg().time() == mpObserver->LatestSightTime()) {
    //公式：relPos = polar2vector(1.0, ballAngle)
    Vector relPos = Polar2Vector(1.0, mpObserver->Ball().Dir());

    double distChg = mpObserver->Ball().DistChg();
    double dirChg = mpObserver->Ball().DirChg();
    double ballDist = mpObserver->Ball().Dist();

    ballDist = Max(ballDist, FLOAT_EPS);

    //公式：relVel = (distChg * relPos.x() - (dirChg * PI / 180 * ballDist *
    //relPos.y()),distChg * rpos.y() + (dirChg * PI / 180 * ballDist *
    //relPos.x())
    Vector relVel = Vector(
        distChg * relPos.X() - (dirChg * M_PI / 180 * ballDist * relPos.Y()),
        distChg * relPos.Y() + (dirChg * M_PI / 180 * ballDist * relPos.X()));

    relVel = GetSelfVelFromSightDelay(mSightDelay) +
             relVel.Rotate(GetNeckGlobalDirFromSightDelay(mSightDelay));

    // compute vel eps;
    double eps =
        PlayerParam::instance().GetEpsInSight(mpObserver->Ball().Dist());
    Vector mod =
        Vector(0.02 * ballDist + fabs(distChg) / ballDist * eps + 0.02 * eps,
               0.1 * M_PI / 180 * ballDist + fabs(dirChg) * M_PI / 180 * eps +
                   eps * 0.1 * M_PI / 180);
    eps = mod.Mod();

    if ((!(mSightDelay == 0 && mIsOtherKick)) &&
        Ball().GetVelConf() > 0.9499) // 0.95
    {
      Vector vel_estimate = Ball().GetVel();

      if (fabs(relVel.Mod() - vel_estimate.Mod()) <=
              ServerParam::instance().ballRand() * relVel.Mod() /
                  ServerParam::instance().ballDecay() &&
          fabs(relVel.Dir() - vel_estimate.Dir()) < 1) {
        relVel = (relVel + vel_estimate) / 2;
      }
    }
    //公式：ballVel = playerVel() + relVel.rotate(neckGlobalAngle)
    // Ball().UpdateVel(GetSelf().GetVel() +
    // relVel.Rotate(GetSelf().GetNeckGlobalDir()));
    //
    if (!(mSightDelay == 0 && mIsOtherKick && !mIsHearBallVel)) {
      if (mSightDelay == 0 && Ball().GetVelEps() <= 0.32 &&
          eps > Ball().GetVelEps() &&
          (relVel.Dist(Ball().GetVel()) < Ball().GetVelEps())) {
        /*
                char filename[25] = {0};
                sprintf(filename , "ballinfo_%d.txt" , mSelfUnum);

                std::ofstream file(filename , std::ios::app);
                file << mpWorldState->CurrentTime().T() << "\t" <<
           mpWorldState->CurrentTime().S() << "\t" << relVel.X() << "\t" <<
           relVel.Y() << "\t" << Ball().GetVel().X() << "\t" <<
           Ball().GetVel().Y() << std::endl;

                file.close();
                */
        relVel = Ball().GetVel();
        eps = Ball().GetVelEps();
      } else if (mSightDelay == 0 && Ball().GetVelEps() <= 0.32 &&
                 eps == Ball().GetVelEps() &&
                 (relVel.Dist(Ball().GetVel()) < Ball().GetVelEps())) {
        relVel = (relVel + Ball().GetVel()) / 2;
      }
    }

    Ball().UpdateVelEps(eps);
    Ball().UpdateVel(relVel, mSightDelay, mBallConf);
  }

  //利用位置相减修正.
  if (mpObserver->Ball().GetDist().time() ==
      mpObserver->LatestSightTime()) //看到球的位置情况
  {
    /*		if (//mpObserver->Ball().Dist() <
       ServerParam::instance().visibleDistance() * 2 &&
                            (mpWorldState->GetHistory(1 +
       mSightDelay)->GetBall().GetPosDelay() == 0 || (mpWorldState->GetHistory(1
       + mSightDelay)->GetBall().GetPos().Dist(SelfState().GetPos()) <
       ServerParam::instance().visibleDistance() - 0.15 &&
       mpWorldState->GetHistory(1 + mSightDelay)->GetBall().GetPosDelay() <
       2)))*/

    if (mpWorldState->GetHistory(1 + mSightDelay)) {
      if (mpWorldState->GetHistory(1 + mSightDelay)->GetBall().GetPosDelay() <
          2) //距离近到一定程度才可以用
      {
        Vector vel = GetBall().GetPos() -
                     mpWorldState->GetHistory(1 + mSightDelay)->Ball().GetPos();

        // use  speed of self sense instead of pos of self sight to reduce the
        // error
        if (GetBall().GetPosEps() > ServerParam::instance().playerSize() ||
            (!mpObserver->Sense().IsCollideWithBall() &&
             !mpObserver->Sense().IsCollideWithPlayer() &&
             !mpObserver->Sense().IsCollideWithPost())) {
          //碰撞时server强制移动人,如果用位置相减修正,会引入最大0.3(player
          //size)的误差,08也应该有这个bug
          Vector self_vel = GetSelfVelFromSightDelay(mSightDelay);

          if (mpObserver->Sense().IsCollideWithBall() ||
              mpObserver->Sense().IsCollideWithPlayer() ||
              mpObserver->Sense().IsCollideWithPost()) {
            self_vel /= -0.1;
          }

          self_vel /= PlayerParam::instance()
                          .HeteroPlayer(SelfState().GetPlayerType())
                          .playerDecay();
          Vector self_vel_pos =
              SelfState().GetPos() - mpWorldState->GetHistory(1 + mSightDelay)
                                         ->Teammate(GetSelfUnum())
                                         .GetPos();
          vel += self_vel - self_vel_pos;
        }

        if (mpObserver->GetBallKickTime() != mpObserver->LatestSightTime() &&
            !mpObserver->Sense().IsCollideWithBall()) {
          if (mpWorldState->GetHistory(1 + mSightDelay)
                  ->GetBall()
                  .GetVelConf() > 0.9) {
            Vector old_vel =
                mpWorldState->GetHistory(1 + mSightDelay)->GetBall().GetVel();

            if (fabs(old_vel.X() - vel.X()) + fabs(old_vel.Y() - vel.Y()) <
                    0.30 &&
                fabs(old_vel.Mod() / (vel.Mod() + FLOAT_EPS) - 1.0) < 0.16) {
              vel = (old_vel + vel) / 2;
            }
          }
        } else if (!mpObserver->Sense().IsCollideWithBall()) {
          if (mpWorldState->GetHistory(1 + mSightDelay)
                  ->GetBall()
                  .GetVelConf() > 0.9) {
            if (mpObserver->GetBallKickTime() ==
                mpObserver->LatestSightTime()) {
              Vector old_vel = mpObserver->GetBallVelByKick() /
                               ServerParam::instance().ballDecay();
              if (fabs(old_vel.X() - vel.X()) + fabs(old_vel.Y() - vel.Y()) <
                      0.30 &&
                  fabs(old_vel.Mod() / (vel.Mod() + FLOAT_EPS) - 1.0) < 0.16) {
                vel = (old_vel + vel) / 2;
              }
            }
          }
        } else if (mpObserver->Sense().IsCollideWithBall()) {
          vel *= -0.1;
        }

        vel *= ServerParam::instance().ballDecay();

        if (vel.Mod() > ServerParam::instance().ballSpeedMax()) {
          vel = Polar2Vector(ServerParam::instance().ballSpeedMax(), vel.Dir());
        }

        double eps1 = PlayerParam::instance().GetEpsInSight(
            (mpWorldState->GetHistory(1 + mSightDelay)->GetBall().GetPos() -
             mpWorldState->GetHistory(1 + mSightDelay)
                 ->GetTeammate(mSelfUnum)
                 .GetPos())
                .Mod());
        double eps2 =
            PlayerParam::instance().GetEpsInSight(mpObserver->Ball().Dist());
        double eps = eps1 + eps2;

        if (mpObserver->Sense().IsCollideWithPlayer() ||
            mpObserver->Sense().IsCollideWithPost()) {
          eps += ServerParam::instance().playerSize() *
                 ServerParam::instance().ballDecay();
        } else if (mpObserver->Sense().IsCollideWithBall()) {
          eps += ServerParam::instance().playerSize() *
                 ServerParam::instance().ballDecay() * 0.1;
        }

        //没有视觉事一定更新, 有角度视觉是作为修正
        if (mpObserver->Ball().Dist() <
            2 * ServerParam::instance().visibleDistance()) {
          if (mpWorldState->GetHistory(1 + mSightDelay)
                      ->GetBall()
                      .GetPosDelay() == 0 ||
              (mpWorldState->GetHistory(1 + mSightDelay)
                       ->GetBall()
                       .GetPos()
                       .Dist(SelfState().GetPos()) <
                   ServerParam::instance().visibleDistance() - 0.15 &&
               mpWorldState->GetHistory(1 + mSightDelay)
                       ->GetBall()
                       .GetPosDelay() == 1) ||
              (!mIsHearBallVel && mIsOtherKick)) {
            if (Ball().GetVelDelay() > mSightDelay + 1 ||
                eps < Ball().GetVelEps() ||
                (Ball().GetVelDelay() != 0 &&
                 vel.Dist(Ball().GetVel()) > Ball().GetVelEps() &&
                 mIsOtherMayKick)) {
              /*	char filename[25] = {0};
sprintf(filename , "ballinfo_%d.txt" , mSelfUnum);

std::ofstream file(filename , std::ios::app);
file << mpWorldState->CurrentTime().T() << "\t" <<
mpWorldState->CurrentTime().S() << "\t" << vel.X() << "\t" << vel.Y() << "\t" <<
Ball().GetVel().X() << "\t" << Ball().GetVel().Y() << std::endl;

file.close();
               */
              Ball().UpdateVelEps(eps);
              Ball().UpdateVel(vel, mSightDelay, mBallConf);
            }
          }
        }
        //测试结果非常不好 先注释掉
        else {
          if (Ball().GetVelDelay() > mSightDelay && !mIsHearBallVel &&
              mIsOtherKick) {
            /*
    char filename[25] = {0};
    sprintf(filename , "ballinfo_%d.txt" , mSelfUnum);

    std::ofstream file(filename , std::ios::app);
    file << mpWorldState->CurrentTime().T() << "\t" <<
    mpWorldState->CurrentTime().S() << "\t" << vel.X() << "\t" << vel.Y() <<
    "\t" << Ball().GetVel().X() << "\t" << Ball().GetVel().Y() << "\t" << eps <<
    "\t" << Ball().GetVelEps() << std::endl;

    file.close();
             */
            Ball().UpdateVelEps(eps);
            Ball().UpdateVel(vel, mSightDelay, mBallConf);
          }
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
callq 0x6603c
movq (%rbx), %rax
movl 0x183c(%rax), %ecx
cmpl 0x18(%rax), %ecx
jne 0x61114
movl 0x14(%rax), %ecx
cmpl %ecx, 0x1838(%rax)
jne 0x61114
callq 0x450ba
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x6a164
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
movl 0x1c(%rax), %eax
cmpq $0x2d, %rax
ja 0x60d92
movabsq $0x3ac000000000, %rcx   # imm = 0x3AC000000000
btq %rax, %rcx
jae 0x60d92
callq 0x4a75c
movsd 0x32a8(%rax), %xmm0
addsd 0xa2b8(%rip), %xmm0     # 0x6b040
maxsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
cmpb $0x1, 0x1b2(%rax)
jne 0x60dea
movslq 0x14(%rbx), %r14
movq 0x8(%rbx), %r15
callq 0x450ba
movq 0x5c38(%rax), %rax
imulq $0x178, %r14, %rcx      # imm = 0x178
movslq 0x44(%r15,%rcx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3038(%rax,%rcx), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0x4a75c
movsd -0x50(%rbp), %xmm0
addsd 0x30d8(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rdx      # imm = 0x178
leaq (%rdx,%rcx), %r14
addq $-0xd0, %r14
movl 0x28(%rbx), %edx
testl %edx, %edx
je 0x60ec0
decq %rax
cmpl $0xa, %edx
movl $0xa, %esi
cmovll %edx, %esi
movq 0x8(%rcx), %rcx
movslq %esi, %rdx
imulq $0x66666667, %rdx, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
movl 0x14b90(%rcx), %edi
subl %edx, %esi
leal (%rdi,%rsi), %edx
addl $0xa, %edx
movslq %edx, %rdx
imulq $0x66666667, %rdx, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %edx
movslq %edx, %rdx
imulq $0x2128, %rdx, %r12     # imm = 0x2128
addq %rcx, %r12
imulq $0x178, %rax, %r13      # imm = 0x178
callq 0x4a75c
movq %rax, %r15
callq 0x4a75c
movsd 0x140(%r13,%r12), %xmm1
movsd 0x3160(%rax), %xmm0
maxsd 0x3168(%r15), %xmm1
minsd %xmm1, %xmm0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0x20(%rcx,%rax), %xmm0
jmp 0x60ec8
movq %r14, %rdi
callq 0x5b2be
movq (%rbx), %rax
addsd 0x1840(%rax), %xmm0
mulsd 0xa175(%rip), %xmm0     # 0x6b050
divsd 0xa165(%rip), %xmm0     # 0x6b048
leaq -0x40(%rbp), %r15
leaq -0x98(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x92d0
movsd (%r12), %xmm0
movsd -0x50(%rbp), %xmm2
mulsd %xmm2, %xmm0
movsd (%r15), %xmm1
mulsd %xmm2, %xmm1
addsd 0x8(%r14), %xmm0
addsd 0x10(%r14), %xmm1
movsd %xmm0, (%r15)
movsd %xmm1, 0x8(%r15)
callq 0x450ba
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x69fa4
movapd %xmm0, %xmm1
movsd -0x50(%rbp), %xmm2
addsd %xmm2, %xmm1
movsd 0xa12b(%rip), %xmm0     # 0x6b080
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
mulsd 0xe7bf(%rip), %xmm0     # 0x6f730
addsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x60f85
sqrtsd %xmm0, %xmm0
jmp 0x60f8a
callq 0x93c0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0xa8(%rcx,%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x4a75c
movsd 0x3178(%rax), %xmm0
addsd %xmm0, %xmm0
movsd -0x50(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x610b6
movl 0x28(%rbx), %eax
testl %eax, %eax
movsd -0x60(%rbp), %xmm2
jne 0x6104c
cmpb $0x1, 0x2c(%rbx)
jne 0x60fe3
cmpb $0x1, 0x35(%rbx)
jne 0x610b6
testl %eax, %eax
jne 0x6104c
movq 0x8(%rbx), %rax
ucomisd 0x58(%rax), %xmm2
jbe 0x6104c
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x38(%rax), %xmm0
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x61022
sqrtsd %xmm0, %xmm0
jmp 0x6102c
callq 0x93c0
movsd -0x60(%rbp), %xmm2
movq 0x8(%rbx), %rax
movsd 0x58(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x6104c
movupd 0x38(%rax), %xmm0
movapd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x60(%rbp)
jmp 0x610b6
cmpl $0x0, 0x28(%rbx)
jne 0x610ac
movq 0x8(%rbx), %rax
ucomisd 0x58(%rax), %xmm2
jbe 0x610ac
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x38(%rax), %xmm0
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6108d
sqrtsd %xmm0, %xmm0
jmp 0x61097
callq 0x93c0
movsd -0x60(%rbp), %xmm2
movq 0x8(%rbx), %rax
ucomisd 0x58(%rax), %xmm0
jb 0x610ac
cmpb $0x0, 0x2c(%rbx)
je 0x61e90
cmpl $0x0, 0x28(%rbx)
je 0x619e3
callq 0x4a75c
movsd -0x50(%rbp), %xmm0
ucomisd 0x3178(%rax), %xmm0
jbe 0x610e3
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x662c5
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movq 0x8(%rbx), %rdi
movsd -0x60(%rbp), %xmm0
movsd %xmm0, 0x58(%rdi)
addq $0x30, %rdi
movl 0x28(%rbx), %edx
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
callq 0xf682
movq 0x8(%rbx), %rax
movl $0x0, 0xa0(%rax)
movq (%rbx), %rax
movl 0x185c(%rax), %ecx
cmpl 0x18(%rax), %ecx
jne 0x61694
movl 0x14(%rax), %ecx
cmpl %ecx, 0x1858(%rax)
jne 0x61694
movsd 0x1840(%rax), %xmm0
mulsd 0x9f0b(%rip), %xmm0     # 0x6b050
divsd 0x9efb(%rip), %xmm0     # 0x6b048
leaq -0x40(%rbp), %r14
leaq -0x98(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x92d0
movsd (%r14), %xmm0
movsd (%r15), %xmm1
movq (%rbx), %rax
movsd 0x1850(%rax), %xmm4
movsd 0x9ec0(%rip), %xmm3     # 0x6b040
maxsd 0x1830(%rax), %xmm3
movsd 0x1860(%rax), %xmm2
movapd %xmm2, -0x60(%rbp)
mulsd 0x9eb3(%rip), %xmm2     # 0x6b050
divsd 0x9ea3(%rip), %xmm2     # 0x6b048
movsd %xmm3, -0x50(%rbp)
mulsd %xmm3, %xmm2
movapd %xmm4, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm2, %xmm0
movapd %xmm4, -0x70(%rbp)
mulsd %xmm1, %xmm4
subsd %xmm0, %xmm4
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
movsd %xmm4, (%r14)
movsd %xmm2, 0x8(%r14)
movl 0x28(%rbx), %esi
movq %rbx, %rdi
callq 0x6a28c
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x80(%rbp)
movl 0x28(%rbx), %eax
testl %eax, %eax
je 0x612b0
cmpl $0xa, %eax
movl $0xa, %ecx
cmovll %eax, %ecx
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
movl 0x14b90(%rax), %esi
subl %ecx, %edx
leal (%rsi,%rdx), %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq $0x2128, %rcx, %r15     # imm = 0x2128
addq %rax, %r15
movslq 0x14(%rbx), %r12
callq 0x4a75c
movq %rax, %r14
callq 0x4a75c
imulq $0x178, %r12, %rcx      # imm = 0x178
movsd -0x38(%rcx,%r15), %xmm1
movsd 0x3160(%rax), %xmm0
maxsd 0x3168(%r14), %xmm1
minsd %xmm1, %xmm0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0x20(%rcx,%rax), %xmm0
jmp 0x612cf
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
callq 0x5b2be
movsd 0x9d79(%rip), %xmm1     # 0x6b050
mulsd %xmm1, %xmm0
movsd 0x9d65(%rip), %xmm1     # 0x6b048
divsd %xmm1, %xmm0
leaq -0x98(%rbp), %r14
leaq -0xa0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x92d0
movsd (%r14), %xmm0
movsd (%r15), %xmm1
movsd -0x40(%rbp), %xmm2
movsd -0x38(%rbp), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm3, %xmm4
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm2
subsd %xmm4, %xmm2
mulsd %xmm1, %xmm3
addsd %xmm0, %xmm3
movsd -0x90(%rbp), %xmm0
addsd %xmm2, %xmm0
movsd -0x80(%rbp), %xmm1
addsd %xmm3, %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
callq 0x450ba
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x69fa4
movapd 0x9ca1(%rip), %xmm3     # 0x6b010
movapd -0x70(%rbp), %xmm5
andpd %xmm3, %xmm5
movsd -0x50(%rbp), %xmm4
divsd %xmm4, %xmm5
mulsd %xmm0, %xmm5
movsd 0xe3ab(%rip), %xmm1     # 0x6f738
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm5, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movapd -0x60(%rbp), %xmm2
andpd %xmm3, %xmm2
movsd 0x9c9e(%rip), %xmm3     # 0x6b050
mulsd %xmm3, %xmm2
movsd 0x9c8a(%rip), %xmm5     # 0x6b048
divsd %xmm5, %xmm2
mulsd %xmm0, %xmm2
mulsd 0xe372(%rip), %xmm4     # 0x6f740
addsd %xmm2, %xmm4
mulsd 0xb1f6(%rip), %xmm0     # 0x6c5d0
mulsd %xmm3, %xmm0
divsd %xmm5, %xmm0
addsd %xmm4, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x61405
xorps %xmm3, %xmm3
sqrtsd %xmm1, %xmm3
jmp 0x61412
movapd %xmm1, %xmm0
callq 0x93c0
movapd %xmm0, %xmm3
cmpl $0x0, 0x28(%rbx)
jne 0x61422
cmpb $0x0, 0x2c(%rbx)
jne 0x6164e
movq 0x8(%rbx), %rax
movsd 0x78(%rax), %xmm0
ucomisd 0xe315(%rip), %xmm0     # 0x6f748
jbe 0x6164e
movsd 0x60(%rax), %xmm0
movaps %xmm0, -0x70(%rbp)
movsd 0x68(%rax), %xmm0
movaps %xmm0, -0x80(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm0
movsd %xmm3, -0x60(%rbp)
jb 0x61479
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0x61486
callq 0x93c0
xorpd %xmm4, %xmm4
movapd %xmm0, %xmm2
movapd -0x80(%rbp), %xmm1
mulsd %xmm1, %xmm1
movapd -0x70(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm4, %xmm0
jb 0x614a8
sqrtsd %xmm0, %xmm0
jmp 0x614bd
movapd %xmm2, -0x90(%rbp)
callq 0x93c0
movapd -0x90(%rbp), %xmm2
subsd %xmm0, %xmm2
andpd 0x9b47(%rip), %xmm2     # 0x6b010
movapd %xmm2, -0x90(%rbp)
callq 0x4a75c
movsd 0x30e8(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x61509
sqrtsd %xmm0, %xmm0
jmp 0x6150e
callq 0x93c0
movsd -0x50(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
callq 0x4a75c
movsd -0x50(%rbp), %xmm0
divsd 0x30e0(%rax), %xmm0
ucomisd -0x90(%rbp), %xmm0
movsd -0x60(%rbp), %xmm3
movapd 0x9acd(%rip), %xmm4     # 0x6b010
jb 0x6164e
movsd -0x40(%rbp), %xmm1
movapd 0x9aba(%rip), %xmm0     # 0x6b010
andpd %xmm1, %xmm0
movsd 0x9ade(%rip), %xmm2     # 0x6b040
ucomisd %xmm0, %xmm2
jbe 0x61587
movsd -0x38(%rbp), %xmm0
andpd 0x9a9b(%rip), %xmm0     # 0x6b010
xorpd %xmm5, %xmm5
movsd 0x9abf(%rip), %xmm2     # 0x6b040
ucomisd %xmm0, %xmm2
ja 0x615b2
movsd -0x38(%rbp), %xmm0
callq 0x90d0
movapd 0x9a77(%rip), %xmm4     # 0x6b010
movsd -0x60(%rbp), %xmm3
movapd %xmm0, %xmm5
mulsd 0x9a9e(%rip), %xmm5     # 0x6b048
divsd 0x9a9e(%rip), %xmm5     # 0x6b050
movapd -0x70(%rbp), %xmm0
andpd %xmm4, %xmm0
movsd 0x9a7d(%rip), %xmm1     # 0x6b040
ucomisd %xmm0, %xmm1
jbe 0x615d8
andpd -0x80(%rbp), %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm4, %xmm1
ja 0x61606
movapd -0x80(%rbp), %xmm0
movapd -0x70(%rbp), %xmm1
movapd %xmm5, -0x50(%rbp)
callq 0x90d0
movapd -0x50(%rbp), %xmm5
movsd -0x60(%rbp), %xmm3
mulsd 0x9a4a(%rip), %xmm0     # 0x6b048
divsd 0x9a4a(%rip), %xmm0     # 0x6b050
subsd %xmm0, %xmm5
andpd 0x99fe(%rip), %xmm5     # 0x6b010
movsd 0x9a3e(%rip), %xmm0     # 0x6b058
ucomisd %xmm5, %xmm0
jbe 0x6164e
movapd -0x70(%rbp), %xmm1
addsd -0x40(%rbp), %xmm1
movapd -0x80(%rbp), %xmm2
addsd -0x38(%rbp), %xmm2
movsd 0xa23c(%rip), %xmm0     # 0x6b878
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm2
movsd %xmm1, -0x40(%rbp)
movsd %xmm2, -0x38(%rbp)
movl 0x28(%rbx), %eax
testl %eax, %eax
jne 0x61669
cmpb $0x1, 0x2c(%rbx)
jne 0x61661
cmpb $0x1, 0x36(%rbx)
jne 0x6166f
testl %eax, %eax
je 0x61bf8
cmpl $0x0, 0x28(%rbx)
je 0x616d5
movapd %xmm3, %xmm1
movq 0x8(%rbx), %rdi
movsd %xmm1, 0x80(%rdi)
addq $0x30, %rdi
movl 0x28(%rbx), %edx
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
callq 0xf64c
movq (%rbx), %rax
movl 0x183c(%rax), %ecx
cmpl 0x18(%rax), %ecx
jne 0x6252d
movl 0x14(%rax), %ecx
cmpl %ecx, 0x1838(%rax)
jne 0x6252d
movq 0x8(%rbx), %rax
movl 0x28(%rbx), %edx
movl %edx, %ecx
movq %rax, %rsi
incl %ecx
je 0x61793
cmpl $0x9, %edx
jle 0x61736
xorl %esi, %esi
jmp 0x61793
movq 0x8(%rbx), %rax
movsd 0x80(%rax), %xmm0
movsd 0xe067(%rip), %xmm1     # 0x6f750
ucomisd %xmm0, %xmm1
jb 0x6166f
ucomisd %xmm0, %xmm3
jne 0x6166f
jp 0x6166f
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x60(%rax), %xmm0
subsd 0x68(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x61c57
sqrtsd %xmm0, %xmm0
jmp 0x61c66
movq 0x8(%rax), %rdx
movslq %ecx, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
movl 0x14b90(%rdx), %r8d
subl %esi, %edi
leal (%r8,%rdi), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rdx, %rsi
testq %rsi, %rsi
je 0x6252d
movq %rax, %rsi
testl %ecx, %ecx
je 0x617fc
movq 0x8(%rax), %rdx
movslq %ecx, %rsi
imulq $0x66666667, %rsi, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
movl 0x14b90(%rdx), %edi
subl %ecx, %esi
addl %edi, %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rdx, %rsi
cmpl $0x1, 0x48(%rsi)
jg 0x6252d
movq %rax, %rsi
testl %ecx, %ecx
je 0x61866
movq 0x8(%rax), %rdx
movslq %ecx, %rsi
imulq $0x66666667, %rsi, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
movl 0x14b90(%rdx), %edi
subl %ecx, %esi
leal (%rdi,%rsi), %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %ecx
movslq %ecx, %rcx
imulq $0x2128, %rcx, %rsi     # imm = 0x2128
addq %rdx, %rsi
movsd 0x38(%rax), %xmm0
movsd 0x40(%rax), %xmm1
subsd 0x38(%rsi), %xmm0
subsd 0x40(%rsi), %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd 0x58(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0x4a75c
movsd -0x50(%rbp), %xmm0
ucomisd 0x3018(%rax), %xmm0
jbe 0x61a2f
movl 0x28(%rbx), %esi
movq %rbx, %rdi
callq 0x6a28c
movq (%rbx), %rax
cmpb $0x0, 0x1b2(%rax)
jne 0x618d3
cmpb $0x0, 0x1b1(%rax)
jne 0x618d3
cmpb $0x1, 0x1b0(%rax)
jne 0x61e81
movsd 0xacfd(%rip), %xmm2     # 0x6c5d8
divsd %xmm2, %xmm0
movsd %xmm0, -0x60(%rbp)
divsd %xmm2, %xmm1
movsd %xmm1, -0x50(%rbp)
callq 0x450ba
movslq 0x14(%rbx), %rcx
movq 0x8(%rbx), %rsi
imulq $0x178, %rcx, %rdx      # imm = 0x178
decq %rcx
addq %rsi, %rdx
addq $-0xd0, %rdx
movslq 0x114(%rdx), %rdi
movq 0x5c38(%rax), %rax
imulq $0x3700, %rdi, %rdi     # imm = 0x3700
movsd 0x3020(%rax,%rdi), %xmm0
movsd -0x60(%rbp), %xmm3
divsd %xmm0, %xmm3
movsd -0x50(%rbp), %xmm2
divsd %xmm0, %xmm2
movl 0x28(%rbx), %edi
incl %edi
je 0x619a2
movq 0x8(%rsi), %rax
movslq %edi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
movl 0x14b90(%rax), %r8d
subl %esi, %edi
leal (%r8,%rdi), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rax, %rsi
imulq $0x178, %rcx, %rax      # imm = 0x178
movsd 0x8(%rdx), %xmm0
movsd 0x10(%rdx), %xmm1
subsd 0xb0(%rsi,%rax), %xmm0
subsd 0xb8(%rsi,%rax), %xmm1
subsd %xmm0, %xmm3
subsd %xmm1, %xmm2
addsd -0x40(%rbp), %xmm3
movsd %xmm3, -0x40(%rbp)
addsd -0x38(%rbp), %xmm2
movsd %xmm2, -0x38(%rbp)
jmp 0x61a51
movq 0x8(%rbx), %rax
ucomisd 0x58(%rax), %xmm2
jne 0x610b6
jp 0x610b6
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x38(%rax), %xmm0
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x61e02
sqrtsd %xmm0, %xmm0
jmp 0x61e0c
movq (%rbx), %rax
cmpb $0x0, 0x1b2(%rax)
jne 0x61a51
cmpb $0x0, 0x1b1(%rax)
jne 0x61a51
cmpb $0x0, 0x1b0(%rax)
je 0x618a6
movq (%rbx), %r14
movq 0x5638(%r14), %rcx
movl 0x14(%r14), %eax
xorl %ecx, %eax
shrq $0x20, %rcx
xorl 0x18(%r14), %ecx
movl %ecx, %edx
orl %eax, %edx
je 0x61a7d
cmpb $0x0, 0x1b2(%r14)
je 0x61caf
cmpb $0x0, 0x1b2(%r14)
je 0x61aac
movsd 0xab49(%rip), %xmm1     # 0x6c5d8
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
mulsd -0x38(%rbp), %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x61ff2
movq 0x8(%rbx), %rsi
movl 0x28(%rbx), %edi
incl %edi
je 0x61b14
movq 0x8(%rsi), %rdx
movslq %edi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
movl 0x14b90(%rdx), %r8d
subl %esi, %edi
leal (%r8,%rdi), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rdx, %rsi
movsd 0x78(%rsi), %xmm0
ucomisd 0xd01f(%rip), %xmm0     # 0x6eb40
jbe 0x61ff2
orl %eax, %ecx
jne 0x61ff2
callq 0x4a75c
movsd 0x30e0(%rax), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
movapd 0x94bf(%rip), %xmm2     # 0x6b010
movapd %xmm0, %xmm3
andpd %xmm2, %xmm3
leaq 0xaa60(%rip), %rcx      # 0x6c5c0
cmpltsd 0x94d7(%rip), %xmm3     # 0x6b040
movsd (%rcx,%rax,8), %xmm4
andpd %xmm3, %xmm4
andnpd %xmm0, %xmm3
orpd %xmm4, %xmm3
movsd 0x5650(%r14), %xmm5
movsd 0x5658(%r14), %xmm4
divsd %xmm3, %xmm5
divsd %xmm3, %xmm4
movapd %xmm5, %xmm0
subsd -0x40(%rbp), %xmm0
andpd %xmm2, %xmm0
movapd %xmm4, %xmm3
subsd -0x38(%rbp), %xmm3
andpd %xmm2, %xmm3
addsd %xmm0, %xmm3
movsd 0x9e1e(%rip), %xmm0     # 0x6b9d8
ucomisd %xmm3, %xmm0
jbe 0x61ff2
movapd %xmm4, %xmm2
mulsd %xmm4, %xmm2
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm4, -0x50(%rbp)
movsd %xmm5, -0x60(%rbp)
jb 0x61f62
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x61f6b
movq 0x8(%rbx), %rax
movsd 0x80(%rax), %xmm0
movsd 0xdb44(%rip), %xmm1     # 0x6f750
ucomisd %xmm0, %xmm1
jb 0x61669
ucomisd %xmm0, %xmm3
jbe 0x61669
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x60(%rax), %xmm0
subsd 0x68(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x61e4d
sqrtsd %xmm0, %xmm0
jmp 0x61e5c
movsd %xmm3, -0x60(%rbp)
callq 0x93c0
movsd -0x60(%rbp), %xmm3
movq 0x8(%rbx), %rax
movsd 0x80(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x6166f
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
addsd 0x60(%rax), %xmm0
addsd 0x68(%rax), %xmm1
movsd 0x9be0(%rip), %xmm2     # 0x6b878
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
jmp 0x6166f
movq 0x8(%rbx), %rcx
movl 0x28(%rbx), %eax
movq %rcx, %rsi
incl %eax
je 0x61d1a
movq 0x8(%rcx), %rdx
movslq %eax, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
movl 0x14b90(%rdx), %r8d
subl %esi, %edi
leal (%r8,%rdi), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rdx, %rsi
movsd 0x78(%rsi), %xmm0
ucomisd 0xce19(%rip), %xmm0     # 0x6eb40
jbe 0x61ff2
testl %eax, %eax
je 0x61d88
movq 0x8(%rcx), %rdx
movslq %eax, %rcx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rcx
addl %esi, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl 0x14b90(%rdx), %esi
subl %eax, %ecx
leal (%rsi,%rcx), %eax
addl $0xa, %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rcx
addl %esi, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cltq
imulq $0x2128, %rax, %rcx     # imm = 0x2128
addq %rdx, %rcx
movsd 0x60(%rcx), %xmm4
movsd 0x68(%rcx), %xmm3
movapd %xmm4, %xmm0
subsd -0x40(%rbp), %xmm0
movapd 0x926d(%rip), %xmm1     # 0x6b010
andpd %xmm1, %xmm0
movapd %xmm3, %xmm2
subsd -0x38(%rbp), %xmm2
andpd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd 0x9c18(%rip), %xmm0     # 0x6b9d8
ucomisd %xmm2, %xmm0
jbe 0x61ff2
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd %xmm3, -0x50(%rbp)
movsd %xmm4, -0x60(%rbp)
jb 0x61f33
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x61f40
callq 0x93c0
movsd -0x60(%rbp), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x610b6
movq 0x8(%rbx), %rax
movsd -0x40(%rbp), %xmm0
addsd 0x38(%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd 0x40(%rax), %xmm1
movsd 0x9a42(%rip), %xmm2     # 0x6b878
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
jmp 0x610b6
movsd %xmm3, -0x60(%rbp)
callq 0x93c0
movsd -0x60(%rbp), %xmm3
movq 0x8(%rbx), %rax
movsd 0x80(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x61669
movupd 0x60(%rax), %xmm0
movapd %xmm0, -0x40(%rbp)
jmp 0x61673
movsd %xmm1, -0x50(%rbp)
movsd %xmm0, -0x60(%rbp)
jmp 0x618ed
cmpb $0x0, 0x2c(%rax)
jne 0x610b6
cmpl $0x1, 0x1c(%rax)
jne 0x610b6
movq 0x8(%rax), %rcx
movl 0x14b90(%rcx), %edx
addl $0x9, %edx
movslq %edx, %rdx
imulq $0x66666667, %rdx, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %edx
movslq %edx, %rdx
imulq $0x2128, %rdx, %rdx     # imm = 0x2128
cmpl $0x0, 0x48(%rcx,%rdx)
jne 0x610b6
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
subsd 0x38(%rax), %xmm1
subsd 0x40(%rax), %xmm2
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
movapd %xmm1, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm0, %xmm4
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm4
movsd %xmm1, -0x70(%rbp)
movsd %xmm2, -0x90(%rbp)
jb 0x6258f
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0x625a6
callq 0x93c0
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x61f8b
sqrtsd %xmm0, %xmm0
jmp 0x61f9a
callq 0x93c0
movapd %xmm0, %xmm3
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x61f5c
movapd %xmm3, -0x70(%rbp)
callq 0x93c0
movapd -0x70(%rbp), %xmm3
movsd -0x50(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
addsd 0x9094(%rip), %xmm0     # 0x6b040
divsd %xmm0, %xmm3
addsd 0x90e0(%rip), %xmm3     # 0x6b098
andpd 0x9050(%rip), %xmm3     # 0x6b010
movsd 0xa950(%rip), %xmm0     # 0x6c918
ucomisd %xmm3, %xmm0
jbe 0x61ff2
addsd -0x40(%rbp), %xmm2
addsd -0x38(%rbp), %xmm1
movsd 0x9898(%rip), %xmm0     # 0x6b878
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm1
movsd %xmm2, -0x40(%rbp)
jmp 0x61aa2
callq 0x4a75c
movsd 0x30e0(%rax), %xmm1
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
mulsd -0x38(%rbp), %xmm1
movsd %xmm1, -0x38(%rbp)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x62033
sqrtsd %xmm0, %xmm0
jmp 0x62038
callq 0x93c0
movsd %xmm0, -0x50(%rbp)
callq 0x4a75c
movsd -0x50(%rbp), %xmm0
ucomisd 0x30f8(%rax), %xmm0
jbe 0x620f8
callq 0x4a75c
movq %rax, %r14
movsd -0x40(%rbp), %xmm1
movapd 0x8fa6(%rip), %xmm0     # 0x6b010
andpd %xmm1, %xmm0
movsd 0x8fca(%rip), %xmm2     # 0x6b040
ucomisd %xmm0, %xmm2
jbe 0x62093
movsd -0x38(%rbp), %xmm3
andpd 0x8f87(%rip), %xmm3     # 0x6b010
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm2
ja 0x620b5
movsd -0x38(%rbp), %xmm0
callq 0x90d0
mulsd 0x8fa3(%rip), %xmm0     # 0x6b048
movsd 0x8fa3(%rip), %xmm1     # 0x6b050
divsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd 0x8f8b(%rip), %xmm0     # 0x6b048
leaq -0x98(%rbp), %r15
leaq -0xa0(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x92d0
movsd 0x30f8(%r14), %xmm0
movsd (%r12), %xmm1
mulsd %xmm0, %xmm1
mulsd (%r15), %xmm0
movsd %xmm1, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
callq 0x450ba
movq %rax, %r14
movq 0x8(%rbx), %rax
movl 0x28(%rbx), %esi
movl %esi, %ecx
movq %rax, %rdx
incl %ecx
je 0x62176
cmpl $0x9, %esi
jle 0x62119
xorl %edx, %edx
jmp 0x62176
movq 0x8(%rax), %rsi
movslq %ecx, %rdx
imulq $0x66666667, %rdx, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
movl 0x14b90(%rsi), %r8d
subl %edx, %edi
leal (%r8,%rdi), %edx
addl $0xa, %edx
movslq %edx, %rdx
imulq $0x66666667, %rdx, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
addl %edi, %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %edx
movslq %edx, %rdx
imulq $0x2128, %rdx, %rdx     # imm = 0x2128
addq %rsi, %rdx
testl %ecx, %ecx
je 0x621d0
movq 0x8(%rax), %rsi
movslq %ecx, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rax
addl %edi, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl 0x14b90(%rsi), %edi
subl %ecx, %eax
addl %edi, %eax
addl $0xa, %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rcx
addl %edi, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cltq
imulq $0x2128, %rax, %rax     # imm = 0x2128
addq %rsi, %rax
movslq 0x14(%rbx), %rcx
movsd 0x38(%rdx), %xmm0
movsd 0x40(%rdx), %xmm1
imulq $0x178, %rcx, %rcx      # imm = 0x178
subsd -0xc8(%rcx,%rax), %xmm0
subsd -0xc0(%rcx,%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x62213
sqrtsd %xmm0, %xmm0
jmp 0x62218
callq 0x93c0
movq %r14, %rdi
callq 0x69fa4
movsd %xmm0, -0x50(%rbp)
callq 0x450ba
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x69fa4
addsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
cmpb $0x0, 0x1b1(%rax)
jne 0x62260
cmpb $0x1, 0x1b0(%rax)
jne 0x6240a
callq 0x4a75c
movsd 0x3018(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x4a75c
movsd -0x60(%rbp), %xmm1
mulsd 0x30e0(%rax), %xmm1
movsd -0x50(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
movsd 0x1830(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x4a75c
movsd 0x3178(%rax), %xmm0
addsd %xmm0, %xmm0
ucomisd -0x60(%rbp), %xmm0
movq 0x8(%rbx), %rdi
jbe 0x623d4
movl 0x28(%rbx), %eax
movq %rdi, %rdx
incl %eax
je 0x62329
movq 0x8(%rdi), %rcx
movslq %eax, %rdx
imulq $0x66666667, %rdx, %rsi # imm = 0x66666667
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x22, %rsi
addl %r8d, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
movl 0x14b90(%rcx), %r8d
subl %edx, %esi
leal (%r8,%rsi), %edx
addl $0xa, %edx
movslq %edx, %rdx
imulq $0x66666667, %rdx, %rsi # imm = 0x66666667
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x22, %rsi
addl %r8d, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %edx
movslq %edx, %rdx
imulq $0x2128, %rdx, %rdx     # imm = 0x2128
addq %rcx, %rdx
cmpl $0x0, 0x48(%rdx)
je 0x624e8
movq %rdi, %rdx
testl %eax, %eax
je 0x62391
movq 0x8(%rdi), %rcx
movslq %eax, %rdx
imulq $0x66666667, %rdx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
movl 0x14b90(%rcx), %esi
subl %eax, %edx
leal (%rsi,%rdx), %eax
addl $0xa, %eax
cltq
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
cltq
imulq $0x2128, %rax, %rdx     # imm = 0x2128
addq %rcx, %rdx
movslq 0x14(%rbx), %rax
movsd 0x38(%rdx), %xmm0
movsd 0x40(%rdx), %xmm1
imulq $0x178, %rax, %rax      # imm = 0x178
subsd -0xc8(%rax,%rdi), %xmm0
subsd -0xc0(%rax,%rdi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6244c
sqrtsd %xmm0, %xmm0
jmp 0x62451
movl 0x28(%rbx), %edx
cmpl %edx, 0x70(%rdi)
jle 0x6252d
cmpb $0x0, 0x36(%rbx)
jne 0x6252d
cmpb $0x1, 0x2c(%rbx)
jne 0x6252d
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x80(%rdi)
addq $0x30, %rdi
jmp 0x6251f
cmpb $0x1, 0x1b2(%rax)
jne 0x62292
callq 0x4a75c
movsd 0x3018(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x4a75c
movsd -0x60(%rbp), %xmm0
mulsd 0x30e0(%rax), %xmm0
mulsd 0xa18d(%rip), %xmm0     # 0x6c5d0
movapd %xmm0, %xmm1
jmp 0x62284
callq 0x93c0
movsd %xmm0, -0x60(%rbp)
callq 0x4a75c
movsd 0x3178(%rax), %xmm0
addsd 0xd2ed(%rip), %xmm0     # 0x6f758
ucomisd -0x60(%rbp), %xmm0
jbe 0x624dc
movq 0x8(%rbx), %rcx
movl 0x28(%rbx), %edx
incl %edx
je 0x624d6
movq 0x8(%rcx), %rax
movslq %edx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
movl 0x14b90(%rax), %esi
subl %ecx, %edx
leal (%rsi,%rdx), %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq $0x2128, %rcx, %rcx     # imm = 0x2128
addq %rax, %rcx
cmpl $0x1, 0x48(%rcx)
je 0x624e8
cmpb $0x0, 0x36(%rbx)
jne 0x6252d
cmpb $0x1, 0x2c(%rbx)
jne 0x6252d
movq 0x8(%rbx), %rax
movl 0x70(%rax), %ecx
movl 0x28(%rbx), %edx
incl %edx
cmpl %edx, %ecx
jg 0x62507
movsd 0x80(%rax), %xmm0
ucomisd -0x50(%rbp), %xmm0
jbe 0x6253c
movq 0x8(%rbx), %rdi
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x80(%rdi)
addq $0x30, %rdi
movl 0x28(%rbx), %edx
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
callq 0xf64c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ecx, %ecx
je 0x6252d
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
subsd 0x60(%rax), %xmm0
subsd 0x68(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x62570
sqrtsd %xmm0, %xmm0
jmp 0x62575
callq 0x93c0
movq 0x8(%rbx), %rax
ucomisd 0x80(%rax), %xmm0
jbe 0x6252d
cmpb $0x1, 0x34(%rbx)
je 0x62507
jmp 0x6252d
movapd %xmm4, %xmm0
movsd %xmm4, -0x80(%rbp)
callq 0x93c0
movsd -0x80(%rbp), %xmm4
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
xorpd %xmm0, %xmm0
jbe 0x625f1
ucomisd %xmm0, %xmm4
jb 0x625bf
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0x625c8
movapd %xmm4, %xmm0
callq 0x93c0
movsd -0x90(%rbp), %xmm2
movsd 0x8a80(%rip), %xmm1     # 0x6b058
divsd %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm2
movapd %xmm0, %xmm3
movapd %xmm2, %xmm0
movq 0x8(%rbx), %rax
movsd 0x58(%rax), %xmm1
mulsd %xmm1, %xmm3
mulsd %xmm1, %xmm0
addsd 0x38(%rax), %xmm3
addsd 0x40(%rax), %xmm0
movsd %xmm3, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
jmp 0x610b6
nop