// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Simulator.cpp
// Function: Simulator::Player::Dash(double, int)
void Simulator::Player::Dash(double power, int dir_idx) {
  power = GetNormalizeDashPower(power);

  AngleDeg dir = Dasher::DASH_DIR[dir_idx];
  double dir_rate = Dasher::DIR_RATE[dir_idx];
  ;

  bool back_dash = power < 0.0;

  double power_need = (back_dash ? power * -2.0 : power);
  power_need = std::min(
      power_need,
      mStamina +
          PlayerParam::instance().HeteroPlayer(mPlayerType).extraStamina());
  mStamina = std::max(0.0, mStamina - power_need);

  power = (back_dash ? power_need / -2.0 : power_need);

  double acc = std::fabs(
      mEffort * power * dir_rate *
      PlayerParam::instance().HeteroPlayer(mPlayerType).dashPowerRate());

  if (back_dash) {
    dir += 180.0;
  }

  mVel += Polar2Vector(acc, GetNormalizeAngleDeg(mBodyDir + dir));
  Step();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x10af0
movsd %xmm0, -0x10(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x7cbf9(%rip), %rdi     # 0x104f78
leaq -0x28(%rbp), %rsi
callq 0x323c0
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x7cc38(%rip), %rdi     # 0x104fd8
leaq -0x38(%rbp), %rsi
callq 0x323c0
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
seta %al
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
je 0x883df
movsd 0x38c48(%rip), %xmm0    # 0xc1018
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x883ec
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x90(%rbp), %rax
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
cvtsi2sdl 0x28(%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
callq 0x798a0
movq -0x90(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x12bc0
movsd -0xa0(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x12ac0
movq %rax, %rcx
movq -0x90(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
cvtsi2sdl 0x28(%rax), %xmm0
subsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x12b00
movq %rax, %rcx
movq -0x90(%rbp), %rax
cvttsd2si (%rcx), %ecx
movl %ecx, 0x28(%rax)
testb $0x1, -0x39(%rbp)
je 0x884b4
movsd -0x48(%rbp), %xmm0
movsd 0x38b72(%rip), %xmm1    # 0xc1018
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
jmp 0x884c1
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x90(%rbp), %rax
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x30(%rax), %xmm0
mulsd -0x10(%rbp), %xmm0
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
callq 0x798a0
movq -0x90(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x12fc0
movsd -0xb0(%rbp), %xmm0
mulsd (%rax), %xmm0
movaps 0x38b41(%rip), %xmm1    # 0xc1060
pand %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
testb $0x1, -0x39(%rbp)
je 0x88540
movsd 0x38af2(%rip), %xmm0    # 0xc1028
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x90(%rbp), %rax
movsd 0x20(%rax), %xmm0
addsd -0x20(%rbp), %xmm0
movsd 0x38ad7(%rip), %xmm1    # 0xc1030
movsd %xmm1, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x116b0
movsd %xmm0, -0x80(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x112c0
movq -0x90(%rbp), %rdi
movsd %xmm0, -0x78(%rbp)
movsd %xmm1, -0x70(%rbp)
addq $0x10, %rdi
leaq -0x78(%rbp), %rsi
callq 0x32ae0
movq -0x90(%rbp), %rdi
callq 0x88690
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)