// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::UpdateKickData(Agent const&)
void Kicker::UpdateKickData(const Agent &agent) {
  if (mAgentID == agent.GetAgentID()) {
    return; /** no need to update */
  }

  mAgentID = agent.GetAgentID();

  const BallState &ball_state = agent.GetWorldState().GetBall();
  const PlayerState &player_state = agent.GetSelf();

  /** absolute values */
  mInput.mBallPos = ball_state.GetPos();
  mInput.mBallVel = ball_state.GetVel();
  mInput.mPlayerPos = player_state.GetPos();
  mInput.mPlayerVel = player_state.GetVel();
  mInput.mPlayerBodyDir = player_state.GetBodyDir();

  /** relative values */
  mInput.mBallPos =
      (mInput.mBallPos - mInput.mPlayerPos).Rotate(-mInput.mPlayerBodyDir);
  mInput.mBallVel = mInput.mBallVel.Rotate(-mInput.mPlayerBodyDir);
  mInput.mPlayerVel = mInput.mPlayerVel.Rotate(-mInput.mPlayerBodyDir);

  /** player type is changed */
  if (mInput.mPlayerType != player_state.GetPlayerType()) {
    mInput.mPlayerType = player_state.GetPlayerType();

    for (int k = 0; k < POINTS_NUM; ++k) {
      mKickRate[k] = GetKickRate(mPoint[k], mInput.mPlayerType);
      mMaxAccel[k] = ServerParam::instance().maxPower() *
                     mKickRate[k]; //计算出对应该点最大的eff_power
    }

    for (int i = 0; i < POINTS_NUM; ++i) //考虑kick_rand
    {
      AngleDeg angle_diff = mPoint[i].Dir();
      angle_diff = GetNormalizeAngleDeg(angle_diff);
      double dir_diff = Deg2Rad(fabs(angle_diff));
      double dist_2_ball = mPoint[i].Mod() -
                           PlayerParam::instance()
                               .HeteroPlayer(mInput.mPlayerType)
                               .playerSize() -
                           ServerParam::instance().ballSize();
      double kick_pos_rand =
          dir_diff / M_PI + dist_2_ball / PlayerParam::instance()
                                              .HeteroPlayer(mInput.mPlayerType)
                                              .kickableMargin();
      mRandEva[i] = mRandCurve.GetOutput(kick_pos_rand);
    }
  }

  /** initial */
  for (int i = 0; i < POINTS_NUM; i++) {
    mPointEva[i] = mRandEva[i];
  }

  /** 排除掉一定不能踢的点 */
  Vector ball_next_pos = mInput.mBallPos + mInput.mBallVel - mInput.mPlayerVel;
  double eff_power =
      ServerParam::instance().maxPower() *
      agent.GetSelf().GetKickRate(); //球在当前位置下的实际可以踢到的最大加速度
  double outside_buf = 0.3;
  Vector temp_pos = Vector(0.0, 0.0);

  double x_max = ServerParam::instance().PITCH_LENGTH * 0.5 -
                 mInput.mPlayerPos.X() - outside_buf;
  double x_min = -ServerParam::instance().PITCH_LENGTH * 0.5 -
                 mInput.mPlayerPos.X() + outside_buf;
  double y_max = ServerParam::instance().PITCH_WIDTH * 0.5 -
                 mInput.mPlayerPos.Y() - outside_buf;
  double y_min = -ServerParam::instance().PITCH_WIDTH * 0.5 -
                 mInput.mPlayerPos.Y() + outside_buf;

  for (int i = 0; i < POINTS_NUM; i++) {
    temp_pos =
        (mInput.mPlayerVel + mPoint[i])
            .Rotate(mInput.mPlayerBodyDir); /** 把x正方向变为和球场一样 */
    if (ball_next_pos.Dist(mPoint[i]) > eff_power /** 踢不到该点 */
        || temp_pos.X() > x_max || temp_pos.X() < x_min ||
        temp_pos.Y() > y_max || temp_pos.Y() < y_min) /** 会出界 */
    {
      mPointEva[i] = 0.0;
      continue;
    }
  }

  /** 考虑近身对手，不用InfoState的东西，接口更简单 */
  int min_unum = 0;
  double min_dist = 100.0;
  for (int i = 1; i <= TEAMSIZE; ++i) {
    double opp_kick_area;
    if (i == agent.GetWorldState().GetOpponentGoalieUnum()) {
      opp_kick_area = ServerParam::instance().maxCatchableArea();
    } else {
      opp_kick_area = agent.GetWorldState().GetOpponent(i).GetKickableArea();
    }
    double dist = agent.GetWorldState().GetOpponent(i).GetPos().Dist(
                      ball_state.GetPos()) -
                  opp_kick_area;

    if (dist < min_dist) {
      min_dist = dist;
      min_unum = i;
    }
  }

  if (min_unum != 0) {
    double opp_kick_area = 0.0;
    Vector opp_next_pos = agent.GetWorldState().GetOpponent(min_unum).GetPos();
    opp_next_pos = (opp_next_pos - (mInput.mPlayerPos + mInput.mPlayerVel))
                       .Rotate(-mInput.mPlayerBodyDir);
    if (min_unum == agent.GetWorldState().GetOpponentGoalieUnum()) {
      opp_kick_area = ServerParam::instance().maxCatchableArea();
    } else {
      opp_kick_area =
          agent.GetWorldState().GetOpponent(min_unum).GetKickableArea();
    }

    if (opp_next_pos.Mod() < opp_kick_area + 2.0) {
      double dist = 0.0;
      for (int i = 0; i < POINTS_NUM; i++) {
        dist = opp_next_pos.Dist(mPoint[i]) - opp_kick_area;
        mPointEva[i] *= mOppCurve.GetOutput(dist);
      }
    }
  }

  /** max kick rand factor */
  mMaxRandFactor = GetMaxKickRand(mInput.mBallPos, ball_state.GetVel(),
                                  player_state.GetPlayerType(),
                                  ServerParam::instance().maxPower());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x298(%rbp)
movq %rax, -0x2a0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40800
movq -0x298(%rbp), %rdi
movq %rdx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x14(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x56cf0
testb $0x1, %al
jne 0x50080
jmp 0x50085
jmp 0x51029
movq -0x10(%rbp), %rdi
callq 0x40800
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movl -0x48(%rbp), %ecx
movl %ecx, -0x38(%rbp)
movb -0x44(%rbp), %cl
movb %cl, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movl -0x38(%rbp), %ecx
movl %ecx, 0x8(%rax)
movb -0x34(%rbp), %cl
movb %cl, 0xc(%rax)
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
callq 0x10570
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x2b45b0(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x2b45b8(%rax)
movq -0x58(%rbp), %rdi
callq 0x10a80
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x2b45c0(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x2b45c8(%rax)
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x2b4588(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x2b4590(%rax)
movq -0x60(%rbp), %rdi
callq 0x10a80
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x2b4598(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x2b45a0(%rax)
movq -0x60(%rbp), %rdi
callq 0x11170
movq -0x2a0(%rbp), %rsi
movsd (%rax), %xmm0
movsd %xmm0, 0x2b45a8(%rsi)
movq %rsi, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x30, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x8, %rsi
callq 0x110a0
movq -0x2a0(%rbp), %rax
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
movsd 0x2b45a8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x11110
movq -0x2a0(%rbp), %rax
movsd %xmm0, -0x70(%rbp)
movsd %xmm1, -0x68(%rbp)
movq -0x70(%rbp), %rcx
movq %rcx, 0x2b45b0(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x2b45b8(%rax)
movq %rax, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x40, %rdi
movsd 0x2b45a8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0xa0(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x11110
movq -0x2a0(%rbp), %rax
movsd %xmm0, -0x98(%rbp)
movsd %xmm1, -0x90(%rbp)
movq -0x98(%rbp), %rcx
movq %rcx, 0x2b45c0(%rax)
movq -0x90(%rbp), %rcx
movq %rcx, 0x2b45c8(%rax)
movq %rax, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x18, %rdi
movsd 0x2b45a8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0xb8(%rbp)
leaq -0xb8(%rbp), %rsi
callq 0x11110
movq -0x2a0(%rbp), %rax
movsd %xmm0, -0xb0(%rbp)
movsd %xmm1, -0xa8(%rbp)
movq -0xb0(%rbp), %rcx
movq %rcx, 0x2b4598(%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, 0x2b45a0(%rax)
movl 0x2b4580(%rax), %eax
movl %eax, -0x2a4(%rbp)
movq -0x60(%rbp), %rdi
callq 0x10a60
movl %eax, %ecx
movl -0x2a4(%rbp), %eax
cmpl %ecx, %eax
je 0x5069d
movq -0x60(%rbp), %rdi
callq 0x10a60
movl %eax, %ecx
movq -0x2a0(%rbp), %rax
movl %ecx, 0x2b4580(%rax)
movl $0x0, -0xbc(%rbp)
cmpl $0x51, -0xbc(%rbp)
jge 0x50489
movq -0x2a0(%rbp), %rdi
addq $0x48, %rdi
movslq -0xbc(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rsi
callq 0x56650
movq %rax, %rdi
movq -0x2a0(%rbp), %rax
movl 0x2b4580(%rax), %esi
callq 0x111b0
movq -0x2a0(%rbp), %rdi
movsd %xmm0, -0x2c0(%rbp)
addq $0x2b45e8, %rdi         # imm = 0x2B45E8
movslq -0xbc(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0xd0(%rbp), %rsi
callq 0x568c0
movsd -0x2c0(%rbp), %xmm0
movsd %xmm0, (%rax)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movq -0x2a0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x2b8(%rbp)
addq $0x2b45e8, %rdi         # imm = 0x2B45E8
movslq -0xbc(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0xd8(%rbp), %rsi
callq 0x568c0
movsd -0x2b8(%rbp), %xmm0
movq -0x2a0(%rbp), %rdi
mulsd (%rax), %xmm0
movsd %xmm0, -0x2b0(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0xbc(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rsi
callq 0x568c0
movsd -0x2b0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x50369
movl $0x0, -0xe4(%rbp)
cmpl $0x51, -0xe4(%rbp)
jge 0x5069b
movq -0x2a0(%rbp), %rdi
addq $0x48, %rdi
movslq -0xe4(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xf8(%rbp), %rsi
callq 0x56650
movq %rax, %rdi
callq 0x10520
movsd %xmm0, -0xf0(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd 0x70b4b(%rip), %xmm1    # 0xc1030
movsd %xmm1, -0x100(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x116b0
movsd %xmm0, -0xf0(%rbp)
movsd -0xf0(%rbp), %xmm0
movaps 0x70b50(%rip), %xmm1    # 0xc1060
pand %xmm1, %xmm0
movsd %xmm0, -0x110(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x12e50
movq -0x2a0(%rbp), %rdi
movsd %xmm0, -0x108(%rbp)
addq $0x48, %rdi
movslq -0xe4(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rsi
callq 0x56650
movq %rax, %rdi
callq 0x104e0
movsd %xmm0, -0x2e8(%rbp)
callq 0x798a0
movq -0x2a0(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, %rdi
callq 0x12ef0
movsd -0x2e8(%rbp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, -0x2e0(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12f10
movsd -0x2e0(%rbp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
movsd -0x108(%rbp), %xmm0
movsd 0x70a83(%rip), %xmm1    # 0xc1050
divsd %xmm1, %xmm0
movsd %xmm0, -0x2d0(%rbp)
movsd -0x118(%rbp), %xmm0
movsd %xmm0, -0x2d8(%rbp)
callq 0x798a0
movq -0x2a0(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, %rdi
callq 0x12f50
movsd -0x2d8(%rbp), %xmm1
movsd -0x2d0(%rbp), %xmm0
movq -0x2a0(%rbp), %rdi
divsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
addq $0x2b4530, %rdi         # imm = 0x2B4530
leaq -0x128(%rbp), %rsi
movl $0x1, %edx
callq 0x56d70
movq -0x2a0(%rbp), %rdi
movsd %xmm0, -0x2c8(%rbp)
addq $0x2b4af8, %rdi         # imm = 0x2B4AF8
movslq -0xe4(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rsi
callq 0x568c0
movsd -0x2c8(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x50493
jmp 0x5069d
movl $0x0, -0x134(%rbp)
cmpl $0x51, -0x134(%rbp)
jge 0x5072c
movq -0x2a0(%rbp), %rdi
addq $0x2b4af8, %rdi         # imm = 0x2B4AF8
movslq -0x134(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rsi
callq 0x568c0
movq -0x2a0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x2f0(%rbp)
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x134(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rsi
callq 0x568c0
movsd -0x2f0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x506a7
movq -0x2a0(%rbp), %rsi
movq %rsi, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x30, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x40, %rsi
callq 0x11360
movq -0x2a0(%rbp), %rsi
movsd %xmm0, -0x168(%rbp)
movsd %xmm1, -0x160(%rbp)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x18, %rsi
leaq -0x168(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x158(%rbp)
movsd %xmm1, -0x150(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movsd (%rax), %xmm0
movsd %xmm0, -0x318(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
movaps %xmm0, %xmm1
movsd -0x318(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x170(%rbp)
movsd 0x711a0(%rip), %xmm0    # 0xc1978
movsd %xmm0, -0x178(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x190(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x198(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
leaq -0x198(%rbp), %rdx
callq 0x11a10
callq 0x855e0
movq -0x2a0(%rbp), %rdi
leaq 0x73815(%rip), %rax     # 0xc4038
movsd (%rax), %xmm0
movsd %xmm0, -0x310(%rbp)
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x8, %rdi
callq 0x176f0
movsd -0x310(%rbp), %xmm0
movsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x707b6(%rip), %xmm2    # 0xc1020
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
subsd -0x178(%rbp), %xmm0
movsd %xmm0, -0x1a0(%rbp)
callq 0x855e0
movq -0x2a0(%rbp), %rdi
leaq 0x737a3(%rip), %rax     # 0xc4038
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x308(%rbp)
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x8, %rdi
callq 0x176f0
movsd -0x308(%rbp), %xmm0
movsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x7072d(%rip), %xmm2    # 0xc1020
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x178(%rbp), %xmm0
movsd %xmm0, -0x1a8(%rbp)
callq 0x855e0
movq -0x2a0(%rbp), %rdi
leaq 0x73722(%rip), %rax     # 0xc4040
movsd (%rax), %xmm0
movsd %xmm0, -0x300(%rbp)
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x8, %rdi
callq 0x17700
movsd -0x300(%rbp), %xmm0
movsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x706bb(%rip), %xmm2    # 0xc1020
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
subsd -0x178(%rbp), %xmm0
movsd %xmm0, -0x1b0(%rbp)
callq 0x855e0
movq -0x2a0(%rbp), %rdi
leaq 0x736b0(%rip), %rax     # 0xc4040
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x2f8(%rbp)
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x8, %rdi
callq 0x17700
movsd -0x2f8(%rbp), %xmm0
movsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x70632(%rip), %xmm2    # 0xc1020
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x178(%rbp), %xmm0
movsd %xmm0, -0x1b8(%rbp)
movl $0x0, -0x1bc(%rbp)
cmpl $0x51, -0x1bc(%rbp)
jge 0x50beb
movq -0x2a0(%rbp), %rdi
movq %rdi, %rax
addq $0x2b4580, %rax         # imm = 0x2B4580
addq $0x18, %rax
movq %rax, -0x328(%rbp)
addq $0x48, %rdi
movslq -0x1bc(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x1e8(%rbp), %rsi
callq 0x56650
movq -0x328(%rbp), %rdi
movq %rax, %rsi
callq 0x11360
movq -0x2a0(%rbp), %rsi
movsd %xmm0, -0x1e0(%rbp)
movsd %xmm1, -0x1d8(%rbp)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x28, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x11110
movq -0x2a0(%rbp), %rdi
movsd %xmm0, -0x1d0(%rbp)
movsd %xmm1, -0x1c8(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x180(%rbp)
addq $0x48, %rdi
movslq -0x1bc(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x56650
movq %rax, %rsi
leaq -0x158(%rbp), %rdi
callq 0x1d6d0
movb $0x1, %al
ucomisd -0x170(%rbp), %xmm0
movb %al, -0x319(%rbp)
ja 0x50b98
leaq -0x188(%rbp), %rdi
callq 0x176f0
movsd (%rax), %xmm0
movb $0x1, %al
ucomisd -0x1a0(%rbp), %xmm0
movb %al, -0x319(%rbp)
ja 0x50b98
leaq -0x188(%rbp), %rdi
callq 0x176f0
movsd (%rax), %xmm1
movsd -0x1a8(%rbp), %xmm0
movb $0x1, %al
ucomisd %xmm1, %xmm0
movb %al, -0x319(%rbp)
ja 0x50b98
leaq -0x188(%rbp), %rdi
callq 0x17700
movsd (%rax), %xmm0
movb $0x1, %al
ucomisd -0x1b0(%rbp), %xmm0
movb %al, -0x319(%rbp)
ja 0x50b98
leaq -0x188(%rbp), %rdi
callq 0x17700
movsd (%rax), %xmm1
movsd -0x1b8(%rbp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
movb %al, -0x319(%rbp)
movb -0x319(%rbp), %al
testb $0x1, %al
jne 0x50ba4
jmp 0x50bd5
movq -0x2a0(%rbp), %rdi
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x1bc(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x1f8(%rbp), %rsi
callq 0x568c0
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0x50bd7
jmp 0x50bd7
movl -0x1bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1bc(%rbp)
jmp 0x50a10
movl $0x0, -0x1fc(%rbp)
movsd 0x70adb(%rip), %xmm0    # 0xc16d8
movsd %xmm0, -0x208(%rbp)
movl $0x1, -0x20c(%rbp)
cmpl $0xb, -0x20c(%rbp)
jg 0x50d2c
movl -0x20c(%rbp), %eax
movl %eax, -0x32c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
callq 0x25310
movl %eax, %ecx
movl -0x32c(%rbp), %eax
cmpl %ecx, %eax
jne 0x50c60
callq 0x855e0
movq %rax, %rdi
callq 0x4f380
movsd (%rax), %xmm0
movsd %xmm0, -0x218(%rbp)
jmp 0x50c8d
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
leaq -0x20c(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movsd (%rax), %xmm0
movsd %xmm0, -0x218(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
leaq -0x20c(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, -0x338(%rbp)
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x338(%rbp), %rdi
movq %rax, %rsi
callq 0x1d6d0
subsd -0x218(%rbp), %xmm0
movsd %xmm0, -0x220(%rbp)
movsd -0x220(%rbp), %xmm1
movsd -0x208(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x50d16
movsd -0x220(%rbp), %xmm0
movsd %xmm0, -0x208(%rbp)
movl -0x20c(%rbp), %eax
movl %eax, -0x1fc(%rbp)
jmp 0x50d18
movl -0x20c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20c(%rbp)
jmp 0x50c0f
cmpl $0x0, -0x1fc(%rbp)
je 0x50fb9
xorps %xmm0, %xmm0
movsd %xmm0, -0x228(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
leaq -0x1fc(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x2a0(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, -0x238(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x230(%rbp)
movq %rsi, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x8, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x18, %rsi
callq 0x11360
movsd %xmm0, -0x268(%rbp)
movsd %xmm1, -0x260(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x110a0
movq -0x2a0(%rbp), %rax
movsd %xmm0, -0x258(%rbp)
movsd %xmm1, -0x250(%rbp)
movsd 0x2b45a8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x270(%rbp)
leaq -0x258(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x11110
movsd %xmm0, -0x248(%rbp)
movsd %xmm1, -0x240(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movl -0x1fc(%rbp), %eax
movl %eax, -0x33c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
callq 0x25310
movl %eax, %ecx
movl -0x33c(%rbp), %eax
cmpl %ecx, %eax
jne 0x50e86
callq 0x855e0
movq %rax, %rdi
callq 0x4f380
movsd (%rax), %xmm0
movsd %xmm0, -0x228(%rbp)
jmp 0x50eb3
movq -0x10(%rbp), %rdi
callq 0x10550
movq %rax, %rdi
leaq -0x1fc(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movsd (%rax), %xmm0
movsd %xmm0, -0x228(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x104e0
movaps %xmm0, %xmm1
movsd 0x705e6(%rip), %xmm0    # 0xc14b0
addsd -0x228(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x50fb7
xorps %xmm0, %xmm0
movsd %xmm0, -0x278(%rbp)
movl $0x0, -0x27c(%rbp)
cmpl $0x51, -0x27c(%rbp)
jge 0x50fb5
movq -0x2a0(%rbp), %rdi
addq $0x48, %rdi
movslq -0x27c(%rbp), %rax
movq %rax, -0x288(%rbp)
leaq -0x288(%rbp), %rsi
callq 0x56650
movq %rax, %rsi
leaq -0x238(%rbp), %rdi
callq 0x1d6d0
movq -0x2a0(%rbp), %rdi
subsd -0x228(%rbp), %xmm0
movsd %xmm0, -0x278(%rbp)
addq $0x2b4508, %rdi         # imm = 0x2B4508
leaq -0x278(%rbp), %rsi
movl $0x1, %edx
callq 0x56d70
movq -0x2a0(%rbp), %rdi
movsd %xmm0, -0x348(%rbp)
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x27c(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq -0x290(%rbp), %rsi
callq 0x568c0
movsd -0x348(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x27c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x27c(%rbp)
jmp 0x50ef1
jmp 0x50fb7
jmp 0x50fb9
movq -0x2a0(%rbp), %rax
addq $0x2b4580, %rax         # imm = 0x2B4580
addq $0x30, %rax
movq %rax, -0x360(%rbp)
movq -0x58(%rbp), %rdi
callq 0x10a80
movq %rax, -0x358(%rbp)
movq -0x60(%rbp), %rdi
callq 0x10a60
movl %eax, -0x34c(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movq -0x360(%rbp), %rdi
movq -0x358(%rbp), %rsi
movl -0x34c(%rbp), %edx
movsd (%rax), %xmm0
callq 0x56e10
movq -0x2a0(%rbp), %rax
movsd %xmm0, 0x2b5008(%rax)
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
nopw %cs:(%rax,%rax)