// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::TurnDashPlaning(Agent&, AtomicAction&, Vector, double, double, bool, bool)
void Dasher::TurnDashPlaning(Agent &agent, AtomicAction &act, Vector target,
                             double buffer, double power, bool inverse,
                             bool turn_first) {
  act.Clear();

  power = inverse ? -fabs(power) : fabs(power);
  power = agent.GetSelf().CorrectDashPowerForStamina(power);

  PlayerState &self = agent.Self();
  const Vector &my_pre_pos = self.GetPredictedPos(1);
  double target_dist = my_pre_pos.Dist(target);
  AngleDeg target_ang =
      inverse
          ? GetNormalizeAngleDeg((my_pre_pos - target).Dir() -
                                 agent.GetSelf().GetBodyDir())
          : GetNormalizeAngleDeg((target - my_pre_pos).Dir() -
                                 agent.GetSelf().GetBodyDir()); //需要转身的角度

  // DT_none
  //处理转身问题,可能1dash + 1turn更好
  double bufang;
  if (buffer > FLOAT_EPS) {
    bufang = ASin(buffer / target_dist / 2) * 2;
    bufang = Max(10.0, bufang);
  } else {
    bufang = 0.0;
  }

  const double &effort = self.GetEffort();
  const double &accrate = self.GetDashPowerRate();
  const double &inertia_moment = self.GetInertiaMoment();
  const double &decay = self.GetPlayerDecay();
  const double &speedmax = self.GetEffectiveSpeedMax();
  const Vector &vel = self.GetVel();

  const double &facing = self.GetBodyDir();
  double speed = vel.Mod();

  double diffang = fabs(target_ang);
  double oneturnang = self.GetMaxTurnAngle();
  if (buffer < FLOAT_EPS && target_dist > 2.6) {
    oneturnang += 2.6;
  }

  if (turn_first || diffang <= oneturnang ||
      speed <
          0.04) { //由于噪声的存在，在非身体方向也有速度，调也调不过来，太小时不如直接转,0.04是一般队员的误差极值
    act.mType = CT_Turn;
    act.mTurnAngle = target_ang;
    act.mSucceed = true;
    return;
  } else {
    //计算1 dash + 1turn;
    //下面都是算dash到什么速度最好
    double mspd1 = (180.0 / (diffang + 10) - 1.0) /
                   inertia_moment; // 10是buf，不然容易调整后正好还转不过来
    double dash2spd = Min(mspd1 / decay, speedmax) /
                      (1 + ServerParam::instance().playerRand());

    if (fabs(GetNormalizeAngleDeg(vel.Dir() - facing)) > 90.0) {
      speed = -speed;
    }

    double spd_inf = Max(
        speed - accrate * ServerParam::instance().maxDashPower(), -dash2spd);
    double spd_sup =
        Min(speed + accrate * ServerParam::instance().maxDashPower(), dash2spd);
    Ray cur_r(self.GetPos(), facing);
    Vector pt_inf = cur_r.GetPoint(spd_inf * (1.0 + decay));
    Vector pt_sup = cur_r.GetPoint(spd_sup * (1.0 + decay));
    Vector pt;     //要取得点
    bool bnegtive; //要跑的点是不是在身后
    Line pdl = Line(cur_r).GetPerpendicular(target); //垂线
    if (pdl.IsPointInSameSide(pt_inf, pt_sup)) {
      if (fabs(GetNormalizeAngleDeg(facing - target_ang)) < 90.0) {
        pt = pt_sup;
        bnegtive = (spd_sup < 0);
      } else {
        pt = pt_inf;
        bnegtive = (spd_inf < 0);
      }
    } else {
      double dist;
      bnegtive = !cur_r.Intersection(pdl, dist); //垂点
      pt = cur_r.GetPoint(dist);
    }
    double dis =
        pt.Dist(target); //两个周期后离point的距离,用来compare with 2 turn
    double twoturnang =
        oneturnang + 180.0 / (1.0 + inertia_moment * fabs(speed) * decay);
    if (twoturnang > diffang) {
      const Vector &pt2 = self.GetPredictedPos(2);
      double dis2 = pt2.Dist(target);
      if (dis2 < dis || diffang > 102.6) { //一次转太大，误差也大不如直接2turn
        act.mType = CT_Turn;
        act.mTurnAngle = target_ang;
        act.mSucceed = true;
        return;
      }
    }
    double spd_need;
    if (bnegtive) {
      spd_need = -(pt - self.GetPos()).Mod() / (1.0 + decay);
    } else {
      spd_need = (pt - self.GetPos()).Mod() / (1.0 + decay);
    }
    //会总是dash而dash后又转不过来...,看着就像不拿球
    double turnang_after_dash =
        180.0 / (1.0 + inertia_moment * fabs(spd_need) * decay) - 5.0;
    if (GetAngleDegDiffer((target - pt).Dir(), facing) > turnang_after_dash) {
      act.mType = CT_Turn;
      act.mTurnAngle = target_ang;
      act.mSucceed = true;
      return;
    }
    double power = (spd_need - speed) / accrate / effort;

    power = MinMax(-ServerParam::instance().maxDashPower(), power,
                   ServerParam::instance().maxDashPower());

    // I over
    act.mType = CT_Dash;
    act.mDashPower = AdjustPowerForDash(self, pt, FLOAT_EPS, power);
    act.mDashPower = agent.GetSelf().CorrectDashPowerForStamina(act.mDashPower);
    if (fabs(act.mDashPower) > FLOAT_EPS) {
      act.mSucceed = true;
    } else {
      act.mType = CT_Turn; // power为零时就不要执行了，没意义
      act.mTurnAngle = 0.0;
      act.mSucceed = true;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %r8d, -0x60(%rbp)
movl %ecx, %r13d
movaps %xmm2, -0x80(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movq %rsi, %rbx
movb $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdx)
movups %xmm0, 0x14(%rdx)
movq %rdx, -0x48(%rbp)
movups %xmm0, 0x20(%rdx)
testl %ecx, %ecx
jne 0x2012f
andps 0x48ee3(%rip), %xmm3    # 0x69010
jmp 0x20136
orps 0x48eea(%rip), %xmm3    # 0x69020
movaps %xmm3, -0x40(%rbp)
movq %rbx, %rdi
callq 0xe75a
movq %rax, %rdi
movaps -0x40(%rbp), %xmm0
callq 0x45d84
movq %rbx, %rdi
callq 0x13392
movq %rax, %r15
movq 0x68(%rax), %r14
movl $0x1, -0x170(%rbp)
movl $0x1, %eax
cmpl $0x0, 0x668(%r14)
jg 0x2018c
leaq -0x170(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xef58
movslq (%r12), %rax
shlq $0x4, %rax
movsd 0x8(%r14,%rax), %xmm3
movsd 0x10(%r14,%rax), %xmm2
movapd %xmm3, %xmm1
movapd -0xa0(%rbp), %xmm5
subsd %xmm5, %xmm1
movapd %xmm2, %xmm0
movapd -0xc0(%rbp), %xmm6
subsd %xmm6, %xmm0
movapd %xmm0, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm1, %xmm7
mulsd %xmm1, %xmm7
addsd %xmm4, %xmm7
movapd %xmm7, -0x90(%rbp)
testb %r13b, %r13b
je 0x2026b
movapd 0x48e25(%rip), %xmm2    # 0x69010
movapd %xmm1, %xmm4
andpd %xmm2, %xmm4
movsd 0x48e45(%rip), %xmm3    # 0x69040
ucomisd %xmm4, %xmm3
jbe 0x2020f
andpd %xmm0, %xmm2
xorpd %xmm4, %xmm4
ucomisd %xmm2, %xmm3
ja 0x20228
callq 0x90d0
movapd %xmm0, %xmm4
mulsd 0x48e28(%rip), %xmm4    # 0x69048
divsd 0x48e28(%rip), %xmm4    # 0x69050
movapd %xmm4, -0x40(%rbp)
movq %rbx, %rdi
callq 0xe75a
movapd -0x40(%rbp), %xmm2
subsd 0xb0(%rax), %xmm2
movsd 0x48e16(%rip), %xmm0    # 0x69060
ucomisd %xmm2, %xmm0
jbe 0x202fc
movsd 0x48e14(%rip), %xmm1    # 0x69070
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
ja 0x2025c
jmp 0x20346
movapd %xmm5, %xmm1
subsd %xmm3, %xmm1
movapd %xmm6, %xmm0
subsd %xmm2, %xmm0
movapd 0x48d8d(%rip), %xmm2    # 0x69010
movapd %xmm1, %xmm4
andpd %xmm2, %xmm4
movsd 0x48dad(%rip), %xmm3    # 0x69040
ucomisd %xmm4, %xmm3
jbe 0x202a7
andpd %xmm0, %xmm2
xorpd %xmm4, %xmm4
ucomisd %xmm2, %xmm3
ja 0x202c0
callq 0x90d0
movapd %xmm0, %xmm4
mulsd 0x48d90(%rip), %xmm4    # 0x69048
divsd 0x48d90(%rip), %xmm4    # 0x69050
movapd %xmm4, -0x40(%rbp)
movq %rbx, %rdi
callq 0xe75a
movapd -0x40(%rbp), %xmm2
subsd 0xb0(%rax), %xmm2
movsd 0x48d7e(%rip), %xmm0    # 0x69060
ucomisd %xmm2, %xmm0
jbe 0x20322
movsd 0x48d80(%rip), %xmm1    # 0x69070
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
ja 0x202f0
jmp 0x20346
ucomisd 0x48d44(%rip), %xmm2    # 0x69048
jb 0x20346
movsd 0x48d5a(%rip), %xmm0    # 0x69068
movsd 0x48d32(%rip), %xmm1    # 0x69048
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jae 0x20316
jmp 0x20346
ucomisd 0x48d1e(%rip), %xmm2    # 0x69048
jb 0x20346
movsd 0x48d34(%rip), %xmm0    # 0x69068
movsd 0x48d0c(%rip), %xmm1    # 0x69048
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jae 0x2033c
movapd %xmm2, -0x40(%rbp)
movq %rbx, -0xb0(%rbp)
xorps %xmm0, %xmm0
sqrtsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movapd -0x80(%rbp), %xmm0
ucomisd 0x48cce(%rip), %xmm0    # 0x69040
jbe 0x203a4
movapd -0x80(%rbp), %xmm0
divsd -0x90(%rbp), %xmm0
mulsd 0x494ef(%rip), %xmm0    # 0x69878
movapd 0x48c7f(%rip), %xmm1    # 0x69010
andpd %xmm0, %xmm1
ucomisd 0x49f23(%rip), %xmm1    # 0x6a2c0
jae 0x203a4
callq 0x9840
callq 0x43dce
movq 0x5c38(%rax), %rbx
movslq 0x114(%r15), %r14
callq 0x43dce
movq 0x5c38(%rax), %r12
movslq 0x114(%r15), %r13
callq 0x43dce
cmpb $0x0, -0x60(%rbp)
movapd -0x40(%rbp), %xmm3
je 0x203f2
movq -0x48(%rbp), %rax
movl $0x1, 0x4(%rax)
movsd %xmm3, 0x18(%rax)
movb $0x1, (%rax)
jmp 0x20ca2
movapd 0x48c16(%rip), %xmm4    # 0x69010
andpd %xmm3, %xmm4
movsd 0x158(%r15), %xmm0
movsd 0x49ee1(%rip), %xmm1    # 0x6a2f0
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
cmpltsd -0x90(%rbp), %xmm1
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
movapd -0x80(%rbp), %xmm2
cmpltsd 0x48c06(%rip), %xmm2    # 0x69040
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, -0x80(%rbp)
ucomisd %xmm4, %xmm2
jae 0x203da
movsd 0x30(%r15), %xmm0
movsd 0x38(%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
movsd 0x49e80(%rip), %xmm0    # 0x6a2f8
movapd %xmm1, -0x140(%rbp)
ucomisd %xmm1, %xmm0
ja 0x203da
imulq $0x3700, %r14, %rcx     # imm = 0x3700
addq %rcx, %rbx
addq $0x3030, %rbx           # imm = 0x3030
imulq $0x3700, %r13, %rcx     # imm = 0x3700
leaq (%r12,%rcx), %rdx
addq $0x3028, %rdx           # imm = 0x3028
movq 0x5c38(%rax), %rax
movslq 0x114(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
addq %rcx, %rax
addq $0x3020, %rax           # imm = 0x3020
movq %r15, %r14
addq $0x30, %r14
movsd 0x49286(%rip), %xmm0    # 0x69760
movapd %xmm4, -0xe0(%rbp)
addsd %xmm4, %xmm0
movsd 0x48b5a(%rip), %xmm1    # 0x69048
divsd %xmm0, %xmm1
addsd 0x48b9e(%rip), %xmm1    # 0x69098
movq %rdx, -0xa8(%rbp)
divsd (%rdx), %xmm1
movq %rax, -0x90(%rbp)
divsd (%rax), %xmm1
movsd 0x60(%r15), %xmm0
minsd %xmm1, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x49360
movsd 0x3028(%rax), %xmm0
addsd 0x48b24(%rip), %xmm0    # 0x69058
movapd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, -0x60(%rbp)
movq %r14, %rdi
callq 0xe702
subsd 0xb0(%r15), %xmm0
movsd 0x48b05(%rip), %xmm3    # 0x69060
ucomisd %xmm0, %xmm3
jbe 0x20575
movsd 0x48b07(%rip), %xmm1    # 0x69070
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm3
ja 0x20569
jmp 0x20599
ucomisd 0x48acb(%rip), %xmm0    # 0x69048
jb 0x20599
movsd 0x48ae1(%rip), %xmm1    # 0x69068
movsd 0x48ab9(%rip), %xmm2    # 0x69048
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jae 0x2058f
andpd 0x48a6f(%rip), %xmm0    # 0x69010
movapd -0x140(%rbp), %xmm3
movapd %xmm3, %xmm1
xorpd 0x48a6b(%rip), %xmm1    # 0x69020
movsd 0x48af3(%rip), %xmm4    # 0x690b0
cmpltsd %xmm0, %xmm4
andpd %xmm4, %xmm1
andnpd %xmm3, %xmm4
orpd %xmm1, %xmm4
movapd %xmm4, -0xf0(%rbp)
movsd (%rbx), %xmm0
movsd %xmm0, -0xd0(%rbp)
callq 0x49360
movsd -0xd0(%rbp), %xmm1
mulsd 0x33c0(%rax), %xmm1
movapd -0xf0(%rbp), %xmm0
subsd %xmm1, %xmm0
movapd -0x60(%rbp), %xmm1
xorpd 0x48a10(%rip), %xmm1    # 0x69020
maxsd %xmm0, %xmm1
movapd %xmm1, -0xd0(%rbp)
movq %rbx, -0xf8(%rbp)
movsd (%rbx), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x49360
movsd -0x68(%rbp), %xmm0
mulsd 0x33c0(%rax), %xmm0
addsd -0xf0(%rbp), %xmm0
movapd %xmm0, %xmm1
movapd -0x60(%rbp), %xmm0
minsd %xmm1, %xmm0
movapd %xmm0, -0x60(%rbp)
movups 0x8(%r15), %xmm0
leaq -0x170(%rbp), %r12
movaps %xmm0, (%r12)
movsd 0xb0(%r15), %xmm0
movsd %xmm0, 0x10(%r12)
movq -0x90(%rbp), %rbx
movsd (%rbx), %xmm1
addsd 0x489cc(%rip), %xmm1    # 0x69058
mulsd -0xd0(%rbp), %xmm1
movsd %xmm1, -0x68(%rbp)
mulsd 0x489af(%rip), %xmm0    # 0x69050
divsd 0x4899f(%rip), %xmm0    # 0x69048
leaq -0x188(%rbp), %r14
leaq -0x118(%rbp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x92d0
movsd (%r13), %xmm0
movsd -0x68(%rbp), %xmm1
mulsd %xmm1, %xmm0
mulsd (%r14), %xmm1
addsd (%r12), %xmm0
addsd 0x8(%r12), %xmm1
leaq -0x128(%rbp), %rax
movsd %xmm0, (%rax)
movsd %xmm1, 0x8(%rax)
movsd (%rbx), %xmm0
addsd 0x48959(%rip), %xmm0    # 0x69058
mulsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0x4893f(%rip), %xmm0    # 0x69050
mulsd 0x10(%r12), %xmm0
divsd 0x48928(%rip), %xmm0    # 0x69048
movq %r14, %rdi
movq %r13, %rsi
callq 0x92d0
movsd (%r13), %xmm0
movsd -0x68(%rbp), %xmm1
mulsd %xmm1, %xmm0
mulsd (%r14), %xmm1
addsd (%r12), %xmm0
addsd 0x8(%r12), %xmm1
leaq -0x150(%rbp), %r13
movsd %xmm0, (%r13)
movsd %xmm1, 0x8(%r13)
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x220f2
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movapd 0x4889e(%rip), %xmm2    # 0x69020
xorpd %xmm0, %xmm2
movsd %xmm1, (%r14)
mulsd -0xa0(%rbp), %xmm1
mulsd -0xc0(%rbp), %xmm0
subsd %xmm1, %xmm0
movlpd %xmm2, 0x8(%r14)
movsd %xmm0, 0x10(%r14)
leaq -0x188(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %r13, %rdx
callq 0x159c4
testb %al, %al
je 0x2082e
movsd 0xb0(%r15), %xmm0
subsd -0x40(%rbp), %xmm0
movsd 0x48885(%rip), %xmm3    # 0x69060
ucomisd %xmm0, %xmm3
movq -0x48(%rbp), %r13
movq -0xb0(%rbp), %rbx
movq -0xa8(%rbp), %rcx
movapd -0xe0(%rbp), %xmm6
jbe 0x208de
movsd 0x48869(%rip), %xmm2    # 0x69070
movapd -0xa0(%rbp), %xmm1
movapd -0xc0(%rbp), %xmm4
movsd 0x48829(%rip), %xmm5    # 0x69048
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm3
ja 0x2081f
jmp 0x20912
leaq -0x170(%rbp), %r14
leaq -0x188(%rbp), %rsi
leaq -0x100(%rbp), %rdx
movq %r14, %rdi
callq 0x290d0
movl %eax, %r12d
xorb $0x1, %r12b
movsd 0x10(%r14), %xmm0
mulsd 0x487f0(%rip), %xmm0    # 0x69050
divsd 0x487e0(%rip), %xmm0    # 0x69048
leaq -0x118(%rbp), %r13
leaq -0x190(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x92d0
leaq -0x100(%rbp), %rax
movsd (%rax), %xmm8
movsd (%rbx), %xmm7
mulsd %xmm8, %xmm7
mulsd (%r13), %xmm8
addsd (%r14), %xmm7
addsd 0x8(%r14), %xmm8
movq -0x48(%rbp), %r13
movq -0xb0(%rbp), %rbx
movapd -0xa0(%rbp), %xmm1
movapd -0xc0(%rbp), %xmm4
movsd 0x4877e(%rip), %xmm5    # 0x69048
movq -0xa8(%rbp), %rcx
movapd -0xe0(%rbp), %xmm6
jmp 0x20965
ucomisd 0x48762(%rip), %xmm0    # 0x69048
movapd -0xa0(%rbp), %xmm1
movapd -0xc0(%rbp), %xmm4
movsd 0x4874a(%rip), %xmm5    # 0x69048
jb 0x20912
movsd 0x48760(%rip), %xmm2    # 0x69068
addsd %xmm2, %xmm0
ucomisd %xmm5, %xmm0
jae 0x20908
andpd 0x486f6(%rip), %xmm0    # 0x69010
movsd 0x4878e(%rip), %xmm2    # 0x690b0
ucomisd %xmm0, %xmm2
jbe 0x20944
movsd -0x150(%rbp), %xmm7
movsd -0x148(%rbp), %xmm8
xorpd %xmm0, %xmm0
ucomisd -0x60(%rbp), %xmm0
jmp 0x20961
movsd -0x128(%rbp), %xmm7
movsd -0x120(%rbp), %xmm8
xorpd %xmm0, %xmm0
ucomisd -0xd0(%rbp), %xmm0
seta %r12b
movapd -0x140(%rbp), %xmm2
andpd 0x4869b(%rip), %xmm2    # 0x69010
mulsd (%rcx), %xmm2
movq -0x90(%rbp), %rax
mulsd (%rax), %xmm2
addsd 0x486cc(%rip), %xmm2    # 0x69058
movapd %xmm5, %xmm0
divsd %xmm2, %xmm0
movapd -0x80(%rbp), %xmm2
addsd %xmm0, %xmm2
ucomisd %xmm6, %xmm2
movsd %xmm7, -0x48(%rbp)
movsd %xmm8, -0x60(%rbp)
jbe 0x20a83
movq 0x68(%r15), %r14
movl $0x2, -0x118(%rbp)
movl $0x2, %eax
cmpl $0x1, 0x668(%r14)
jg 0x20a1d
leaq -0x118(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xef58
movsd -0x60(%rbp), %xmm8
movsd -0x48(%rbp), %xmm7
movapd -0xe0(%rbp), %xmm6
movq -0xa8(%rbp), %rcx
movsd 0x48645(%rip), %xmm5    # 0x69048
movapd -0xc0(%rbp), %xmm4
movapd -0xa0(%rbp), %xmm1
movslq (%rbx), %rax
movq -0xb0(%rbp), %rbx
ucomisd 0x498db(%rip), %xmm6    # 0x6a300
ja 0x20c8a
movapd %xmm7, %xmm0
subsd %xmm1, %xmm0
movapd %xmm8, %xmm2
subsd %xmm4, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
sqrtsd %xmm0, %xmm0
shlq $0x4, %rax
movsd 0x8(%r14,%rax), %xmm3
movsd 0x10(%r14,%rax), %xmm2
subsd %xmm1, %xmm3
subsd %xmm4, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
sqrtsd %xmm3, %xmm2
ucomisd %xmm2, %xmm0
ja 0x20c8a
movapd %xmm7, %xmm0
subsd 0x8(%r15), %xmm0
movapd %xmm8, %xmm2
subsd 0x10(%r15), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
sqrtsd %xmm0, %xmm9
testb %r12b, %r12b
je 0x20ab7
xorpd 0x48569(%rip), %xmm9    # 0x69020
movq -0x90(%rbp), %rax
movsd (%rax), %xmm0
movapd %xmm0, %xmm2
movsd 0x4858a(%rip), %xmm6    # 0x69058
addsd %xmm6, %xmm2
divsd %xmm2, %xmm9
movapd 0x48531(%rip), %xmm3    # 0x69010
movapd %xmm9, %xmm2
andpd %xmm3, %xmm2
mulsd (%rcx), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm6, %xmm2
movapd %xmm5, %xmm10
divsd %xmm2, %xmm10
subsd %xmm7, %xmm1
subsd %xmm8, %xmm4
movapd %xmm1, %xmm0
andpd %xmm3, %xmm0
movsd 0x48529(%rip), %xmm2    # 0x69040
ucomisd %xmm0, %xmm2
jbe 0x20b2b
andpd %xmm4, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm2
ja 0x20b6a
movapd %xmm4, %xmm0
movapd %xmm9, -0x80(%rbp)
movsd %xmm10, -0xa0(%rbp)
callq 0x90d0
movsd -0xa0(%rbp), %xmm10
movapd -0x80(%rbp), %xmm9
movsd 0x484ee(%rip), %xmm5    # 0x69048
mulsd 0x484e6(%rip), %xmm0    # 0x69048
divsd 0x484e6(%rip), %xmm0    # 0x69050
addsd 0x49795(%rip), %xmm10   # 0x6a308
subsd 0xb0(%r15), %xmm0
movsd 0x484dc(%rip), %xmm3    # 0x69060
ucomisd %xmm0, %xmm3
jbe 0x20ba3
movsd 0x484de(%rip), %xmm1    # 0x69070
movapd -0x40(%rbp), %xmm2
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm3
ja 0x20b97
jmp 0x20bc4
ucomisd 0x4849d(%rip), %xmm0    # 0x69048
movapd -0x40(%rbp), %xmm2
jb 0x20bc4
movsd 0x484ae(%rip), %xmm1    # 0x69068
addsd %xmm1, %xmm0
ucomisd %xmm5, %xmm0
jae 0x20bba
andpd 0x48444(%rip), %xmm0    # 0x69010
ucomisd %xmm10, %xmm0
ja 0x20c8f
subsd -0xf0(%rbp), %xmm9
movq -0xf8(%rbp), %rax
divsd (%rax), %xmm9
divsd 0x80(%r15), %xmm9
movapd %xmm9, -0x80(%rbp)
callq 0x49360
movsd 0x33c0(%rax), %xmm0
xorps 0x48411(%rip), %xmm0    # 0x69020
movaps %xmm0, -0x40(%rbp)
callq 0x49360
movapd -0x80(%rbp), %xmm0
maxsd -0x40(%rbp), %xmm0
movsd 0x33c0(%rax), %xmm3
minsd %xmm0, %xmm3
movl $0x2, 0x4(%r13)
movq %r15, %rsi
movsd -0x48(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
movsd 0x483f5(%rip), %xmm2    # 0x69040
callq 0x20cb4
movsd %xmm0, 0x20(%r13)
movq %rbx, %rdi
callq 0xe75a
movsd 0x20(%r13), %xmm0
movq %rax, %rdi
callq 0x45d84
movsd %xmm0, 0x20(%r13)
andpd 0x48396(%rip), %xmm0    # 0x69010
xorpd %xmm2, %xmm2
ucomisd 0x483ba(%rip), %xmm0    # 0x69040
jbe 0x20c8f
jmp 0x20c9d
movapd -0x40(%rbp), %xmm2
movl $0x1, 0x4(%r13)
movsd %xmm2, 0x18(%r13)
movb $0x1, (%r13)
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq