// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
movq %rdi, %rbx
callq 0x63e50
movq (%rbx), %rax
movl 0x14(%rax), %ecx
movl 0x18(%rax), %edx
cmpl %edx, 0x183c(%rax)
jne 0x5f5d8
cmpl %ecx, 0x1838(%rax)
jne 0x5f5d8
callq 0x43dce
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x677a6
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
movl 0x1c(%rax), %ecx
cmpq $0x2d, %rcx
ja 0x5f17c
movabsq $0x3ac000000000, %rdx   # imm = 0x3AC000000000
btq %rcx, %rdx
jae 0x5f17c
callq 0x49360
movsd 0x32a8(%rax), %xmm0
addsd 0x9ed1(%rip), %xmm0     # 0x69040
maxsd -0x50(%rbp), %xmm0
movq (%rbx), %rax
movsd %xmm0, -0x50(%rbp)
cmpb $0x1, 0x1b2(%rax)
jne 0x5f1d1
movslq 0x14(%rbx), %r14
movq 0x8(%rbx), %r15
callq 0x43dce
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 0x49360
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 0x5f2a7
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 0x49360
movq %rax, %r15
callq 0x49360
movsd 0x140(%r13,%r12), %xmm1
maxsd 0x3168(%r15), %xmm1
movsd 0x3160(%rax), %xmm0
minsd %xmm1, %xmm0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0x20(%rcx,%rax), %xmm0
jmp 0x5f2af
movq %r14, %rdi
callq 0x59a22
movq (%rbx), %rax
addsd 0x1840(%rax), %xmm0
mulsd 0x9d8e(%rip), %xmm0     # 0x69050
divsd 0x9d7e(%rip), %xmm0     # 0x69048
leaq -0x40(%rbp), %r15
leaq -0x88(%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 0x43dce
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x675e6
movapd %xmm0, %xmm1
movsd -0x50(%rbp), %xmm2
addsd %xmm2, %xmm1
movsd 0x9d44(%rip), %xmm0     # 0x69080
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
mulsd 0xe398(%rip), %xmm0     # 0x6d6f0
addsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5f36c
sqrtsd %xmm0, %xmm0
jmp 0x5f371
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 0x49360
movsd 0x3178(%rax), %xmm0
addsd %xmm0, %xmm0
movsd -0x50(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5f571
cmpl $0x0, 0x28(%rbx)
jne 0x5f571
movb 0x2c(%rbx), %cl
cmpb $0x1, %cl
jne 0x5f3ca
cmpb $0x1, 0x35(%rbx)
jne 0x5f571
movq 0x8(%rbx), %rax
movsd 0x58(%rax), %xmm0
movsd -0x60(%rbp), %xmm7
ucomisd %xmm0, %xmm7
jbe 0x5f465
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
subsd 0x38(%rax), %xmm1
subsd 0x40(%rax), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5f423
addq $0x38, %rax
movupd (%rax), %xmm1
movapd %xmm1, -0x40(%rbp)
movsd %xmm0, -0x60(%rbp)
jmp 0x5f571
movsd 0x38(%rax), %xmm1
movsd 0x40(%rax), %xmm2
movsd -0x40(%rbp), %xmm3
movsd -0x38(%rbp), %xmm4
subsd %xmm1, %xmm3
subsd %xmm2, %xmm4
movapd %xmm4, %xmm5
mulsd %xmm4, %xmm5
movapd %xmm3, %xmm6
mulsd %xmm3, %xmm6
addsd %xmm5, %xmm6
xorps %xmm5, %xmm5
sqrtsd %xmm6, %xmm5
ucomisd %xmm0, %xmm5
setb %dl
orb %cl, %dl
je 0x5f4da
ucomisd %xmm0, %xmm7
jne 0x5f571
jp 0x5f571
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd 0x38(%rax), %xmm3
movsd 0x40(%rax), %xmm2
movapd %xmm0, %xmm4
subsd %xmm3, %xmm4
movapd %xmm1, %xmm5
subsd %xmm2, %xmm5
mulsd %xmm5, %xmm5
mulsd %xmm4, %xmm4
addsd %xmm5, %xmm4
sqrtsd %xmm4, %xmm4
ucomisd %xmm4, %xmm7
jbe 0x5f571
addsd %xmm3, %xmm0
addsd %xmm2, %xmm1
movsd 0xa3b5(%rip), %xmm2     # 0x69878
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
jmp 0x5f571
cmpb $0x0, 0x2c(%rax)
jne 0x5f571
cmpl $0x1, 0x1c(%rax)
jne 0x5f571
movq 0x8(%rax), %rax
movl 0x14b90(%rax), %ecx
addl $0x9, %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
cmpl $0x0, 0x48(%rax,%rcx)
jne 0x5f571
xorpd %xmm6, %xmm6
ucomisd %xmm6, %xmm5
movsd 0x9b1e(%rip), %xmm7     # 0x69058
divsd %xmm5, %xmm7
mulsd %xmm7, %xmm4
ja 0x5f54a
xorpd %xmm3, %xmm3
jmp 0x5f54e
mulsd %xmm7, %xmm3
cmpltsd %xmm5, %xmm6
andpd %xmm4, %xmm6
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm6
addsd %xmm3, %xmm1
addsd %xmm6, %xmm2
movsd %xmm1, -0x40(%rbp)
movsd %xmm2, -0x38(%rbp)
callq 0x49360
movsd -0x50(%rbp), %xmm0
ucomisd 0x3178(%rax), %xmm0
jbe 0x5f59e
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x63fdb
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 0xf572
movq 0x8(%rbx), %rax
movl $0x0, 0xa0(%rax)
movq (%rbx), %rax
movl 0x14(%rax), %ecx
movl 0x18(%rax), %edx
cmpl %edx, 0x185c(%rax)
jne 0x5fac9
cmpl %ecx, 0x1858(%rax)
jne 0x5fac9
movsd 0x1840(%rax), %xmm0
mulsd 0x9a50(%rip), %xmm0     # 0x69050
divsd 0x9a40(%rip), %xmm0     # 0x69048
leaq -0x40(%rbp), %r14
leaq -0x88(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x92d0
movsd (%r14), %xmm0
movsd (%r15), %xmm1
movq (%rbx), %rax
movsd 0x1850(%rax), %xmm4
movsd 0x9a05(%rip), %xmm3     # 0x69040
maxsd 0x1830(%rax), %xmm3
movsd 0x1860(%rax), %xmm2
movapd %xmm2, -0x60(%rbp)
mulsd 0x99f8(%rip), %xmm2     # 0x69050
divsd 0x99e8(%rip), %xmm2     # 0x69048
movsd %xmm3, -0x50(%rbp)
mulsd %xmm3, %xmm2
movapd %xmm4, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm2, %xmm0
movapd %xmm4, -0x80(%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 0x678ce
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0xa0(%rbp)
movl 0x28(%rbx), %eax
testl %eax, %eax
je 0x5f76b
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 0x49360
movq %rax, %r14
callq 0x49360
imulq $0x178, %r12, %rcx      # imm = 0x178
movsd -0x38(%rcx,%r15), %xmm1
maxsd 0x3168(%r14), %xmm1
movsd 0x3160(%rax), %xmm0
minsd %xmm1, %xmm0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0x20(%rcx,%rax), %xmm0
jmp 0x5f78a
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
callq 0x59a22
movsd 0x98be(%rip), %xmm1     # 0x69050
mulsd %xmm1, %xmm0
movsd 0x98aa(%rip), %xmm1     # 0x69048
divsd %xmm1, %xmm0
leaq -0x88(%rbp), %r14
leaq -0xa8(%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 -0x68(%rbp), %xmm0
addsd %xmm2, %xmm0
movsd -0xa0(%rbp), %xmm1
addsd %xmm3, %xmm1
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
callq 0x43dce
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x675e6
movapd 0x97e6(%rip), %xmm5     # 0x69010
movapd -0x80(%rbp), %xmm3
andpd %xmm5, %xmm3
movsd -0x50(%rbp), %xmm2
divsd %xmm2, %xmm3
mulsd %xmm0, %xmm3
movsd 0xdeb0(%rip), %xmm4     # 0x6d6f8
movapd %xmm2, %xmm1
mulsd %xmm4, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
movapd -0x60(%rbp), %xmm1
andpd %xmm5, %xmm1
movsd 0x97e3(%rip), %xmm3     # 0x69050
mulsd %xmm3, %xmm1
movsd 0x97cf(%rip), %xmm5     # 0x69048
divsd %xmm5, %xmm1
mulsd 0xde7b(%rip), %xmm2     # 0x6d700
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
mulsd 0xad2b(%rip), %xmm0     # 0x6a5c0
mulsd %xmm3, %xmm0
divsd %xmm5, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm4, %xmm4
addsd %xmm0, %xmm4
cmpl $0x0, 0x28(%rbx)
jne 0x5f8bd
cmpb $0x0, 0x2c(%rbx)
jne 0x5fa8c
movq 0x8(%rbx), %rax
movsd 0x78(%rax), %xmm0
ucomisd 0xde3a(%rip), %xmm0     # 0x6d708
jbe 0x5fa8c
movsd 0x60(%rax), %xmm2
movsd 0x68(%rax), %xmm3
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorps %xmm5, %xmm5
sqrtsd %xmm0, %xmm5
movapd %xmm3, -0xa0(%rbp)
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
movapd %xmm2, -0x60(%rbp)
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
subsd %xmm0, %xmm5
andpd 0x96e1(%rip), %xmm5     # 0x69010
movapd %xmm5, -0x80(%rbp)
movsd %xmm4, -0x50(%rbp)
callq 0x49360
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
mulsd 0x30e8(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x49360
movapd 0x969e(%rip), %xmm5     # 0x69010
movsd -0x50(%rbp), %xmm4
movsd -0x68(%rbp), %xmm0
divsd 0x30e0(%rax), %xmm0
ucomisd -0x80(%rbp), %xmm0
jb 0x5fa8c
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
movapd %xmm1, %xmm2
andpd %xmm5, %xmm2
movsd 0x9697(%rip), %xmm3     # 0x69040
ucomisd %xmm2, %xmm3
jbe 0x5f9c1
movapd %xmm0, %xmm2
andpd %xmm5, %xmm2
xorpd %xmm6, %xmm6
ucomisd %xmm2, %xmm3
ja 0x5f9ef
callq 0x90d0
movapd 0x9642(%rip), %xmm5     # 0x69010
movsd -0x50(%rbp), %xmm4
movsd 0x9665(%rip), %xmm3     # 0x69040
movapd %xmm0, %xmm6
mulsd 0x9661(%rip), %xmm6     # 0x69048
divsd 0x9661(%rip), %xmm6     # 0x69050
movapd -0x60(%rbp), %xmm0
andpd %xmm5, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x5fa10
andpd -0xa0(%rbp), %xmm5
xorpd %xmm0, %xmm0
ucomisd %xmm5, %xmm3
ja 0x5fa41
movapd -0xa0(%rbp), %xmm0
movapd -0x60(%rbp), %xmm1
movapd %xmm6, -0x80(%rbp)
callq 0x90d0
movapd -0x80(%rbp), %xmm6
movsd -0x50(%rbp), %xmm4
mulsd 0x960f(%rip), %xmm0     # 0x69048
divsd 0x960f(%rip), %xmm0     # 0x69050
subsd %xmm0, %xmm6
andpd 0x95c3(%rip), %xmm6     # 0x69010
movsd 0x9603(%rip), %xmm0     # 0x69058
ucomisd %xmm6, %xmm0
jbe 0x5fa8c
movapd -0x60(%rbp), %xmm1
addsd -0x40(%rbp), %xmm1
movapd -0xa0(%rbp), %xmm2
addsd -0x38(%rbp), %xmm2
movsd 0x9dfe(%rip), %xmm0     # 0x69878
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm2
movsd %xmm1, -0x40(%rbp)
movsd %xmm2, -0x38(%rbp)
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
movl 0x28(%rbx), %edx
testl %edx, %edx
je 0x5fcf4
movapd %xmm0, %xmm1
movq 0x8(%rbx), %rdi
movsd %xmm1, 0x80(%rdi)
addq $0x30, %rdi
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
callq 0xf53c
movq (%rbx), %rax
movl 0x14(%rax), %ecx
movl 0x18(%rax), %edx
cmpl %edx, 0x183c(%rax)
jne 0x605f7
cmpl %ecx, 0x1838(%rax)
jne 0x605f7
movq 0x8(%rbx), %rax
movl 0x28(%rbx), %ecx
movl %ecx, %edx
incl %edx
jne 0x5fb06
testq %rax, %rax
je 0x605f7
cmpl $0x2, 0x48(%rax)
jge 0x605f7
movq %rax, %rcx
jmp 0x5fb73
cmpl $0x9, %ecx
jg 0x605f7
movq 0x8(%rax), %rcx
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
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, %rdx     # imm = 0x2128
cmpl $0x2, 0x48(%rcx,%rdx)
jge 0x605f7
addq %rdx, %rcx
movsd 0x38(%rax), %xmm0
subsd 0x38(%rcx), %xmm0
movapd %xmm0, -0x50(%rbp)
movsd 0x40(%rax), %xmm0
subsd 0x40(%rcx), %xmm0
movapd %xmm0, -0x60(%rbp)
movsd 0x58(%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0x49360
movsd -0x80(%rbp), %xmm0
ucomisd 0x3018(%rax), %xmm0
jbe 0x5fddf
movl 0x28(%rbx), %esi
movq %rbx, %rdi
callq 0x678ce
movq (%rbx), %rax
cmpb $0x0, 0x1b2(%rax)
jne 0x5fbe0
cmpb $0x0, 0x1b1(%rax)
jne 0x5fbe0
cmpb $0x1, 0x1b0(%rax)
jne 0x6063f
movsd 0xa9e0(%rip), %xmm2     # 0x6a5c8
divsd %xmm2, %xmm0
movsd %xmm0, -0x68(%rbp)
divsd %xmm2, %xmm1
movsd %xmm1, -0x80(%rbp)
callq 0x43dce
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 -0x68(%rbp), %xmm3
divsd %xmm0, %xmm3
movsd -0x80(%rbp), %xmm2
divsd %xmm0, %xmm2
movl 0x28(%rbx), %edi
incl %edi
je 0x5fcaf
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
movapd -0x50(%rbp), %xmm5
movapd -0x60(%rbp), %xmm6
imulq $0x178, %rcx, %rax      # imm = 0x178
movsd 0x8(%rdx), %xmm0
subsd 0xb0(%rsi,%rax), %xmm0
movsd 0x10(%rdx), %xmm1
subsd %xmm0, %xmm3
subsd 0xb8(%rsi,%rax), %xmm1
subsd %xmm1, %xmm2
addsd %xmm3, %xmm5
addsd %xmm2, %xmm6
movq (%rbx), %r14
jmp 0x5fe0e
cmpb $0x1, 0x2c(%rbx)
jne 0x5fd04
cmpb $0x1, 0x36(%rbx)
jne 0x5fa9e
movq 0x8(%rbx), %rax
movsd 0x80(%rax), %xmm1
movsd 0xd9f8(%rip), %xmm2     # 0x6d710
ucomisd %xmm1, %xmm2
jb 0x5fd60
ucomisd %xmm1, %xmm0
jbe 0x5fd60
movsd -0x40(%rbp), %xmm3
movsd -0x38(%rbp), %xmm4
subsd 0x60(%rax), %xmm3
subsd 0x68(%rax), %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm3, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
jbe 0x5fd60
addq $0x60, %rax
movupd (%rax), %xmm0
movapd %xmm0, -0x40(%rbp)
jmp 0x5faa2
ucomisd %xmm1, %xmm2
jb 0x5fa9e
ucomisd %xmm1, %xmm0
jne 0x5fa9e
jp 0x5fa9e
movsd -0x40(%rbp), %xmm2
movsd -0x38(%rbp), %xmm3
movsd 0x60(%rax), %xmm5
movsd 0x68(%rax), %xmm4
movapd %xmm2, %xmm6
subsd %xmm5, %xmm6
movapd %xmm3, %xmm7
subsd %xmm4, %xmm7
mulsd %xmm7, %xmm7
mulsd %xmm6, %xmm6
addsd %xmm7, %xmm6
sqrtsd %xmm6, %xmm6
ucomisd %xmm6, %xmm1
jbe 0x5fa9e
addsd %xmm5, %xmm2
addsd %xmm4, %xmm3
movsd 0x9ab0(%rip), %xmm1     # 0x69878
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm3
movsd %xmm2, -0x40(%rbp)
movsd %xmm3, -0x38(%rbp)
jmp 0x5fa9e
movq (%rbx), %r14
cmpb $0x0, 0x1b2(%r14)
jne 0x5fe04
cmpb $0x0, 0x1b1(%r14)
jne 0x5fe04
cmpb $0x0, 0x1b0(%r14)
je 0x5fbb3
movapd -0x50(%rbp), %xmm5
movapd -0x60(%rbp), %xmm6
movq 0x5638(%r14), %rdx
movq %rdx, %rax
shrq $0x20, %rax
xorl 0x18(%r14), %eax
movl 0x14(%r14), %ecx
xorl %edx, %ecx
movb 0x1b2(%r14), %dl
movl %eax, %esi
orl %ecx, %esi
je 0x5fe3c
testb $0x1, %dl
je 0x60010
testb $0x1, %dl
je 0x5fe5b
movsd 0xa77f(%rip), %xmm0     # 0x6a5c8
mulsd %xmm0, %xmm5
movapd %xmm5, -0x50(%rbp)
mulsd %xmm0, %xmm6
jmp 0x60165
movq 0x8(%rbx), %rsi
movl 0x28(%rbx), %edi
incl %edi
je 0x5fec3
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 0xcc40(%rip), %xmm0     # 0x6cb10
movapd %xmm5, -0x50(%rbp)
movapd %xmm6, -0x60(%rbp)
jbe 0x6016a
orl %ecx, %eax
jne 0x6016a
callq 0x49360
movapd -0x60(%rbp), %xmm6
movapd -0x50(%rbp), %xmm5
movsd 0x30e0(%rax), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
movapd 0x90fc(%rip), %xmm2     # 0x69010
movapd %xmm0, %xmm3
andpd %xmm2, %xmm3
leaq 0xa68d(%rip), %rcx      # 0x6a5b0
movsd (%rcx,%rax,8), %xmm1
cmpltsd 0x910f(%rip), %xmm3     # 0x69040
andpd %xmm3, %xmm1
andnpd %xmm0, %xmm3
orpd %xmm1, %xmm3
movsd 0x5650(%r14), %xmm1
movsd 0x5658(%r14), %xmm0
divsd %xmm3, %xmm1
divsd %xmm3, %xmm0
movapd %xmm1, %xmm3
subsd %xmm5, %xmm3
andpd %xmm2, %xmm3
movapd %xmm0, %xmm4
subsd %xmm6, %xmm4
andpd %xmm2, %xmm4
addsd %xmm3, %xmm4
movsd 0x9a5d(%rip), %xmm2     # 0x699d8
ucomisd %xmm4, %xmm2
jbe 0x6016a
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
sqrtsd %xmm3, %xmm2
movapd %xmm6, %xmm3
mulsd %xmm6, %xmm3
movapd %xmm5, %xmm4
mulsd %xmm5, %xmm4
addsd %xmm3, %xmm4
xorps %xmm3, %xmm3
sqrtsd %xmm4, %xmm3
addsd 0x907d(%rip), %xmm3     # 0x69040
divsd %xmm3, %xmm2
addsd 0x90c9(%rip), %xmm2     # 0x69098
andpd 0x9039(%rip), %xmm2     # 0x69010
movsd 0xa929(%rip), %xmm3     # 0x6a908
ucomisd %xmm2, %xmm3
jbe 0x6016a
addsd %xmm1, %xmm5
addsd %xmm6, %xmm0
movsd 0x987f(%rip), %xmm1     # 0x69878
mulsd %xmm1, %xmm5
movapd %xmm5, -0x50(%rbp)
mulsd %xmm1, %xmm0
movapd %xmm0, -0x60(%rbp)
jmp 0x6016a
movq 0x8(%rbx), %rax
movl 0x28(%rbx), %ecx
incl %ecx
jne 0x6002f
movsd 0x78(%rax), %xmm0
ucomisd 0xcae8(%rip), %xmm0     # 0x6cb10
ja 0x6009c
jmp 0x60160
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, %rcx     # imm = 0x2128
movsd 0x78(%rax,%rcx), %xmm0
ucomisd 0xca7d(%rip), %xmm0     # 0x6cb10
jbe 0x60160
addq %rcx, %rax
movsd 0x60(%rax), %xmm0
movsd 0x68(%rax), %xmm1
movapd %xmm0, %xmm2
subsd %xmm5, %xmm2
movapd 0x8f5a(%rip), %xmm3     # 0x69010
andpd %xmm3, %xmm2
movapd %xmm1, %xmm4
subsd %xmm6, %xmm4
andpd %xmm3, %xmm4
addsd %xmm2, %xmm4
movsd 0x9906(%rip), %xmm2     # 0x699d8
ucomisd %xmm4, %xmm2
jbe 0x60160
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
sqrtsd %xmm3, %xmm2
movapd %xmm6, %xmm3
mulsd %xmm6, %xmm3
movapd %xmm5, %xmm4
mulsd %xmm5, %xmm4
addsd %xmm3, %xmm4
xorps %xmm3, %xmm3
sqrtsd %xmm4, %xmm3
addsd 0x8f26(%rip), %xmm3     # 0x69040
divsd %xmm3, %xmm2
addsd 0x8f72(%rip), %xmm2     # 0x69098
andpd 0x8ee2(%rip), %xmm2     # 0x69010
movsd 0xa7d2(%rip), %xmm3     # 0x6a908
ucomisd %xmm2, %xmm3
jbe 0x60160
addsd %xmm5, %xmm0
addsd %xmm6, %xmm1
movsd 0x972c(%rip), %xmm2     # 0x69878
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
movapd %xmm1, -0x60(%rbp)
movapd %xmm0, -0x50(%rbp)
jmp 0x6016a
movapd %xmm5, -0x50(%rbp)
movapd %xmm6, -0x60(%rbp)
callq 0x49360
movsd 0x30e0(%rax), %xmm0
movapd -0x50(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movapd -0x60(%rbp), %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, -0x38(%rbp)
movapd %xmm2, -0x60(%rbp)
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
movapd %xmm1, -0x50(%rbp)
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0x49360
movsd -0x80(%rbp), %xmm0
ucomisd 0x30f8(%rax), %xmm0
jbe 0x60273
callq 0x49360
movq %rax, %r14
movapd 0x8e2f(%rip), %xmm3     # 0x69010
movapd -0x50(%rbp), %xmm1
movapd %xmm1, %xmm0
andpd %xmm3, %xmm0
movsd 0x8e4a(%rip), %xmm2     # 0x69040
ucomisd %xmm0, %xmm2
movapd -0x60(%rbp), %xmm4
jbe 0x6020f
andpd %xmm4, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm2
ja 0x60230
movapd %xmm4, %xmm0
callq 0x90d0
mulsd 0x8e28(%rip), %xmm0     # 0x69048
movsd 0x8e28(%rip), %xmm1     # 0x69050
divsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd 0x8e10(%rip), %xmm0     # 0x69048
leaq -0x88(%rbp), %r15
leaq -0xa8(%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 0x43dce
movq 0x8(%rbx), %rcx
movl 0x28(%rbx), %edx
incl %edx
jne 0x60289
leaq 0x38(%rcx), %rdx
jmp 0x602ea
movq 0x8(%rcx), %rcx
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
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, %rsi     # imm = 0x2128
leaq (%rcx,%rsi), %rdx
addq $0x38, %rdx
addq %rsi, %rcx
movslq 0x14(%rbx), %rsi
movsd (%rdx), %xmm0
movsd 0x8(%rdx), %xmm1
imulq $0x178, %rsi, %rdx      # imm = 0x178
subsd -0xc8(%rdx,%rcx), %xmm0
subsd -0xc0(%rdx,%rcx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq %rax, %rdi
callq 0x675e6
movsd %xmm0, -0x50(%rbp)
callq 0x43dce
movq (%rbx), %rcx
movsd 0x1830(%rcx), %xmm0
movq %rax, %rdi
callq 0x675e6
addsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movq (%rbx), %rax
cmpb $0x0, 0x1b1(%rax)
jne 0x60368
cmpb $0x1, 0x1b0(%rax)
jne 0x6042b
callq 0x49360
movsd 0x3018(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x49360
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 0x49360
movsd 0x3178(%rax), %xmm0
addsd %xmm0, %xmm0
ucomisd -0x60(%rbp), %xmm0
movq 0x8(%rbx), %rdi
jbe 0x603ec
movl 0x28(%rbx), %edx
movl %edx, %eax
incl %eax
jne 0x6046d
cmpl $0x0, 0x48(%rdi)
movq %rdi, %rcx
jne 0x604db
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x605c2
movl 0x28(%rbx), %edx
cmpl %edx, 0x70(%rdi)
jle 0x605f7
cmpb $0x0, 0x36(%rbx)
jne 0x605f7
cmpb $0x1, 0x2c(%rbx)
jne 0x605f7
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x80(%rdi)
addq $0x30, %rdi
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
jmp 0x605f2
cmpb $0x1, 0x1b2(%rax)
jne 0x6039a
callq 0x49360
movsd 0x3018(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x49360
movsd -0x60(%rbp), %xmm0
mulsd 0x30e0(%rax), %xmm0
mulsd 0xa15c(%rip), %xmm0     # 0x6a5c0
movapd %xmm0, %xmm1
jmp 0x6038c
movq 0x8(%rdi), %rcx
movslq %eax, %rsi
imulq $0x66666667, %rsi, %r8  # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x22, %r8
addl %r9d, %r8d
addl %r8d, %r8d
leal (%r8,%r8,4), %r8d
movl 0x14b90(%rcx), %r9d
subl %esi, %r8d
leal (%r9,%r8), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %r8  # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x22, %r8
addl %r9d, %r8d
addl %r8d, %r8d
leal (%r8,%r8,4), %r8d
subl %r8d, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
cmpl $0x0, 0x48(%rcx,%rsi)
je 0x605c2
addq %rsi, %rcx
movslq 0x14(%rbx), %rax
movsd 0x38(%rcx), %xmm0
movsd 0x40(%rcx), %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
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x49360
movsd 0x3178(%rax), %xmm0
addsd 0xd1ec(%rip), %xmm0     # 0x6d718
ucomisd -0x60(%rbp), %xmm0
jbe 0x605ac
movq 0x8(%rbx), %rdi
movl 0x28(%rbx), %edx
movl %edx, %eax
movq %rdi, %rsi
incl %eax
je 0x605a6
movq 0x8(%rdi), %rcx
movslq %eax, %rsi
imulq $0x66666667, %rsi, %r8  # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x22, %r8
addl %r9d, %r8d
addl %r8d, %r8d
leal (%r8,%r8,4), %r8d
movl 0x14b90(%rcx), %r9d
subl %esi, %r8d
leal (%r9,%r8), %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %r8  # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x22, %r8
addl %r9d, %r8d
addl %r8d, %r8d
leal (%r8,%r8,4), %r8d
subl %r8d, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rcx, %rsi
cmpl $0x1, 0x48(%rsi)
je 0x605c2
cmpb $0x0, 0x36(%rbx)
jne 0x605f7
cmpb $0x1, 0x2c(%rbx)
jne 0x605f7
movq 0x8(%rbx), %rdi
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %eax
movl 0x70(%rdi), %ecx
cmpl %eax, %ecx
jg 0x605d8
movsd 0x80(%rdi), %xmm0
ucomisd -0x50(%rbp), %xmm0
jbe 0x60609
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x80(%rdi)
addq $0x30, %rdi
movsd 0x20(%rbx), %xmm0
leaq -0x40(%rbp), %rsi
callq 0xf53c
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ecx, %ecx
je 0x605f7
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
subsd 0x60(%rdi), %xmm1
subsd 0x68(%rdi), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x605f7
cmpb $0x1, 0x34(%rbx)
je 0x605d8
jmp 0x605f7
movsd %xmm1, -0x80(%rbp)
movsd %xmm0, -0x68(%rbp)
jmp 0x5fbfa