// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::MultiCycleKick(Agent const&, int)
ActionPlan Kicker::MultiCycleKick(const Agent &agent, int cycle) {
  Assert(cycle > 1);

  UpdateKickData(agent);

  ActionPlan plan;
  AtomicAction act;

  /** 首先考虑能否先转身再踢，可以就不进行后面的搜索了 */
  act = GetTurnAction(agent);
  if (act.mSucceed == true) {
    plan.mCycle = 2;
    plan.mSucceed = true;
    plan.mActionQueue.clear();
    plan.mActionQueue.push_back(act);
    return plan;
  }

  /** 其次考虑能否先停再转身，再踢 */
  double speed_buf = 0.1;
  int index = -1;
  double turn_max_speed = 0.0;
  double turn_poss = 0.0;
  if (cycle >= 3) {
    act = TurnPlan(agent, index, turn_max_speed);
    if (act.mSucceed == true && index >= 0 &&
        turn_max_speed > mKickSpeed + 0.1) {
      turn_poss =
          mPointEva[index] *
          mSpeedCurve.GetOutput(turn_max_speed - mKickSpeed + speed_buf);
      turn_poss *= 1.2; /** 这里要仔细调下 */
    }
  }

  /** 下面进行多脚踢球的规划 */
  // target及mPoint都是在踢球的最后一个周期的坐标系中
  Vector target =
      mKickTarget -
      mInput.mPlayerVel * ((1 - pow(PlayerParam::instance()
                                        .HeteroPlayer(mInput.mPlayerType)
                                        .playerDecay(),
                                    cycle - 1)) /
                           (1 - PlayerParam::instance()
                                    .HeteroPlayer(mInput.mPlayerType)
                                    .playerDecay()));
  int best = -1;
  double poss = 0.0;
  double max_poss = 0.0;

  int idx = (int)GetNormalizeAngleDeg((target - mInput.mBallPos).Dir(),
                                      -FLOAT_EPS); /** 得到0到359的一个整数 */

  if (cycle < 4 && mMaxSpeedFlag[idx][cycle - 1] == mAgentID) {
    best = NearestPoint(mMaxSpeedOutFirstPos[idx][cycle - 1]);

    // std::cerr << agent.GetSelfUnum() << "@" <<
    // agent.GetWorldState().CurrentTime() << ": good" << std::endl;

    if (best >= 0) {
      poss = mPointEva[best] * mSpeedCurve.GetOutput(mMaxSpeed[idx][cycle - 1] -
                                                     mKickSpeed + speed_buf);
    }
  }

  if (poss < 0.001) {
    // std::cerr << agent.GetSelfUnum() << "@" <<
    // agent.GetWorldState().CurrentTime() << ": no good" << std::endl;

    for (int k = 0, v = cycle - 2, j = NearestPoint(mInput.mBallPos);
         k < POINTS_NUM; ++k) {
      int i =
          (int)(GetNormalizeAngleDeg((target - mPoint[k]).Dir(), -FLOAT_EPS) /
                STEP_KICK_ANGLE);
      if (mPointEva[k] > 0.001 &&
          (double)mKickerValue[v][i][j][k] >
              mKickSpeed - speed_buf) // 要大于期望的出球速度
      {
        // mPoint[k]+mInput.mPlayerVel是mPoint[k]在踢球的第一个周期的坐标系中的位置
        Vector ball_vel = (mPoint[k] + mInput.mPlayerVel - mInput.mBallPos) *
                          ServerParam::instance().ballDecay(); // 踢到k后的球速
        double speed = 0.0;

        if (cycle == 2) // 前向搜索1步
        {
          speed = GetOneKickMaxSpeed(ball_vel, (target - mPoint[k]).Dir(),
                                     mMaxAccel[k]);
        } else // 前向搜索2步
        {
          Vector ball_next = mPoint[k] + ball_vel;
          for (int l = 0; l < POINTS_NUM; ++l) // 从j踢到k，再踢到l
          {
            if (mPoint[l].Dist(ball_next) <
                mMaxAccel[k]) // 保证理论上可以从k踢到l
            {
              // mPoint[l]+PlayerVel*Decay是mPoint[l]在踢球的第二个周期的坐标系中的位置
              Vector ball_vel_next =
                  (mPoint[l] +
                   mInput.mPlayerVel * PlayerParam::instance()
                                           .HeteroPlayer(mInput.mPlayerType)
                                           .playerDecay() -
                   mPoint[k]) *
                  ServerParam::instance().ballDecay();
              if (cycle == 3) {
                speed =
                    Max(speed, GetOneKickMaxSpeed(ball_vel_next,
                                                  (target - mPoint[l]).Dir(),
                                                  mMaxAccel[l]));
              } else if (cycle ==
                         4) // 利用mKickerValue[1]的信息，没必要再前向了
              {
                int t = (int)(GetNormalizeAngleDeg((target - mPoint[l]).Dir(),
                                                   -FLOAT_EPS) /
                              STEP_KICK_ANGLE);
                speed = Max(speed, (double)mKickerValue[1][t][k][l]);
              }
            }
          }
        }

        if (speed > mKickSpeed - speed_buf) {
          poss = mPointEva[k] *
                 mSpeedCurve.GetOutput(speed - mKickSpeed + speed_buf);
        } else {
          poss = 0.0;
        }

        if (poss > max_poss) // 找到poss最大的点
        {
          best = k;
          max_poss = poss;
          // max_speed   = speed;
        }
      }
    }
  }

  if (turn_poss > max_poss) // 转身规划的收益较高
  {
    plan.mCycle = 3;
    plan.mSucceed = true;
    plan.mActionQueue.clear();
    plan.mActionQueue.push_back(act);
    return plan;
  }

  // 不进行转身的规划，进行多脚踢球
  plan.mCycle = cycle;
  plan.mSucceed = false;
  if (best >= 0) {
    act = GetOneKickAction(agent, mInput.mBallPos, mInput.mBallVel,
                           mInput.mPlayerVel + mPoint[best]);
    if (act.mSucceed == true) {
      plan.mSucceed = true;
      plan.mActionQueue.clear();
      plan.mActionQueue.push_back(act);
    }
  }
  return plan;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x6e0, %rsp            # imm = 0x6E0
movq %rdi, -0x378(%rbp)
movq %rdi, %rax
movq %rax, -0x388(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x380(%rbp)
movq -0x18(%rbp), %rsi
callq 0x50020
movq -0x378(%rbp), %rdi
movb $0x0, -0x1d(%rbp)
callq 0x56b60
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x1d620
jmp 0x527ac
movq -0x380(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x555b0
jmp 0x527c5
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x30, %edx
callq 0xa4b0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x5284a
movq -0x378(%rbp), %rdi
movl $0x2, 0x4(%rdi)
movb $0x1, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x390(%rbp)
callq 0x56bf0
movq -0x390(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x56c30
jmp 0x5281a
movb $0x1, -0x1d(%rbp)
movl $0x1, -0x94(%rbp)
jmp 0x53b98
movq -0x378(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x56bd0
jmp 0x53bba
movsd 0x6fcbe(%rip), %xmm0    # 0xc2510
movsd %xmm0, -0xa0(%rbp)
movl $0xffffffff, -0xa4(%rbp) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movsd %xmm0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
cmpl $0x3, -0x1c(%rbp)
jl 0x529d5
movq -0x380(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0xa4(%rbp), %ecx
movsd -0xb0(%rbp), %xmm0
leaq -0xe8(%rbp), %rdi
callq 0x55a50
jmp 0x528ab
leaq -0x50(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movl $0x30, %edx
callq 0xa4b0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x529d3
cmpl $0x0, -0xa4(%rbp)
jl 0x529d3
movq -0x380(%rbp), %rax
movsd -0xb0(%rbp), %xmm0
movsd 0x6fc1b(%rip), %xmm1    # 0xc2510
addsd 0x2b45d0(%rax), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x529d3
movq -0x380(%rbp), %rdi
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0xa4(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xf0(%rbp), %rsi
callq 0x568c0
movq %rax, -0x398(%rbp)
jmp 0x52938
movq -0x380(%rbp), %rax
movq -0x398(%rbp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, -0x3a8(%rbp)
movq %rax, %rdi
addq $0x2b4558, %rdi         # imm = 0x2B4558
movsd -0xb0(%rbp), %xmm0
movsd 0x2b45d0(%rax), %xmm1
subsd %xmm1, %xmm0
movsd -0xa0(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xf8(%rbp)
leaq -0xf8(%rbp), %rsi
movl $0x1, %edx
callq 0x56d70
movsd %xmm0, -0x3a0(%rbp)
jmp 0x5299f
movsd -0x3a0(%rbp), %xmm1
movsd -0x3a8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd 0x6fd45(%rip), %xmm0    # 0xc2708
mulsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
jmp 0x529d5
movq -0x380(%rbp), %rax
movq %rax, %rcx
addq $0x2b45d8, %rcx         # imm = 0x2B45D8
movq %rcx, -0x3c0(%rbp)
addq $0x2b4598, %rax         # imm = 0x2B4598
movq %rax, -0x3b8(%rbp)
callq 0x798a0
movq %rax, -0x3b0(%rbp)
jmp 0x52a08
movq -0x3b0(%rbp), %rdi
movq -0x380(%rbp), %rsi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, -0x3c8(%rbp)
jmp 0x52a2b
movq -0x3c8(%rbp), %rdi
callq 0x12fe0
movq %rax, -0x3d0(%rbp)
jmp 0x52a40
movq -0x3d0(%rbp), %rax
movsd (%rax), %xmm0
movl -0x1c(%rbp), %edi
decl %edi
callq 0x56920
movsd %xmm0, -0x3d8(%rbp)
jmp 0x52a5f
movsd -0x3d8(%rbp), %xmm1
movsd 0x6e5a1(%rip), %xmm0    # 0xc1010
subsd %xmm1, %xmm0
movsd %xmm0, -0x3e8(%rbp)
callq 0x798a0
movq %rax, -0x3e0(%rbp)
jmp 0x52a89
movq -0x3e0(%rbp), %rdi
movq -0x380(%rbp), %rsi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, -0x3f0(%rbp)
jmp 0x52aac
movq -0x3f0(%rbp), %rdi
callq 0x12fe0
movq %rax, -0x3f8(%rbp)
jmp 0x52ac1
movq -0x3b8(%rbp), %rdi
movsd -0x3e8(%rbp), %xmm0
movq -0x3f8(%rbp), %rax
movsd (%rax), %xmm2
movsd 0x6e52d(%rip), %xmm1    # 0xc1010
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x120(%rbp)
leaq -0x120(%rbp), %rsi
callq 0x13320
movsd %xmm1, -0x408(%rbp)
movsd %xmm0, -0x400(%rbp)
jmp 0x52b11
movq -0x3c0(%rbp), %rdi
movsd -0x408(%rbp), %xmm0
movsd -0x400(%rbp), %xmm1
movsd %xmm1, -0x118(%rbp)
movsd %xmm0, -0x110(%rbp)
leaq -0x118(%rbp), %rsi
callq 0x110a0
movsd %xmm1, -0x418(%rbp)
movsd %xmm0, -0x410(%rbp)
jmp 0x52b56
movq -0x380(%rbp), %rsi
movsd -0x418(%rbp), %xmm0
movsd -0x410(%rbp), %xmm1
movsd %xmm1, -0x108(%rbp)
movsd %xmm0, -0x100(%rbp)
movl $0xffffffff, -0x124(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x130(%rbp)
movq $0x0, -0x138(%rbp)
addq $0x2b45b0, %rsi         # imm = 0x2B45B0
leaq -0x108(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x428(%rbp)
movsd %xmm0, -0x420(%rbp)
jmp 0x52bc2
movsd -0x428(%rbp), %xmm0
movsd -0x420(%rbp), %xmm1
movsd %xmm1, -0x150(%rbp)
movsd %xmm0, -0x148(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x430(%rbp)
jmp 0x52bf8
movsd -0x430(%rbp), %xmm0
movabsq $-0x4126d58c8eef1bac, %rax # imm = 0xBED92A737110E454
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x116b0
movsd %xmm0, -0x438(%rbp)
jmp 0x52c27
movsd -0x438(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x13c(%rbp)
xorl %eax, %eax
cmpl $0x4, -0x1c(%rbp)
movb %al, -0x439(%rbp)
jge 0x52ccf
movq -0x380(%rbp), %rdi
addq $0x2b5010, %rdi         # imm = 0x2B5010
movslq -0x13c(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x160(%rbp), %rsi
callq 0x56950
movq %rax, -0x448(%rbp)
jmp 0x52c7c
movq -0x448(%rbp), %rdi
movl -0x1c(%rbp), %eax
decl %eax
cltq
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %rsi
callq 0x56970
movq %rax, -0x450(%rbp)
jmp 0x52ca6
movq -0x380(%rbp), %rsi
movq -0x450(%rbp), %rdi
callq 0x56cf0
movb %al, -0x451(%rbp)
jmp 0x52cc1
movb -0x451(%rbp), %al
movb %al, -0x439(%rbp)
jmp 0x52ccf
movb -0x439(%rbp), %al
testb $0x1, %al
jne 0x52cde
jmp 0x52e8e
movq -0x380(%rbp), %rdi
addq $0x2bf8d0, %rdi         # imm = 0x2BF8D0
movslq -0x13c(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x170(%rbp), %rsi
callq 0x56b20
movq %rax, -0x460(%rbp)
jmp 0x52d0f
movq -0x460(%rbp), %rdi
movl -0x1c(%rbp), %eax
decl %eax
cltq
movq %rax, -0x178(%rbp)
leaq -0x178(%rbp), %rsi
callq 0x56b40
movq %rax, -0x468(%rbp)
jmp 0x52d39
movq -0x468(%rbp), %rsi
movq -0x380(%rbp), %rdi
callq 0x57110
movl %eax, -0x46c(%rbp)
jmp 0x52d54
movl -0x46c(%rbp), %eax
movl %eax, -0x124(%rbp)
cmpl $0x0, -0x124(%rbp)
jl 0x52e8c
movq -0x380(%rbp), %rdi
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x124(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x180(%rbp), %rsi
callq 0x568c0
movq %rax, -0x478(%rbp)
jmp 0x52d9e
movq -0x380(%rbp), %rdi
movq -0x478(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x490(%rbp)
movq %rdi, %rax
addq $0x2b4558, %rax         # imm = 0x2B4558
movq %rax, -0x488(%rbp)
addq $0x2b9390, %rdi         # imm = 0x2B9390
movslq -0x13c(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x190(%rbp), %rsi
callq 0x568e0
movq %rax, -0x480(%rbp)
jmp 0x52df2
movq -0x480(%rbp), %rdi
movl -0x1c(%rbp), %eax
decl %eax
cltq
movq %rax, -0x198(%rbp)
leaq -0x198(%rbp), %rsi
callq 0x4aae0
movq %rax, -0x498(%rbp)
jmp 0x52e1c
movq -0x488(%rbp), %rdi
movq -0x380(%rbp), %rax
movq -0x498(%rbp), %rcx
movsd (%rcx), %xmm0
movsd 0x2b45d0(%rax), %xmm1
subsd %xmm1, %xmm0
movsd -0xa0(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
leaq -0x188(%rbp), %rsi
movl $0x1, %edx
callq 0x56d70
movsd %xmm0, -0x4a0(%rbp)
jmp 0x52e70
movsd -0x4a0(%rbp), %xmm1
movsd -0x490(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
jmp 0x52e8e
movsd 0x6f23a(%rip), %xmm0    # 0xc20d0
ucomisd -0x130(%rbp), %xmm0
jbe 0x539db
movq -0x380(%rbp), %rdi
movl $0x0, -0x19c(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x2, %eax
movl %eax, -0x1a0(%rbp)
movq %rdi, %rsi
addq $0x2b45b0, %rsi         # imm = 0x2B45B0
callq 0x57110
movl %eax, -0x4a4(%rbp)
jmp 0x52ed8
movl -0x4a4(%rbp), %eax
movl %eax, -0x1a4(%rbp)
cmpl $0x51, -0x19c(%rbp)
jge 0x539d9
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x19c(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1c0(%rbp), %rsi
callq 0x56650
movq %rax, -0x4b0(%rbp)
jmp 0x52f1f
movq -0x4b0(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x4c0(%rbp)
movsd %xmm0, -0x4b8(%rbp)
jmp 0x52f44
movsd -0x4c0(%rbp), %xmm0
movsd -0x4b8(%rbp), %xmm1
movsd %xmm1, -0x1b8(%rbp)
movsd %xmm0, -0x1b0(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x4c8(%rbp)
jmp 0x52f7a
movsd -0x4c8(%rbp), %xmm0
movabsq $-0x4126d58c8eef1bac, %rax # imm = 0xBED92A737110E454
movq %rax, -0x1c8(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x116b0
movsd %xmm0, -0x4d0(%rbp)
jmp 0x52fa9
movq -0x380(%rbp), %rdi
movsd -0x4d0(%rbp), %xmm0
movsd 0x6e738(%rip), %xmm1    # 0xc16f8
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x1a8(%rbp)
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x19c(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x1d0(%rbp), %rsi
callq 0x568c0
movq %rax, -0x4d8(%rbp)
jmp 0x52ff8
movq -0x4d8(%rbp), %rax
movsd (%rax), %xmm0
xorl %eax, %eax
movsd 0x6f0c3(%rip), %xmm1    # 0xc20d0
ucomisd %xmm1, %xmm0
movb %al, -0x4d9(%rbp)
jbe 0x5308a
movq -0x380(%rbp), %rax
movq %rax, %rcx
addq $0x558, %rcx            # imm = 0x558
movslq -0x1a0(%rbp), %rdx
imulq $0xe6a90, %rdx, %rdx    # imm = 0xE6A90
addq %rdx, %rcx
movslq -0x1a8(%rbp), %rdx
imulq $0x6684, %rdx, %rdx     # imm = 0x6684
addq %rdx, %rcx
movslq -0x1a4(%rbp), %rdx
imulq $0x144, %rdx, %rdx      # imm = 0x144
addq %rdx, %rcx
movslq -0x19c(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2b45d0(%rax), %xmm1
subsd -0xa0(%rbp), %xmm1
ucomisd %xmm1, %xmm0
seta %al
movb %al, -0x4d9(%rbp)
movb -0x4d9(%rbp), %al
testb $0x1, %al
jne 0x53099
jmp 0x539c3
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x19c(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x208(%rbp), %rsi
callq 0x56650
movq %rax, -0x4e8(%rbp)
jmp 0x530c7
movq -0x4e8(%rbp), %rdi
movq -0x380(%rbp), %rsi
addq $0x2b4598, %rsi         # imm = 0x2B4598
callq 0x11360
movsd %xmm1, -0x4f8(%rbp)
movsd %xmm0, -0x4f0(%rbp)
jmp 0x530f3
movq -0x380(%rbp), %rsi
movsd -0x4f8(%rbp), %xmm0
movsd -0x4f0(%rbp), %xmm1
movsd %xmm1, -0x200(%rbp)
movsd %xmm0, -0x1f8(%rbp)
addq $0x2b45b0, %rsi         # imm = 0x2B45B0
leaq -0x200(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x508(%rbp)
movsd %xmm0, -0x500(%rbp)
jmp 0x5313f
movsd -0x508(%rbp), %xmm0
movsd -0x500(%rbp), %xmm1
movsd %xmm1, -0x1f0(%rbp)
movsd %xmm0, -0x1e8(%rbp)
callq 0x855e0
movq %rax, -0x510(%rbp)
jmp 0x5316d
movq -0x510(%rbp), %rdi
callq 0x113d0
movq %rax, -0x518(%rbp)
jmp 0x53182
movq -0x518(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x13320
movsd %xmm1, -0x528(%rbp)
movsd %xmm0, -0x520(%rbp)
jmp 0x531a7
movsd -0x528(%rbp), %xmm0
movsd -0x520(%rbp), %xmm1
movsd %xmm1, -0x1e0(%rbp)
movsd %xmm0, -0x1d8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x210(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x532e6
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x19c(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x230(%rbp), %rsi
callq 0x56650
movq %rax, -0x530(%rbp)
jmp 0x5320a
movq -0x530(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x540(%rbp)
movsd %xmm0, -0x538(%rbp)
jmp 0x5322f
movsd -0x540(%rbp), %xmm0
movsd -0x538(%rbp), %xmm1
movsd %xmm1, -0x228(%rbp)
movsd %xmm0, -0x220(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x548(%rbp)
jmp 0x53265
movq -0x380(%rbp), %rdi
movsd -0x548(%rbp), %xmm0
movsd %xmm0, -0x218(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x19c(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x238(%rbp), %rsi
callq 0x568c0
movq %rax, -0x550(%rbp)
jmp 0x532a6
movq -0x550(%rbp), %rcx
movq -0x380(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x218(%rbp), %rdx
callq 0x569c0
movsd %xmm0, -0x558(%rbp)
jmp 0x532d1
movsd -0x558(%rbp), %xmm0
movsd %xmm0, -0x210(%rbp)
jmp 0x538a9
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x19c(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x250(%rbp), %rsi
callq 0x56650
movq %rax, -0x560(%rbp)
jmp 0x53314
movq -0x560(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x11360
movsd %xmm1, -0x570(%rbp)
movsd %xmm0, -0x568(%rbp)
jmp 0x53339
movsd -0x570(%rbp), %xmm0
movsd -0x568(%rbp), %xmm1
movsd %xmm1, -0x248(%rbp)
movsd %xmm0, -0x240(%rbp)
movl $0x0, -0x254(%rbp)
cmpl $0x51, -0x254(%rbp)
jge 0x538a7
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x254(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0x260(%rbp), %rsi
callq 0x56650
movq %rax, -0x578(%rbp)
jmp 0x5339e
movq -0x578(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x1d6d0
movsd %xmm0, -0x580(%rbp)
jmp 0x533bb
movq -0x380(%rbp), %rdi
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x19c(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x268(%rbp), %rsi
callq 0x568c0
movq %rax, -0x588(%rbp)
jmp 0x533ec
movsd -0x580(%rbp), %xmm1
movq -0x588(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x53891
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x254(%rbp), %rax
movq %rax, -0x2a0(%rbp)
leaq -0x2a0(%rbp), %rsi
callq 0x56650
movq %rax, -0x590(%rbp)
jmp 0x53437
movq -0x380(%rbp), %rax
addq $0x2b4598, %rax         # imm = 0x2B4598
movq %rax, -0x5a0(%rbp)
callq 0x798a0
movq %rax, -0x598(%rbp)
jmp 0x53459
movq -0x598(%rbp), %rdi
movq -0x380(%rbp), %rsi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, -0x5a8(%rbp)
jmp 0x5347c
movq -0x5a8(%rbp), %rdi
callq 0x12fe0
movq %rax, -0x5b0(%rbp)
jmp 0x53491
movq -0x5b0(%rbp), %rsi
movq -0x5a0(%rbp), %rdi
callq 0x13320
movsd %xmm1, -0x5c0(%rbp)
movsd %xmm0, -0x5b8(%rbp)
jmp 0x534b6
movq -0x590(%rbp), %rdi
movsd -0x5c0(%rbp), %xmm0
movsd -0x5b8(%rbp), %xmm1
movsd %xmm1, -0x2b0(%rbp)
movsd %xmm0, -0x2a8(%rbp)
leaq -0x2b0(%rbp), %rsi
callq 0x11360
movsd %xmm1, -0x5d0(%rbp)
movsd %xmm0, -0x5c8(%rbp)
jmp 0x534fb
movq -0x380(%rbp), %rdi
movsd -0x5d0(%rbp), %xmm0
movsd -0x5c8(%rbp), %xmm1
movsd %xmm1, -0x298(%rbp)
movsd %xmm0, -0x290(%rbp)
addq $0x48, %rdi
movslq -0x19c(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x2b8(%rbp), %rsi
callq 0x56650
movq %rax, -0x5d8(%rbp)
jmp 0x53549
movq -0x5d8(%rbp), %rsi
leaq -0x298(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x5e8(%rbp)
movsd %xmm0, -0x5e0(%rbp)
jmp 0x5356e
movsd -0x5e8(%rbp), %xmm0
movsd -0x5e0(%rbp), %xmm1
movsd %xmm1, -0x288(%rbp)
movsd %xmm0, -0x280(%rbp)
callq 0x855e0
movq %rax, -0x5f0(%rbp)
jmp 0x5359c
movq -0x5f0(%rbp), %rdi
callq 0x113d0
movq %rax, -0x5f8(%rbp)
jmp 0x535b1
movq -0x5f8(%rbp), %rsi
leaq -0x288(%rbp), %rdi
callq 0x13320
movsd %xmm1, -0x608(%rbp)
movsd %xmm0, -0x600(%rbp)
jmp 0x535d6
movsd -0x608(%rbp), %xmm0
movsd -0x600(%rbp), %xmm1
movsd %xmm1, -0x278(%rbp)
movsd %xmm0, -0x270(%rbp)
cmpl $0x3, -0x1c(%rbp)
jne 0x53739
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x254(%rbp), %rax
movq %rax, -0x2e0(%rbp)
leaq -0x2e0(%rbp), %rsi
callq 0x56650
movq %rax, -0x610(%rbp)
jmp 0x5362e
movq -0x610(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x620(%rbp)
movsd %xmm0, -0x618(%rbp)
jmp 0x53653
movsd -0x620(%rbp), %xmm0
movsd -0x618(%rbp), %xmm1
movsd %xmm1, -0x2d8(%rbp)
movsd %xmm0, -0x2d0(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x628(%rbp)
jmp 0x53689
movq -0x380(%rbp), %rdi
movsd -0x628(%rbp), %xmm0
movsd %xmm0, -0x2c8(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x254(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x2e8(%rbp), %rsi
callq 0x568c0
movq %rax, -0x630(%rbp)
jmp 0x536ca
movq -0x630(%rbp), %rcx
movq -0x380(%rbp), %rdi
leaq -0x278(%rbp), %rsi
leaq -0x2c8(%rbp), %rdx
callq 0x569c0
movsd %xmm0, -0x638(%rbp)
jmp 0x536f5
movsd -0x638(%rbp), %xmm0
movsd %xmm0, -0x2c0(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x12a90
movq %rax, -0x640(%rbp)
jmp 0x53721
movq -0x640(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x210(%rbp)
jmp 0x5388f
cmpl $0x4, -0x1c(%rbp)
jne 0x5388d
movq -0x380(%rbp), %rdi
addq $0x48, %rdi
movslq -0x254(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x308(%rbp), %rsi
callq 0x56650
movq %rax, -0x648(%rbp)
jmp 0x53771
movq -0x648(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x110a0
movsd %xmm1, -0x658(%rbp)
movsd %xmm0, -0x650(%rbp)
jmp 0x53796
movsd -0x658(%rbp), %xmm0
movsd -0x650(%rbp), %xmm1
movsd %xmm1, -0x300(%rbp)
movsd %xmm0, -0x2f8(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x660(%rbp)
jmp 0x537cc
movsd -0x660(%rbp), %xmm0
movabsq $-0x4126d58c8eef1bac, %rax # imm = 0xBED92A737110E454
movq %rax, -0x310(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x116b0
movsd %xmm0, -0x668(%rbp)
jmp 0x537fb
movq -0x380(%rbp), %rax
movsd -0x668(%rbp), %xmm0
movsd 0x6dee6(%rip), %xmm1    # 0xc16f8
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0x2ec(%rbp)
movslq -0x2ec(%rbp), %rcx
imulq $0x6684, %rcx, %rcx     # imm = 0x6684
addq %rcx, %rax
movslq -0x19c(%rbp), %rcx
imulq $0x144, %rcx, %rcx      # imm = 0x144
addq %rcx, %rax
movslq -0x254(%rbp), %rcx
movss 0xe6fe8(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x318(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x12a90
movq %rax, -0x670(%rbp)
jmp 0x5387a
movq -0x670(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x210(%rbp)
jmp 0x5388f
jmp 0x53891
jmp 0x53893
movl -0x254(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x254(%rbp)
jmp 0x53363
jmp 0x538a9
movq -0x380(%rbp), %rax
movsd -0x210(%rbp), %xmm0
movsd 0x2b45d0(%rax), %xmm1
subsd -0xa0(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x53988
movq -0x380(%rbp), %rdi
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x19c(%rbp), %rax
movq %rax, -0x320(%rbp)
leaq -0x320(%rbp), %rsi
callq 0x568c0
movq %rax, -0x678(%rbp)
jmp 0x53903
movq -0x380(%rbp), %rax
movq -0x678(%rbp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, -0x688(%rbp)
movq %rax, %rdi
addq $0x2b4558, %rdi         # imm = 0x2B4558
movsd -0x210(%rbp), %xmm0
movsd 0x2b45d0(%rax), %xmm1
subsd %xmm1, %xmm0
movsd -0xa0(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x328(%rbp)
leaq -0x328(%rbp), %rsi
movl $0x1, %edx
callq 0x56d70
movsd %xmm0, -0x680(%rbp)
jmp 0x5396a
movsd -0x680(%rbp), %xmm1
movsd -0x688(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
jmp 0x53993
xorps %xmm0, %xmm0
movsd %xmm0, -0x130(%rbp)
movsd -0x130(%rbp), %xmm0
ucomisd -0x138(%rbp), %xmm0
jbe 0x539c1
movl -0x19c(%rbp), %eax
movl %eax, -0x124(%rbp)
movsd -0x130(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
jmp 0x539c3
jmp 0x539c5
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0x52ee4
jmp 0x539db
movsd -0xb8(%rbp), %xmm0
ucomisd -0x138(%rbp), %xmm0
jbe 0x53a33
movq -0x378(%rbp), %rdi
movl $0x3, 0x4(%rdi)
movb $0x1, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x690(%rbp)
callq 0x56bf0
movq -0x690(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x56c30
jmp 0x53a20
movb $0x1, -0x1d(%rbp)
movl $0x1, -0x94(%rbp)
jmp 0x53b98
movq -0x378(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x4(%rax)
movb $0x0, (%rax)
cmpl $0x0, -0x124(%rbp)
jl 0x53b8a
movq -0x380(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x6b8(%rbp)
movq %rdi, %rax
addq $0x2b45b0, %rax         # imm = 0x2B45B0
movq %rax, -0x6b0(%rbp)
movq %rdi, %rax
addq $0x2b45c0, %rax         # imm = 0x2B45C0
movq %rax, -0x6a8(%rbp)
movq %rdi, %rax
addq $0x2b4598, %rax         # imm = 0x2B4598
movq %rax, -0x6a0(%rbp)
addq $0x48, %rdi
movslq -0x124(%rbp), %rax
movq %rax, -0x370(%rbp)
leaq -0x370(%rbp), %rsi
callq 0x56650
movq %rax, -0x698(%rbp)
jmp 0x53ab9
movq -0x698(%rbp), %rsi
movq -0x6a0(%rbp), %rdi
callq 0x11360
movsd %xmm1, -0x6c8(%rbp)
movsd %xmm0, -0x6c0(%rbp)
jmp 0x53ade
movq -0x6a8(%rbp), %r8
movq -0x6b0(%rbp), %rcx
movq -0x6b8(%rbp), %rdx
movq -0x380(%rbp), %rsi
movsd -0x6c8(%rbp), %xmm0
movsd -0x6c0(%rbp), %xmm1
movsd %xmm1, -0x368(%rbp)
movsd %xmm0, -0x360(%rbp)
movq %rsp, %rax
movl $0x1, (%rax)
leaq -0x358(%rbp), %rdi
leaq -0x368(%rbp), %r9
callq 0x54ac0
jmp 0x53b38
leaq -0x50(%rbp), %rdi
leaq -0x358(%rbp), %rsi
movl $0x30, %edx
callq 0xa4b0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x53b88
movq -0x378(%rbp), %rdi
movb $0x1, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x56bf0
movq -0x6d0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x56c30
jmp 0x53b86
jmp 0x53b88
jmp 0x53b8a
movb $0x1, -0x1d(%rbp)
movl $0x1, -0x94(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x53baa
movq -0x378(%rbp), %rdi
callq 0x56bd0
movq -0x388(%rbp), %rax
addq $0x6e0, %rsp            # imm = 0x6E0
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)