// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetMaxSpeed(Agent const&, Vector const&, int const&, Vector*, Vector*)
double Kicker::GetMaxSpeed(const Agent &agent, const Vector &kick_pos,
                           const int &cycle, Vector *kick_out_pos,
                           Vector *last_vel) {
  if (cycle < 1) {
    Assert(0);
    return 0.0;
  }

  UpdateKickData(agent);

  // absolute position of agent before the ball was kicked out
  Vector player_pos_final =
      mInput.mPlayerPos + mInput.mPlayerVel.Rotate(mInput.mPlayerBodyDir) *
                              ((1 - pow(PlayerParam::instance()
                                            .HeteroPlayer(mInput.mPlayerType)
                                            .playerDecay(),
                                        cycle - 1)) /
                               (1 - PlayerParam::instance()
                                        .HeteroPlayer(mInput.mPlayerType)
                                        .playerDecay()));

  if (cycle > 3) /** 4脚肯定能踢到最快球速了 */
  {
    // 不出意外，4脚踢球最后出球位置应该是mPoint[0]。 From Shi Ke.
    if (kick_out_pos)
      *kick_out_pos =
          mPoint[0].Rotate(mInput.mPlayerBodyDir) + player_pos_final;
    if (last_vel)
      *last_vel = Vector(0.0, 0.0); //认为球停在身前，速度为0
    return ServerParam::instance().ballSpeedMax();
  }

  Vector target = (kick_pos - player_pos_final).Rotate(-mInput.mPlayerBodyDir);

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

  if (mMaxSpeedFlag[idx][cycle - 1] != agent.GetAgentID()) {
    double max_speed = 0.0;
    Vector max_speed_pos = mInput.mBallPos;
    Vector max_speed_first_pos = mInput.mBallPos;
    Vector max_speed_last_vel = mInput.mBallVel;

    if (cycle == 1) {
      max_speed = GetOneKickMaxSpeed(
          mInput.mBallVel, (target - mInput.mBallPos).Dir(),
          agent.GetSelf().GetKickRate() * ServerParam::instance().maxPower());
    } else {
      Vector ball_vel = Vector(0.0, 0.0);

      for (int k = 0; k < POINTS_NUM; ++k) {
        if (mPointEva[k] > 0.001) {
          ball_vel = (mPoint[k] + mInput.mPlayerVel - mInput.mBallPos) *
                     ServerParam::instance().ballDecay(); //踢到k后的球速
          if (cycle == 2) /** 2周期踢球，重新算一下 */
          {
            double speed = GetOneKickMaxSpeed(
                ball_vel, (target - mPoint[k]).Dir(), mMaxAccel[k]);
            if (max_speed < speed) {
              max_speed = speed;
              max_speed_pos = mPoint[k];
              max_speed_first_pos = mPoint[k];
              max_speed_last_vel = ball_vel;
            }
          } 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
              {
                Vector ball_vel_next =
                    (mPoint[l] +
                     mInput.mPlayerVel * PlayerParam::instance()
                                             .HeteroPlayer(mInput.mPlayerType)
                                             .playerDecay() -
                     mPoint[k]) *
                    ServerParam::instance().ballDecay();
                double speed = GetOneKickMaxSpeed(
                    ball_vel_next, (target - mPoint[l]).Dir(), mMaxAccel[l]);
                if (max_speed < speed) {
                  max_speed = speed;
                  max_speed_pos = mPoint[l];
                  max_speed_first_pos = mPoint[k];
                  max_speed_last_vel = ball_vel_next;
                }
              }
            }
          }
        }
      }
    }

    mMaxSpeedFlag[idx][cycle - 1] = agent.GetAgentID();
    mMaxSpeed[idx][cycle - 1] = max_speed;
    mMaxSpeedOutPos[idx][cycle - 1] =
        max_speed_pos.Rotate(mInput.mPlayerBodyDir) + player_pos_final;
    mMaxSpeedOutFirstPos[idx][cycle - 1] = max_speed_first_pos;
    mMaxSpeedOutLastVel[idx][cycle - 1] =
        max_speed_last_vel.Rotate(mInput.mPlayerBodyDir);
  }

  if (kick_out_pos)
    *kick_out_pos = mMaxSpeedOutPos[idx][cycle - 1];
  if (last_vel)
    *last_vel = mMaxSpeedOutLastVel[idx][cycle - 1];

  return Min(mMaxSpeed[idx][cycle - 1], ServerParam::instance().ballSpeedMax());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
jge 0x51194
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x5204f
movq -0x3c8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x50020
movq -0x3c8(%rbp), %rsi
movq %rsi, %rax
addq $0x2b4580, %rax         # imm = 0x2B4580
addq $0x8, %rax
movq %rax, -0x3d0(%rbp)
movq %rsi, %rdi
addq $0x2b4580, %rdi         # imm = 0x2B4580
addq $0x18, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x28, %rsi
callq 0x11110
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0x60(%rbp)
callq 0x798a0
movq -0x3c8(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, %rdi
callq 0x12fe0
movsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movl (%rax), %edi
subl $0x1, %edi
callq 0x56920
movaps %xmm0, %xmm1
movsd 0x6fde9(%rip), %xmm0    # 0xc1010
subsd %xmm1, %xmm0
movsd %xmm0, -0x3d8(%rbp)
callq 0x798a0
movq -0x3c8(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, %rdi
callq 0x12fe0
movsd -0x3d8(%rbp), %xmm0
movsd 0x6fdaa(%rip), %xmm1    # 0xc1010
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x13320
movq -0x3d0(%rbp), %rdi
movsd %xmm0, -0x58(%rbp)
movsd %xmm1, -0x50(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x11360
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x3, (%rax)
jle 0x5139c
cmpq $0x0, -0x30(%rbp)
je 0x51331
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movq $0x0, -0x98(%rbp)
leaq -0x98(%rbp), %rsi
callq 0x56650
movq -0x3c8(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x28, %rsi
callq 0x11110
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x11360
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
movq -0x30(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, (%rax)
movq -0x78(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x38(%rbp)
je 0x51381
xorps %xmm0, %xmm0
movsd %xmm0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x11a10
movq -0x38(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
callq 0x855e0
movq %rax, %rdi
callq 0x23d60
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x5204f
movq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x110a0
movq -0x3c8(%rbp), %rax
movsd %xmm0, -0xd8(%rbp)
movsd %xmm1, -0xd0(%rbp)
movsd 0x2b45a8(%rax), %xmm0
movaps 0x70361(%rip), %xmm1    # 0xc1730
pxor %xmm1, %xmm0
movlpd %xmm0, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x11110
movq -0x3c8(%rbp), %rsi
movsd %xmm0, -0xc8(%rbp)
movsd %xmm1, -0xc0(%rbp)
addq $0x2b45b0, %rsi         # imm = 0x2B45B0
leaq -0xc8(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0xf8(%rbp)
movsd %xmm1, -0xf0(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x10520
movabsq $-0x4126d58c8eef1bac, %rax # imm = 0xBED92A737110E454
movq %rax, -0x100(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x116b0
movq -0x3c8(%rbp), %rdi
cvttsd2si %xmm0, %eax
movl %eax, -0xe4(%rbp)
addq $0x2b5010, %rdi         # imm = 0x2B5010
movslq -0xe4(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %rsi
callq 0x56950
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
decl %eax
cltq
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %rsi
callq 0x56970
movq %rax, -0x3e0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x40800
movq -0x3e0(%rbp), %rdi
movq %rdx, -0x128(%rbp)
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x128(%rbp), %eax
movl %eax, -0x118(%rbp)
movb -0x124(%rbp), %al
movb %al, -0x114(%rbp)
leaq -0x120(%rbp), %rsi
callq 0x56990
testb $0x1, %al
jne 0x51503
jmp 0x51f10
movq -0x3c8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x138(%rbp)
movq 0x2b45b0(%rax), %rcx
movq %rcx, -0x148(%rbp)
movq 0x2b45b8(%rax), %rcx
movq %rcx, -0x140(%rbp)
movq 0x2b45b0(%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x2b45b8(%rax), %rcx
movq %rcx, -0x150(%rbp)
movq 0x2b45c0(%rax), %rcx
movq %rcx, -0x168(%rbp)
movq 0x2b45c8(%rax), %rax
movq %rax, -0x160(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x51634
movq -0x3c8(%rbp), %rsi
movq %rsi, %rax
addq $0x2b4580, %rax         # imm = 0x2B4580
addq $0x40, %rax
movq %rax, -0x3e8(%rbp)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x30, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x180(%rbp)
movsd %xmm1, -0x178(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x10520
movsd %xmm0, -0x170(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
movsd %xmm0, -0x3f0(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movsd -0x3f0(%rbp), %xmm0
movq -0x3c8(%rbp), %rdi
movq -0x3e8(%rbp), %rsi
mulsd (%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
leaq -0x170(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq 0x569c0
movsd %xmm0, -0x138(%rbp)
jmp 0x51c73
xorps %xmm0, %xmm0
movsd %xmm0, -0x1a0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1a8(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x1a8(%rbp), %rdx
callq 0x11a10
movl $0x0, -0x1ac(%rbp)
cmpl $0x51, -0x1ac(%rbp)
jge 0x51c71
movq -0x3c8(%rbp), %rdi
addq $0x2b4d80, %rdi         # imm = 0x2B4D80
movslq -0x1ac(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x1b8(%rbp), %rsi
callq 0x568c0
movsd (%rax), %xmm0
movsd 0x70a21(%rip), %xmm1    # 0xc20d0
ucomisd %xmm1, %xmm0
jbe 0x51c5b
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x56650
movq -0x3c8(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x18, %rsi
callq 0x11360
movq -0x3c8(%rbp), %rsi
movsd %xmm0, -0x1e8(%rbp)
movsd %xmm1, -0x1e0(%rbp)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x30, %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x1d8(%rbp)
movsd %xmm1, -0x1d0(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x113d0
movq %rax, %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x13320
movsd %xmm0, -0x1c8(%rbp)
movsd %xmm1, -0x1c0(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x1c0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x518ef
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x218(%rbp), %rsi
callq 0x56650
movq %rax, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x210(%rbp)
movsd %xmm1, -0x208(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x10520
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x200(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x1ac(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x220(%rbp), %rsi
callq 0x568c0
movq -0x3c8(%rbp), %rdi
movq %rax, %rcx
leaq -0x198(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x569c0
movsd %xmm0, -0x1f8(%rbp)
movsd -0x138(%rbp), %xmm1
movsd -0x1f8(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x518ea
movq -0x3c8(%rbp), %rdi
movsd -0x1f8(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x228(%rbp), %rsi
callq 0x56650
movq -0x3c8(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x148(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x230(%rbp), %rsi
callq 0x56650
movq (%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x160(%rbp)
jmp 0x51c59
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x248(%rbp), %rsi
callq 0x56650
movq %rax, %rdi
leaq -0x198(%rbp), %rsi
callq 0x11360
movsd %xmm0, -0x240(%rbp)
movsd %xmm1, -0x238(%rbp)
movl $0x0, -0x24c(%rbp)
cmpl $0x51, -0x24c(%rbp)
jge 0x51c57
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movslq -0x24c(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x258(%rbp), %rsi
callq 0x56650
movq %rax, %rdi
leaq -0x240(%rbp), %rsi
callq 0x1d6d0
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x3f8(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x1ac(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0x260(%rbp), %rsi
callq 0x568c0
movsd -0x3f8(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x51c41
movq -0x3c8(%rbp), %rdi
addq $0x48, %rdi
movslq -0x24c(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x298(%rbp), %rsi
callq 0x56650
movq %rax, %rcx
movq -0x3c8(%rbp), %rax
movq %rcx, -0x400(%rbp)
addq $0x2b4580, %rax         # imm = 0x2B4580
addq $0x18, %rax
movq %rax, -0x408(%rbp)
callq 0x798a0
movq -0x3c8(%rbp), %rsi
movq %rax, %rdi
addq $0x2b4580, %rsi         # imm = 0x2B4580
callq 0x129d0
movq %rax, %rdi
callq 0x12fe0
movq -0x408(%rbp), %rdi
movq %rax, %rsi
callq 0x13320
movq -0x400(%rbp), %rdi
movsd %xmm0, -0x2a8(%rbp)
movsd %xmm1, -0x2a0(%rbp)
leaq -0x2a8(%rbp), %rsi
callq 0x11360
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x290(%rbp)
movsd %xmm1, -0x288(%rbp)
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x2b0(%rbp)
leaq -0x2b0(%rbp), %rsi
callq 0x56650
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x280(%rbp)
movsd %xmm1, -0x278(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x113d0
movq %rax, %rsi
leaq -0x280(%rbp), %rdi
callq 0x13320
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x270(%rbp)
movsd %xmm1, -0x268(%rbp)
addq $0x48, %rdi
movslq -0x24c(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x2d8(%rbp), %rsi
callq 0x56650
movq %rax, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x2d0(%rbp)
movsd %xmm1, -0x2c8(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x10520
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x2c0(%rbp)
addq $0x2b4870, %rdi         # imm = 0x2B4870
movslq -0x24c(%rbp), %rax
movq %rax, -0x2e0(%rbp)
leaq -0x2e0(%rbp), %rsi
callq 0x568c0
movq -0x3c8(%rbp), %rdi
movq %rax, %rcx
leaq -0x270(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0x569c0
movsd %xmm0, -0x2b8(%rbp)
movsd -0x138(%rbp), %xmm1
movsd -0x2b8(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x51c3f
movq -0x3c8(%rbp), %rdi
movsd -0x2b8(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
addq $0x48, %rdi
movslq -0x24c(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x2e8(%rbp), %rsi
callq 0x56650
movq -0x3c8(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x148(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
addq $0x48, %rdi
movslq -0x1ac(%rbp), %rax
movq %rax, -0x2f0(%rbp)
leaq -0x2f0(%rbp), %rsi
callq 0x56650
movq (%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x160(%rbp)
jmp 0x51c41
jmp 0x51c43
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x5193d
jmp 0x51c59
jmp 0x51c5b
jmp 0x51c5d
movl -0x1ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x5166e
jmp 0x51c73
movq -0x18(%rbp), %rdi
callq 0x40800
movq -0x3c8(%rbp), %rdi
movq %rdx, -0x308(%rbp)
movq %rax, -0x310(%rbp)
movq -0x310(%rbp), %rax
movq %rax, -0x300(%rbp)
movl -0x308(%rbp), %eax
movl %eax, -0x2f8(%rbp)
movb -0x304(%rbp), %al
movb %al, -0x2f4(%rbp)
addq $0x2b5010, %rdi         # imm = 0x2B5010
movslq -0xe4(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x318(%rbp), %rsi
callq 0x56950
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x320(%rbp)
leaq -0x320(%rbp), %rsi
callq 0x56970
movq -0x3c8(%rbp), %rdi
movq -0x300(%rbp), %rcx
movq %rcx, (%rax)
movl -0x2f8(%rbp), %ecx
movl %ecx, 0x8(%rax)
movb -0x2f4(%rbp), %cl
movb %cl, 0xc(%rax)
movsd -0x138(%rbp), %xmm0
movsd %xmm0, -0x410(%rbp)
addq $0x2b9390, %rdi         # imm = 0x2B9390
movslq -0xe4(%rbp), %rax
movq %rax, -0x328(%rbp)
leaq -0x328(%rbp), %rsi
callq 0x568e0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x330(%rbp)
leaq -0x330(%rbp), %rsi
callq 0x4aae0
movsd -0x410(%rbp), %xmm0
movq -0x3c8(%rbp), %rsi
movsd %xmm0, (%rax)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x28, %rsi
leaq -0x148(%rbp), %rdi
callq 0x11110
movsd %xmm0, -0x350(%rbp)
movsd %xmm1, -0x348(%rbp)
leaq -0x350(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x11360
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x340(%rbp)
movsd %xmm1, -0x338(%rbp)
addq $0x2bb550, %rdi         # imm = 0x2BB550
movslq -0xe4(%rbp), %rax
movq %rax, -0x358(%rbp)
leaq -0x358(%rbp), %rsi
callq 0x56b20
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x360(%rbp)
leaq -0x360(%rbp), %rsi
callq 0x56b40
movq -0x3c8(%rbp), %rdi
movq -0x340(%rbp), %rcx
movq %rcx, (%rax)
movq -0x338(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x2bf8d0, %rdi         # imm = 0x2BF8D0
movslq -0xe4(%rbp), %rax
movq %rax, -0x368(%rbp)
leaq -0x368(%rbp), %rsi
callq 0x56b20
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x370(%rbp)
leaq -0x370(%rbp), %rsi
callq 0x56b40
movq -0x3c8(%rbp), %rsi
movq -0x158(%rbp), %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x28, %rsi
leaq -0x168(%rbp), %rdi
callq 0x11110
movq -0x3c8(%rbp), %rdi
movsd %xmm0, -0x380(%rbp)
movsd %xmm1, -0x378(%rbp)
addq $0x2c3c50, %rdi         # imm = 0x2C3C50
movslq -0xe4(%rbp), %rax
movq %rax, -0x388(%rbp)
leaq -0x388(%rbp), %rsi
callq 0x56b20
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x390(%rbp)
leaq -0x390(%rbp), %rsi
callq 0x56b40
movq -0x380(%rbp), %rcx
movq %rcx, (%rax)
movq -0x378(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x51f75
movq -0x3c8(%rbp), %rdi
addq $0x2bb550, %rdi         # imm = 0x2BB550
movslq -0xe4(%rbp), %rax
movq %rax, -0x398(%rbp)
leaq -0x398(%rbp), %rsi
callq 0x56b20
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x3a0(%rbp)
leaq -0x3a0(%rbp), %rsi
callq 0x56b40
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x38(%rbp)
je 0x51fda
movq -0x3c8(%rbp), %rdi
addq $0x2c3c50, %rdi         # imm = 0x2C3C50
movslq -0xe4(%rbp), %rax
movq %rax, -0x3a8(%rbp)
leaq -0x3a8(%rbp), %rsi
callq 0x56b20
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x3b0(%rbp)
leaq -0x3b0(%rbp), %rsi
callq 0x56b40
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x3c8(%rbp), %rdi
addq $0x2b9390, %rdi         # imm = 0x2B9390
movslq -0xe4(%rbp), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x3b8(%rbp), %rsi
callq 0x568e0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
movq %rax, -0x3c0(%rbp)
leaq -0x3c0(%rbp), %rsi
callq 0x4aae0
movq %rax, -0x418(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x23d60
movq -0x418(%rbp), %rdi
movq %rax, %rsi
callq 0x12a60
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopl (%rax)