// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::BallPossessionAnalyse()
void Strategy::BallPossessionAnalyse() {
  const std::vector<Unum> &p2b =
      mInfoState.GetPositionInfo().GetClosePlayerToBall();
  const PlayerState &self = mAgent.GetSelf();
  BallState &ball = mAgent.World().Ball();

  //假设ball_free，拦截计算
  mIsBallFree = true;
  if (ServerParam::instance().pitchRectanglar().IsWithin(ball.GetPos())) {
    Ray ballcourse(ball.GetPos(), ball.GetVel().Dir());
    Vector outpos;
    if (ServerParam::instance().pitchRectanglar().Intersection(ballcourse,
                                                               outpos)) {
      double distance = outpos.Dist(ball.GetPos());
      mBallOutCycle = (int)ServerParam::instance().GetBallCycle(
          ball.GetVel().Mod(), distance);
    } else {
      mBallOutCycle = 0; // 可能没有交点，比如ball位置的x坐标正好为52.5
    }
  } else {
    mBallOutCycle = 0;
  }
  mController = self.GetUnum();

  //分析谁拿球
  //这里对场上所有其他队员计算拦截时都考虑了cyc_delay,得到的拦截周期是最小拦截周期,
  //认为自己该去拿球的情况是,最快的对手不比自己快太多,最快的队友是自己(暂时不考虑buf)

  const std::vector<OrderedIT> &OIT = mInfoState.GetInterceptInfo().GetOIT();
  std::vector<OrderedIT>::const_iterator it,
      itr_NULL = OIT.end(), pMyInfo = itr_NULL, pTmInfo = itr_NULL,
      pOppInfo = itr_NULL;

  mBallFreeCycleLeft = 150;

  for (it = OIT.begin(); it != OIT.end(); ++it) {
    if (it->mUnum < 0) {
      if (it->mUnum == -mWorldState.GetOpponentGoalieUnum())
        continue; //这里认为对方守门员不会去抢球，否则截球里面就不去抢打身后的球了
      if (it->mpInterceptInfo->mMinCycle < mMinOppInterCycle) {
        if (it->mCycleDelay < 16) {
          mMinOppInterCycle = it->mpInterceptInfo->mMinCycle;
          mBallFreeCycleLeft = Min(
              mBallFreeCycleLeft,
              int(mMinOppInterCycle +
                  it->mCycleDelay * 0.5)); // mOppMinInterCycle + it->cd *
                                           // 0.5是对截球周期的一个权衡的估计
          mFastestOpp = -it->mUnum;
        }
      }
      if (it->mpInterceptInfo->mMinCycle + it->mCycleDelay <
          mSureOppInterCycle) {
        mSureOppInterCycle =
            int(it->mpInterceptInfo->mMinCycle + it->mCycleDelay);
        mSureOpp = -it->mUnum;
        pOppInfo = it;
        if (!mWorldState.GetOpponent(mSureOpp).IsBodyDirValid() &&
            mWorldState.GetOpponent(mSureOpp).GetVel().Mod() <
                0.26) { //无法估计身体方向
          mSureOppInterCycle += 1;
        }
      }
    } else {
      if (it->mUnum == self.GetUnum()) {
        mMyInterCycle = it->mpInterceptInfo->mMinCycle;
        mBallFreeCycleLeft = Min(mBallFreeCycleLeft, mMyInterCycle);
        pMyInfo = it;
      } else {
        if (it->mpInterceptInfo->mMinCycle < mMinTmInterCycle) {
          mMinTmInterCycle = it->mpInterceptInfo->mMinCycle;
          mBallFreeCycleLeft =
              Min(mBallFreeCycleLeft,
                  int(mMinTmInterCycle + it->mCycleDelay * 0.5));
          mFastestTm = it->mUnum;
        }
        if (it->mpInterceptInfo->mMinCycle + it->mCycleDelay <
            mSureTmInterCycle) {
          mSureTmInterCycle =
              int(it->mpInterceptInfo->mMinCycle + it->mCycleDelay);
          mSureTm = it->mUnum;
          pTmInfo = it;
          if (!mWorldState.GetTeammate(mSureTm).IsBodyDirValid() &&
              mWorldState.GetTeammate(mSureTm).GetVel().Mod() <
                  0.26) { //无法估计身体方向
            mSureTmInterCycle += 1;
          }
        }
      }
    }
  }

  mSureInterCycle = Min(mSureOppInterCycle, mSureTmInterCycle);
  mSureInterCycle = Min(mSureInterCycle, mMyInterCycle);

  mMinIntercCycle = Min(mMinOppInterCycle, mMinTmInterCycle);
  mMinIntercCycle = Min(mMyInterCycle, mMinIntercCycle);

  if (mSureTm == 0) {
    mSureTm = mSelfState.GetUnum();
    mSureTmInterCycle = mMyInterCycle;
    mMinTmInterCycle = mMyInterCycle;
    mFastestTm = mSureTm;
  }

  if (mAgent.IsLastActiveBehaviorInActOf(BT_Dribble) &&
      mAgent.GetLastActiveBehaviorInAct()->mDetailType == BDT_Dribble_Fast &&
      (!mIsLastBallFree || mMyInterCycle < mSureInterCycle + 6 ||
       mWorldState.CurrentTime() - mLastBallFreeTime < 8)) {
    mController = mSelfState.GetUnum();
    if (pMyInfo != itr_NULL) {
      mBallInterPos = ball.GetPredictedPos(mMyInterCycle);
    }
  } else if (/*mMyInterCycle < mBallOutCycle + 2 &&*/ mMyInterCycle <=
             mSureInterCycle) { //自己是最快截到球的人
    mController = self.GetUnum();
    if (pTmInfo != itr_NULL && pTmInfo->mCycleDelay < 3) { // 2004_10
      if (IsMyControl()) {
        if (mSureTmInterCycle <= mMyInterCycle &&
            mMyInterCycle <= mSureOppInterCycle) {
          if (mWorldState.GetTeammate(mSureTm).GetVelDelay() == 0 ||
              (mWorldState.GetTeammate(mSureTm).GetPosDelay() == 0 &&
               mInfoState.GetPositionInfo().GetPlayerDistToPlayer(
                   mSureTm, mSelfState.GetUnum()) <
                   ServerParam::instance().visibleDistance() - 0.5)) {
            Vector ball_int_pos = mBallState.GetPredictedPos(mSureTmInterCycle);
            Vector pos = mWorldState.GetTeammate(mSureTm).GetPos();
            if (pos.Dist(ball_int_pos) <
                mWorldState.GetTeammate(mSureTm).GetKickableArea() -
                    Dasher::GETBALL_BUFFER) {
              mController = mSureTm;
            } else {
              Vector vel = mWorldState.GetTeammate(mSureTm).GetVel();
              double speed =
                  vel.Mod() * Cos(vel.Dir() - (ball_int_pos - pos).Dir());
              if (speed >
                  mWorldState.GetTeammate(mSureTm).GetEffectiveSpeedMax() *
                      mWorldState.GetTeammate(mSureTm).GetDecay() *
                      0.9) { //队友正在截球
                mController = mSureTm;
              }
            }
          }
        } else if (mSureTmInterCycle < mMyInterCycle &&
                   mMyInterCycle <= mMinOppInterCycle) {
          mController = mSureTm;
        }
      }
    }

    if (mController == mSelfState.GetUnum()) {
      if (pMyInfo != itr_NULL) {
        mBallInterPos = ball.GetPredictedPos(mMyInterCycle);
      } else if (mWorldState.CurrentTime().T() > 0) {
        PRINT_ERROR("bug here?");
      }
    } else {
      mBallInterPos = ball.GetPredictedPos(mSureTmInterCycle);
      mController = mSureTm;
    }
  } else { //自己拿不到球了,看看队友如何
    if (pTmInfo != itr_NULL &&
        mSureTmInterCycle <= mSureInterCycle) { //有可能拿到
      mBallInterPos = ball.GetPredictedPos(mSureTmInterCycle);
      mController = mSureTm;
    } else {
      if (pOppInfo != itr_NULL) {
        mBallInterPos = ball.GetPredictedPos(mSureOppInterCycle);
        mController = -mSureOpp;
      } else {
        if (mMinIntercCycle >
            mBallOutCycle + 5) { // because ball will be out of field
          mBallInterPos = ball.GetPredictedPos(mBallOutCycle);
          mController = 0;
        } else {
          mController = mSelfState.GetUnum();
          mBallInterPos = ball.GetPredictedPos(mMyInterCycle);
        }
      }
    }
  }

  int kickable_player =
      mInfoState.GetPositionInfo().GetTeammateWithBall(); //这里没有考虑buffer
  if (kickable_player == 0) {
    kickable_player = -mInfoState.GetPositionInfo()
                           .GetOpponentWithBall(); //这里没有考虑buffer
  }

  if (kickable_player != 0) {
    mController = kickable_player;
    mIsBallFree = false;
    mBallOutCycle = 1000;
  }

  //下面判断可踢情况
  //先判断能踢到球的队员
  //过程:看能踢到球的自己人有几个,多于一个按规则决定是谁踢,得到是否自己可以踢球,存为_pMem->ball_kickable
  //规则:球离谁基本战位点谁踢
  if (self.IsKickable()) {
    mController = self.GetUnum();
    mIsBallFree = false;
    mSureInterCycle = 0;
    mMinIntercCycle = 0;
    mMyInterCycle = 0;
    mMinTmInterCycle = 0;
    mSureTmInterCycle = 0;
    mBallInterPos = ball.GetPos();
    mBallFreeCycleLeft = 0;
    mIsBallActuralKickable = true;
    mChallenger = mInfoState.GetPositionInfo().GetOpponentWithBall();

    if (!mSelfState.IsGoalie()) {
      double self_pt_dis =
          mAgent.GetFormation()
              .GetTeammateFormationPoint(self.GetUnum(), ball.GetPos())
              .Dist2(ball.GetPos());

      for (unsigned int i = 0; i < p2b.size(); ++i) {
        Unum unum = p2b[i];
        if (unum > 0 && unum != self.GetUnum()) {
          if (mWorldState.GetPlayer(unum).IsKickable()) {
            if(mWorldState.GetPlayMode() != PM_Play_On && mWorldState.GetPlayer(unum).IsGoalie()/*&& unum == PlayerParam::instance().ourGoalieUnum()*/){
              mAgent.Self().UpdateKickable(
                  false); //非playon时如果守门员可踢把自己强行设置成不可踢
              mController = unum;
              break;
            }
            double tm_pt_dis =
                mAgent.GetFormation()
                    .GetTeammateFormationPoint(unum, ball.GetPos())
                    .Dist2(ball.GetPos());
            if (tm_pt_dis < self_pt_dis) {
              mAgent.Self().UpdateKickable(false);
              mController = unum;
              break;
            }
          } else { //可以认为其他人踢不到了
            break;
          }
        }
      }
    }
  } else if (kickable_player != 0 &&
             kickable_player != self.GetUnum()) { //自己踢不到球,但有人可以
    mIsBallFree = false;
    if (kickable_player > 0) { //自己人可踢
      mChallenger = mInfoState.GetPositionInfo().GetOpponentWithBall();
    }
  }

  SetPlayAnalyse(); //最后分析，作为修正
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x3c14e
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0xcd42
movq %rax, %r15
movq 0x10(%rbx), %rax
movq 0x18(%rax), %r12
movb $0x1, 0x41(%rbx)
callq 0x3db2c
leaq 0x37f0(%rax), %rdi
leaq 0x38(%r12), %r13
movabsq $0x3ed92a737110e454, %rax # imm = 0x3ED92A737110E454
leaq -0xc0(%rbp), %rdx
movq %rax, (%rdx)
movq %r13, %rsi
callq 0x12516
testb %al, %al
movq %r12, -0x60(%rbp)
movq %r13, -0x70(%rbp)
movq %r14, -0xa0(%rbp)
je 0x3fe82
leaq 0x60(%r12), %rdi
callq 0xcd30
movupd (%r13), %xmm1
leaq -0xc0(%rbp), %r13
movapd %xmm1, (%r13)
movsd %xmm0, 0x10(%r13)
xorpd %xmm0, %xmm0
leaq -0x90(%rbp), %r12
movapd %xmm0, (%r12)
callq 0x3db2c
leaq 0x37f0(%rax), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x23a4e
xorl %ecx, %ecx
testb %al, %al
je 0x3fe76
movsd -0x90(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
movq -0x60(%rbp), %r13
subsd 0x38(%r13), %xmm0
subsd 0x40(%r13), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
leaq -0xd0(%rbp), %r12
movsd %xmm0, (%r12)
callq 0x3db2c
movsd 0x60(%r13), %xmm0
movsd 0x68(%r13), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
leaq -0xc8(%rbp), %rsi
movsd %xmm0, (%rsi)
movq %rax, %rdi
movq %r12, %rdx
callq 0x40d3a
cvttsd2si %xmm0, %ecx
movl %ecx, 0xa0(%rbx)
movq -0x60(%rbp), %r12
jmp 0x3fe89
andl $0x0, 0xa0(%rbx)
leaq 0x30(%r12), %rax
movq %rax, -0x40(%rbp)
movl 0x11c(%r15), %eax
movl %eax, 0x48(%rbx)
movq 0x30(%rbx), %rdi
callq 0x24506
movq 0xc88(%rax), %r12
movl $0x96, 0x44(%rbx)
movq 0xc80(%rax), %rax
movq %r15, -0x38(%rbp)
movl 0x11c(%r15), %edx
movq 0x18(%rbx), %rdi
leaq 0xa8(%rdi), %rcx
movq %rcx, -0x78(%rbp)
leaq 0x10d0(%rdi), %rcx
movq %rcx, -0x68(%rbp)
movl 0x68(%rbx), %r14d
movl 0x7c(%rbx), %r15d
movl 0x6c(%rbx), %ecx
movl %ecx, -0x30(%rbp)
movl 0x80(%rbx), %r9d
movl $0x96, %r10d
movsd 0x17946(%rip), %xmm0    # 0x57848
movsd 0x1836e(%rip), %xmm1    # 0x58278
movsd 0x17d86(%rip), %xmm2    # 0x57c98
movq %r12, -0x48(%rbp)
movq %r12, -0x50(%rbp)
movq %r12, -0x58(%rbp)
cmpq %r12, %rax
je 0x400d1
movslq 0x8(%rax), %r8
testq %r8, %r8
js 0x3ff58
movq (%rax), %rcx
movl 0x74(%rcx), %r11d
cmpl %edx, %r8d
jne 0x4002d
movl %r11d, 0x64(%rbx)
cmpl %r10d, %r11d
cmovll %r11d, %r10d
movl %r10d, 0x44(%rbx)
movq %rax, -0x58(%rbp)
jmp 0x400c8
movl 0x2114(%rdi), %ecx
addl %r8d, %ecx
je 0x400c8
movq (%rax), %rcx
movl 0x74(%rcx), %r11d
cmpl -0x30(%rbp), %r11d
setl %sil
movl 0xc(%rax), %ecx
cmpl $0x10, %ecx
setl %r13b
andb %sil, %r13b
cmpb $0x1, %r13b
jne 0x3ffb9
movl %r11d, 0x6c(%rbx)
cvtsi2sd %r11d, %xmm3
cvtsi2sd %ecx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %esi
cmpl %esi, %r10d
cmovgel %esi, %r10d
movl %r10d, 0x44(%rbx)
movl %r8d, %esi
negl %esi
movl %esi, 0x78(%rbx)
movl %r11d, -0x30(%rbp)
addl %r11d, %ecx
cmpl %r9d, %ecx
jge 0x400c8
movl %ecx, 0x80(%rbx)
movl %r8d, %esi
negl %esi
movl %esi, 0x8c(%rbx)
notl %r8d
imulq $0x178, %r8, %r8        # imm = 0x178
movq -0x68(%rbp), %rsi
movsd 0xc0(%rsi,%r8), %xmm3
ucomisd %xmm1, %xmm3
ja 0x40021
addq %rsi, %r8
movsd 0x30(%r8), %xmm3
movsd 0x38(%r8), %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm3, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x40021
incl %ecx
movl %ecx, 0x80(%rbx)
movl %ecx, %r9d
movq %rax, -0x48(%rbp)
jmp 0x400c8
cmpl %r14d, %r11d
jge 0x40062
cvtsi2sd %r11d, %xmm3
movl %r11d, 0x68(%rbx)
movl 0xc(%rax), %ecx
cvtsi2sd %ecx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %esi
cmpl %esi, %r10d
cmovgel %esi, %r10d
movl %r10d, 0x44(%rbx)
movl %r8d, 0x74(%rbx)
movl %r11d, %r14d
jmp 0x40065
movl 0xc(%rax), %ecx
addl %r11d, %ecx
cmpl %r15d, %ecx
jge 0x400c8
movl %ecx, 0x7c(%rbx)
movl %r8d, 0x88(%rbx)
imulq $0x178, %r8, %r8        # imm = 0x178
movq -0x78(%rbp), %rsi
movsd -0xb8(%r8,%rsi), %xmm3
ucomisd %xmm1, %xmm3
ja 0x400c1
addq %r8, %rsi
addq $-0x178, %rsi           # imm = 0xFE88
movsd 0x30(%rsi), %xmm3
movsd 0x38(%rsi), %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm3, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x400c1
incl %ecx
movl %ecx, 0x7c(%rbx)
movl %ecx, %r15d
movq %rax, -0x50(%rbp)
addq $0x10, %rax
jmp 0x3ff1e
cmpl %r9d, %r15d
cmovll %r15d, %r9d
movl 0x64(%rbx), %esi
cmpl %r9d, %esi
cmovll %esi, %r9d
movl -0x30(%rbp), %eax
cmpl %eax, %r14d
cmovll %r14d, %eax
cmpl %esi, %eax
cmovgel %esi, %eax
movl %r9d, 0x84(%rbx)
movl %eax, 0x70(%rbx)
cmpl $0x0, 0x88(%rbx)
jne 0x4011d
movq 0x28(%rbx), %rax
movl 0x11c(%rax), %eax
movl %eax, 0x88(%rbx)
movl %esi, 0x7c(%rbx)
movl %esi, 0x68(%rbx)
movl %eax, 0x74(%rbx)
movq 0x10(%rbx), %rax
movq 0xc0(%rax), %rax
testq %rax, %rax
movq -0xa0(%rbp), %r15
je 0x40190
cmpl $0x5, (%rax)
jne 0x40190
cmpl $0x5, 0x98(%rax)
jne 0x40190
cmpb $0x1, 0x50(%rbx)
jne 0x40163
addl $0x6, %r9d
cmpl %r9d, %esi
jl 0x40163
addq $0x10, %rdi
leaq 0x54(%rbx), %rsi
callq 0x4770c
cmpl $0x8, %eax
jge 0x40186
movq 0x28(%rbx), %rax
movl 0x11c(%rax), %eax
movl %eax, 0x48(%rbx)
cmpq %r12, -0x58(%rbp)
movq -0x38(%rbp), %r12
je 0x404cb
movl 0x64(%rbx), %esi
jmp 0x4044a
movl 0x64(%rbx), %esi
movl 0x84(%rbx), %r9d
cmpl %r9d, %esi
movq -0x50(%rbp), %rcx
jle 0x401dc
cmpq %r12, %rcx
je 0x401aa
movl 0x7c(%rbx), %eax
cmpl %r9d, %eax
jle 0x40400
cmpq %r12, -0x48(%rbp)
je 0x4040b
movl 0x80(%rbx), %esi
movq -0x40(%rbp), %rdi
callq 0xd4c0
movupd (%rax), %xmm0
movupd %xmm0, 0x90(%rbx)
xorl %eax, %eax
subl 0x8c(%rbx), %eax
jmp 0x404c4
movq -0x38(%rbp), %rax
movl 0x11c(%rax), %eax
movl %eax, 0x48(%rbx)
cmpq %r12, %rcx
je 0x40473
cmpl $0x2, 0xc(%rcx)
jg 0x40473
movq 0x10(%rbx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x40473
movl 0x7c(%rbx), %eax
cmpl %esi, %eax
jg 0x40461
cmpl 0x80(%rbx), %esi
jg 0x40461
movq 0x18(%rbx), %rcx
movslq 0x88(%rbx), %rdx
imulq $0x178, %rdx, %rdx      # imm = 0x178
cmpl $0x0, -0x90(%rdx,%rcx)
je 0x4029d
leaq (%rdx,%rcx), %rax
addq $-0xd0, %rax
cmpl $0x0, 0x18(%rax)
jne 0x40473
movq 0x30(%rbx), %rdi
callq 0x244e8
movl 0x88(%rbx), %esi
movq 0x28(%rbx), %rcx
movl 0x11c(%rcx), %edx
movq %rax, %rdi
callq 0x3ba96
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x3db2c
movsd 0x3178(%rax), %xmm0
addsd 0x16dd1(%rip), %xmm0    # 0x57060
ucomisd -0x30(%rbp), %xmm0
jbe 0x40473
movl 0x7c(%rbx), %eax
movq 0x20(%rbx), %rdi
movl %eax, %esi
callq 0xd4c0
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm2
movq 0x18(%rbx), %rax
movslq 0x88(%rbx), %rcx
imulq $0x178, %rcx, %rcx      # imm = 0x178
leaq (%rcx,%rax), %rdi
addq $-0xd0, %rdi
movsd 0x8(%rdi), %xmm0
movsd 0x10(%rdi), %xmm3
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0x50(%rbp)
subsd %xmm1, %xmm0
movsd %xmm3, -0x48(%rbp)
movapd %xmm3, %xmm1
movsd %xmm2, -0x78(%rbp)
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq (%rdi), %rax
callq *0x10(%rax)
movsd (%rax), %xmm0
leaq 0x371fa(%rip), %rax     # 0x77518
subsd (%rax), %xmm0
ucomisd -0x30(%rbp), %xmm0
ja 0x4046a
movq 0x18(%rbx), %rax
movslq 0x88(%rbx), %rcx
imulq $0x178, %rcx, %rcx      # imm = 0x178
movups -0xa0(%rax,%rcx), %xmm0
leaq -0xc0(%rbp), %rdi
movaps %xmm0, (%rdi)
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xcd30
movsd %xmm0, -0x98(%rbp)
movsd -0x50(%rbp), %xmm0
subsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
subsd -0x48(%rbp), %xmm1
leaq -0x90(%rbp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm1, 0x8(%rdi)
callq 0xcd30
movsd -0x98(%rbp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x16cef(%rip), %xmm1    # 0x570a8
divsd 0x16ca7(%rip), %xmm1    # 0x57068
movapd %xmm1, %xmm0
callq 0x9940
mulsd -0x30(%rbp), %xmm0
movq 0x18(%rbx), %rcx
movslq 0x88(%rbx), %rax
imulq $0x178, %rax, %rdx      # imm = 0x178
movsd -0x70(%rdx,%rcx), %xmm1
mulsd -0x78(%rdx,%rcx), %xmm1
mulsd 0x1a6fb(%rip), %xmm1    # 0x5aaf0
ucomisd %xmm1, %xmm0
jbe 0x40473
movl %eax, 0x48(%rbx)
jmp 0x40473
movq -0x40(%rbp), %rdi
movl %eax, %esi
jmp 0x404ad
movl 0xa0(%rbx), %eax
leal 0x5(%rax), %ecx
cmpl %ecx, 0x70(%rbx)
movq -0x38(%rbp), %r12
jle 0x4043d
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0xd4c0
movupd (%rax), %xmm0
movupd %xmm0, 0x90(%rbx)
andl $0x0, 0x48(%rbx)
jmp 0x404cb
movq 0x28(%rbx), %rax
movl 0x11c(%rax), %eax
movl %eax, 0x48(%rbx)
movq -0x40(%rbp), %rdi
callq 0xd4c0
movupd (%rax), %xmm0
movupd %xmm0, 0x90(%rbx)
jmp 0x404cb
cmpl %esi, %eax
jge 0x40473
cmpl 0x6c(%rbx), %esi
jg 0x40473
movl 0x88(%rbx), %eax
movl %eax, 0x48(%rbx)
movl 0x48(%rbx), %eax
movq 0x28(%rbx), %rcx
cmpl 0x11c(%rcx), %eax
jne 0x404a6
cmpq %r12, -0x58(%rbp)
je 0x406a8
movl 0x64(%rbx), %esi
movq -0x40(%rbp), %rdi
callq 0xd4c0
movupd (%rax), %xmm0
movupd %xmm0, 0x90(%rbx)
jmp 0x404c7
movl 0x7c(%rbx), %esi
movq -0x40(%rbp), %rdi
callq 0xd4c0
movupd (%rax), %xmm0
movupd %xmm0, 0x90(%rbx)
movl 0x88(%rbx), %eax
movl %eax, 0x48(%rbx)
movq -0x38(%rbp), %r12
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x3c73e
testl %eax, %eax
jne 0x404fb
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x3c7c0
testl %eax, %eax
je 0x4069f
negl %eax
movl %eax, 0x48(%rbx)
movb $0x0, 0x41(%rbx)
movl $0x3e8, 0xa0(%rbx)      # imm = 0x3E8
xorl %ecx, %ecx
movl 0x11c(%r12), %edx
cmpb $0x1, 0x128(%r12)
movq -0x70(%rbp), %rsi
jne 0x4066d
movl %edx, 0x48(%rbx)
movb $0x0, 0x41(%rbx)
andl $0x0, 0x84(%rbx)
andl $0x0, 0x70(%rbx)
andq $0x0, 0x64(%rbx)
andl $0x0, 0x7c(%rbx)
movupd (%rsi), %xmm0
movupd %xmm0, 0x90(%rbx)
andl $0x0, 0x44(%rbx)
movb $0x1, 0x40(%rbx)
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x3c7c0
movl %eax, 0x4c(%rbx)
movq 0x28(%rbx), %rax
cmpb $0x0, 0x175(%rax)
jne 0x40728
movq 0x10(%rbx), %rdi
callq 0x10dfe
movl 0x11c(%r12), %esi
movq %rax, %rdi
movq -0x70(%rbp), %rdx
callq 0x20c00
movq -0x60(%rbp), %rax
subsd 0x38(%rax), %xmm0
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
xorl %r14d, %r14d
movl %r14d, %r14d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
jbe 0x40728
movl (%rax,%r14,4), %r13d
testl %r13d, %r13d
jle 0x40665
cmpl 0x11c(%r12), %r13d
je 0x40665
movq 0x18(%rbx), %rax
leal -0x1(%r13), %ecx
imulq $0x178, %rcx, %rcx      # imm = 0x178
cmpb $0x1, 0x1d0(%rax,%rcx)
jne 0x40728
cmpl $0x1, 0x1c(%rax)
je 0x40624
addq $0xa8, %rax
cmpb $0x1, 0x175(%rax,%rcx)
je 0x40714
movq 0x10(%rbx), %rdi
callq 0x10dfe
movq %rax, %rdi
movl %r13d, %esi
movq -0x70(%rbp), %rdx
callq 0x20c00
movq -0x60(%rbp), %rax
subsd 0x38(%rax), %xmm0
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd -0x58(%rbp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x40714
incl %r14d
jmp 0x405bc
cmpl %edx, %eax
sete %dl
orb %dl, %cl
jne 0x40728
movb $0x0, 0x41(%rbx)
testl %eax, %eax
jle 0x40728
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x3c7c0
movl %eax, 0x4c(%rbx)
jmp 0x40728
xorl %eax, %eax
movb $0x1, %cl
jmp 0x4050e
movq 0x18(%rbx), %rax
cmpl $0x0, 0x10(%rax)
movq -0x38(%rbp), %r12
jle 0x404cb
movq 0x3692f(%rip), %rdi     # 0x76ff0
leaq 0x1a441(%rip), %rsi     # 0x5ab09
callq 0x94b0
leaq 0x1aa9e(%rip), %rsi     # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x126, %esi            # imm = 0x126
callq 0x9890
leaq 0x18d2f(%rip), %rsi     # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x17b29(%rip), %rsi     # 0x58228
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
jmp 0x404cb
movq 0x10(%rbx), %rdi
callq 0x10d5e
movb $0x0, 0x128(%rax)
movl %r13d, 0x48(%rbx)
movq %rbx, %rdi
callq 0x4085a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq