// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %r14d
movsd %xmm0, -0x30(%rbp)
movq %rdi, %rbx
callq 0x49360
movq %rax, %r15
callq 0x49360
movsd -0x30(%rbp), %xmm1
maxsd 0x33c8(%r15), %xmm1
movsd 0x33c0(%rax), %xmm0
minsd %xmm1, %xmm0
movslq %r14d, %rax
leaq 0x40047(%rip), %rcx     # 0x8ae18
movsd (%rcx,%rax,8), %xmm1
movapd %xmm1, -0x60(%rbp)
leaq 0x40096(%rip), %rcx     # 0x8ae78
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movapd %xmm0, -0x50(%rbp)
ja 0x4adf8
movsd %xmm0, -0x20(%rbp)
jmp 0x4ae09
movsd 0x1e280(%rip), %xmm1    # 0x69080
mulsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd (%rcx,%rax,8), %xmm0
movaps %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x28(%rbx), %xmm0
movapd %xmm0, -0x40(%rbp)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x38(%rbx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movapd -0x40(%rbp), %xmm1
addsd 0x3050(%rax,%rcx), %xmm1
minsd -0x20(%rbp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x28(%rbx), %xmm0
movapd %xmm1, -0x40(%rbp)
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
maxsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x28(%rbx)
movsd 0x30(%rbx), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x38(%rbx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x1e1b6(%rip), %xmm1    # 0x69048
movapd -0x60(%rbp), %xmm2
addsd %xmm2, %xmm1
movapd -0x50(%rbp), %xmm4
movapd %xmm4, %xmm0
cmpltsd 0x1e1e3(%rip), %xmm0    # 0x69090
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addsd 0x20(%rbx), %xmm0
movsd 0x3030(%rax,%rcx), %xmm1
movsd 0x1e191(%rip), %xmm2    # 0x69060
ucomisd %xmm0, %xmm2
jbe 0x4aee9
movsd 0x1e193(%rip), %xmm3    # 0x69070
addsd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
ja 0x4aedd
jmp 0x4af0d
ucomisd 0x1e157(%rip), %xmm0    # 0x69048
jb 0x4af0d
movsd 0x1e16d(%rip), %xmm2    # 0x69068
movsd 0x1e145(%rip), %xmm3    # 0x69048
addsd %xmm2, %xmm0
ucomisd %xmm3, %xmm0
jae 0x4af03
movsd 0x1e173(%rip), %xmm2    # 0x69088
movapd -0x40(%rbp), %xmm5
mulsd %xmm5, %xmm2
xorpd %xmm3, %xmm3
cmpltsd %xmm3, %xmm4
andpd %xmm4, %xmm2
andnpd %xmm5, %xmm4
orpd %xmm2, %xmm4
movsd -0x20(%rbp), %xmm2
mulsd %xmm4, %xmm2
movapd -0x30(%rbp), %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
andpd 0x1e0bf(%rip), %xmm3    # 0x69010
movapd %xmm3, -0x30(%rbp)
mulsd 0x1e0f2(%rip), %xmm0    # 0x69050
divsd 0x1e0e2(%rip), %xmm0    # 0x69048
leaq -0x70(%rbp), %r14
leaq -0x68(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x92d0
movsd (%r15), %xmm0
movapd -0x30(%rbp), %xmm1
mulsd %xmm1, %xmm0
mulsd (%r14), %xmm1
addsd 0x10(%rbx), %xmm0
movsd %xmm0, 0x10(%rbx)
addsd 0x18(%rbx), %xmm1
movsd %xmm1, 0x18(%rbx)
movq %rbx, %rdi
callq 0x4b08a
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop