LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::Instance::Instance()
Formation::Instance::Instance() : mpAgent(0) {
  mpTeammateFormationsImp[0] =
      new TeammateFormation(FT_Attack_Forward, "formations/433_Attack");
  mpTeammateFormationsImp[1] =
      new TeammateFormation(FT_Defend_Back, "formations/433_Defend");
  mpTeammateFormationsImp[2] =
      new TeammateFormation(FT_Attack_Forward, "formations/442_Attack");
  mpTeammateFormationsImp[3] =
      new TeammateFormation(FT_Defend_Back, "formations/442_Defend");
  SetTeammateFormations();

  mpOpponentFormationsImp[0] = new OpponentFormation(0, FT_Attack_Forward);
  mpOpponentFormationsImp[1] = new OpponentFormation(0, FT_Attack_Midfield);
  mpOpponentFormationsImp[2] = new OpponentFormation(0, FT_Defend_Midfield);
  mpOpponentFormationsImp[3] = new OpponentFormation(0, FT_Defend_Back);
  for (int i = 0; i < FT_Max; ++i)
    SetOpponentFormation(FormationType(i), mpOpponentFormationsImp[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x80(%rdi)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94d0
movq %rax, %r14
leaq 0x37281(%rip), %rdx     # 0x5862d
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f710
movq %r14, (%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94d0
movq %rax, %r14
leaq 0x37276(%rip), %rdx     # 0x58643
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x1f710
movq %r14, 0x8(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94d0
movq %rax, %r14
leaq 0x37269(%rip), %rdx     # 0x58659
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f710
movq %r14, 0x10(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94d0
movq %rax, %r14
leaq 0x3725d(%rip), %rdx     # 0x5866f
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x1f710
movq %r14, 0x18(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rcx, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94d0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x202dc
movq %r14, 0x20(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94d0
movq %rax, %r14
pushq $0x1
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x202dc
movq %r14, 0x28(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94d0
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x202dc
movq %r14, 0x30(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94d0
movq %rax, %r14
pushq $0x3
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x202dc
movq %r14, 0x38(%rbx)
xorl %eax, %eax
cmpq $0x4, %rax
je 0x214c6
movq 0x20(%rbx,%rax,8), %rcx
movq %rcx, 0x60(%rbx,%rax,8)
incq %rax
jmp 0x214b1
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x214d1
jmp 0x214d1
jmp 0x214d1
movq %rax, %rbx
movl $0xcf8, %esi            # imm = 0xCF8
jmp 0x214e9
jmp 0x214e1
jmp 0x214e1
jmp 0x214e1
movq %rax, %rbx
movl $0xca8, %esi            # imm = 0xCA8
movq %r14, %rdi
callq 0x94f0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::Instance::~Instance()
Formation::Instance::~Instance() {
  for (int i = 0; i < 4; ++i)
    delete mpOpponentFormationsImp[i];
  for (int i = 0; i < 4; ++i)
    delete mpTeammateFormationsImp[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0x21540
movq 0x20(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2153b
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
jmp 0x21525
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0x2155d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x21558
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
jmp 0x21543
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.h
// Function: Rectangular::AdjustToWithin(Vector const&) const
Vector AdjustToWithin(const Vector &v) const {
    Vector r = v;

    if (r.X() < mLeft) {
      r.SetX(mLeft);
    } else if (r.X() > mRight) {
      r.SetX(mRight);
    }

    if (r.Y() < mTop) {
      r.SetY(mTop);
    } else if (r.Y() > mBottom) {
      r.SetY(mBottom);
    }

    return r;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm2
movsd (%rdi), %xmm0
ucomisd %xmm1, %xmm0
ja 0x2196a
movsd 0x8(%rdi), %xmm3
ucomisd %xmm3, %xmm1
movapd %xmm1, %xmm0
jbe 0x2196a
movapd %xmm3, %xmm0
movsd 0x10(%rdi), %xmm1
ucomisd %xmm2, %xmm1
ja 0x21988
movsd 0x18(%rdi), %xmm3
ucomisd %xmm3, %xmm2
movapd %xmm2, %xmm1
jbe 0x21988
movapd %xmm3, %xmm1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/FormationTactics.cpp
// Function: FormationTacticKickOffPosition::Initial(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int*, int*)
void FormationTacticKickOffPosition::Initial(vector<string> &config,
                                             Unum *index2unum,
                                             int *unum2index) {
  FormationTacticBase::Initial(config, index2unum, unum2index);

  int i(0);
  for (vector<string>::iterator config_iter(config.begin());
       config_iter != config.end() && i < TEAMSIZE; ++config_iter, ++i) {
    stringstream sin(*config_iter);
    double p(0);
    sin >> p;
    mKickOffPosition[i][0].SetX(p);
    sin >> p;
    mKickOffPosition[i][0].SetY(p);
    sin >> p;
    mKickOffPosition[i][1].SetX(p);
    sin >> p;
    mKickOffPosition[i][1].SetY(p);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
testq %rdx, %rdx
leaq 0x541fc(%rip), %rax     # 0x77530
cmoveq %rax, %rdx
movq %rdi, %r14
testq %rcx, %rcx
cmoveq %rax, %rcx
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %rsi, -0x38(%rbp)
movq (%rsi), %r15
addq $0x30, %r14
xorl %ebx, %ebx
leaq -0x1c0(%rbp), %r12
leaq -0x30(%rbp), %r13
movq -0x38(%rbp), %rax
cmpq 0x8(%rax), %r15
je 0x233fc
cmpq $0xb, %rbx
jae 0x233fc
movq %r12, %rdi
movq %r15, %rsi
pushq $0x18
popq %rdx
callq 0x97c0
andq $0x0, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9320
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x18(%r14)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9320
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x10(%r14)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9320
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x8(%r14)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9320
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movq %r12, %rdi
callq 0x9390
addq $0x20, %r15
incq %rbx
addq $0x20, %r14
jmp 0x23362
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x9390
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::Intersection(Line const&, double&) const
bool Ray::Intersection(const Line &l, double &dist) const {
  SinCosT value = SinCos(mDirection);

  double tmp = l.A() * Cos(value) + l.B() * Sin(value);
  if (fabs(tmp) < FLOAT_EPS) // 如果平行
  {
    return false;
  } else {
    dist =
        (-l.C() - l.A() * mOrigin.X() - l.B() * mOrigin.Y()) / tmp; //正弦定理
    return dist >= 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x10, %rdi
callq 0xd7e8
movsd (%r15), %xmm2
movsd 0x8(%r15), %xmm3
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movapd 0x33b25(%rip), %xmm0    # 0x57010
andpd %xmm1, %xmm0
movsd 0x33b49(%rip), %xmm4    # 0x57040
ucomisd %xmm0, %xmm4
jbe 0x23501
xorl %eax, %eax
jmp 0x23531
xorpd 0x33b17(%rip), %xmm2    # 0x57020
mulsd (%r14), %xmm2
subsd 0x10(%r15), %xmm2
mulsd 0x8(%r14), %xmm3
subsd %xmm3, %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, (%rbx)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
setae %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::Intersection(Line const&, Vector&) const
bool Ray::Intersection(const Line &l, Vector &point) const {
  double dist;
  bool ret = Intersection(l, dist);
  if (ret) {
    point = GetPoint(dist);
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
leaq -0x20(%rbp), %rdx
callq 0x234b0
movl %eax, %r14d
testb %al, %al
je 0x2359b
leaq -0x20(%rbp), %rsi
movq %r15, %rdi
callq 0x1cc1e
movsd %xmm0, (%rbx)
movsd %xmm1, 0x8(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::Intersection(Ray const&, Vector&) const
bool Ray::Intersection(const Ray &r, Vector &point) const {
  Line l1(*this);
  Line l2(r);

  if (l1.IsSameSlope(l2)) {
    return false;
  }

  if (!l1.Intersection(l2, point)) {
    return false;
  }

  return IsInRightDir(point) && r.IsInRightDir(point);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1cc46
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1cc46
movabsq $0x3ed92a737110e454, %rax # imm = 0x3ED92A737110E454
leaq -0x30(%rbp), %rdx
movq %rax, (%rdx)
movq %r12, %rdi
movq %r13, %rsi
callq 0x12fae
testb %al, %al
jne 0x23632
leaq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %rbx, %rdx
callq 0x23644
testb %al, %al
je 0x23632
movq %r15, %rdi
movq %rbx, %rsi
callq 0x24252
testb %al, %al
je 0x23632
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24252
jmp 0x23634
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::Intersection(Line const&, Vector&) const
bool Line::Intersection(const Line &l, Vector &point) const {
  if (IsSameSlope(l)) {
    return false;
  }

  if (fabs(mB) > 0.0) {
    if (fabs(l.B()) > 0.0) {
      point.SetX((mC * l.B() - mB * l.C()) / (l.A() * mB - mA * l.B()));
      point.SetY(GetY(point.X()));
    } else {
      point = Vector(-l.C() / l.A(), GetY(-l.C() / l.A()));
    }
  } else {
    point = Vector(-mC / mA, l.GetY(-mC / mA));
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movabsq $0x3ed92a737110e454, %rax # imm = 0x3ED92A737110E454
leaq -0x28(%rbp), %rdx
movq %rax, (%rdx)
callq 0x12fae
movl %eax, %r14d
testb %al, %al
jne 0x23734
movsd 0x8(%r15), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
je 0x236d7
movsd 0x8(%r12), %xmm1
ucomisd %xmm1, %xmm2
je 0x236fc
movsd 0x10(%r12), %xmm2
mulsd %xmm0, %xmm2
movsd 0x10(%r15), %xmm3
mulsd %xmm1, %xmm3
mulsd (%r15), %xmm1
mulsd (%r12), %xmm0
subsd %xmm2, %xmm3
subsd %xmm1, %xmm0
divsd %xmm0, %xmm3
movsd %xmm3, (%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x242bc
jmp 0x2372f
movsd 0x10(%r15), %xmm0
xorpd 0x3393b(%rip), %xmm0    # 0x57020
divsd (%r15), %xmm0
movapd %xmm0, -0x40(%rbp)
leaq -0x28(%rbp), %rsi
movsd %xmm0, (%rsi)
movq %r12, %rdi
jmp 0x23721
movsd 0x10(%r12), %xmm0
xorpd 0x33915(%rip), %xmm0    # 0x57020
divsd (%r12), %xmm0
movapd %xmm0, -0x40(%rbp)
leaq -0x28(%rbp), %rsi
movsd %xmm0, (%rsi)
movq %r15, %rdi
callq 0x242bc
movapd -0x40(%rbp), %xmm1
movsd %xmm1, (%rbx)
movsd %xmm0, 0x8(%rbx)
xorb $0x1, %r14b
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::Intersection(Ray const&, double&) const
bool Ray::Intersection(const Ray &r, double &dist) const {
  Vector point;
  bool ret = Intersection(r, point);
  dist = point.Dist(mOrigin);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdx
callq 0x235aa
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
subsd (%r14), %xmm0
subsd 0x8(%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::GetClosestPoint(Vector const&) const
Vector Ray::GetClosestPoint(const Vector &point) const {
  Line l(*this);
  Vector closest_point = l.GetProjectPoint(point);
  return fabs(GetNormalizeAngleDeg((closest_point - mOrigin).Dir() -
                                   mDirection)) < 90
             ? closest_point
             : this->Origin();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1cc46
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ccb4
movapd %xmm0, -0x30(%rbp)
subsd (%rbx), %xmm0
movsd %xmm1, -0x20(%rbp)
movapd %xmm1, %xmm2
subsd 0x8(%rbx), %xmm2
leaq -0x48(%rbp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm2, 0x8(%rdi)
callq 0xcd30
subsd 0x10(%rbx), %xmm0
movabsq $-0x3f99800000000000, %rax # imm = 0xC066800000000000
leaq -0x38(%rbp), %rdi
movq %rax, (%rdi)
callq 0xd305
movsd -0x20(%rbp), %xmm1
andpd 0x337ee(%rip), %xmm0    # 0x57010
movsd 0x3385e(%rip), %xmm2    # 0x57088
ucomisd %xmm0, %xmm2
ja 0x23835
movsd 0x8(%rbx), %xmm1
cmpltsd %xmm2, %xmm0
movapd -0x30(%rbp), %xmm2
andpd %xmm0, %xmm2
movsd (%rbx), %xmm3
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::IsInBetween(Vector const&, Vector const&, Vector const&) const
bool Line::IsInBetween(const Vector &pt, const Vector &end1,
                       const Vector &end2) const {
  Assert(IsOnLine(end1) && IsOnLine(end2));

  Vector project_pt = GetProjectPoint(pt);
  double dist2 = end1.Dist2(end2);

  return (project_pt.Dist2(end1) < dist2 + FLOAT_EPS &&
          project_pt.Dist2(end2) < dist2 + FLOAT_EPS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
callq 0x1ccb4
movsd (%rbx), %xmm4
movsd 0x8(%rbx), %xmm3
movsd (%r14), %xmm2
movsd 0x8(%r14), %xmm5
movapd %xmm0, %xmm6
subsd %xmm2, %xmm6
subsd %xmm4, %xmm2
movapd %xmm1, %xmm7
subsd %xmm5, %xmm7
subsd %xmm3, %xmm5
mulsd %xmm5, %xmm5
mulsd %xmm2, %xmm2
addsd %xmm5, %xmm2
mulsd %xmm7, %xmm7
mulsd %xmm6, %xmm6
addsd %xmm7, %xmm6
addsd 0x33788(%rip), %xmm2    # 0x57040
ucomisd %xmm6, %xmm2
jbe 0x238db
subsd %xmm4, %xmm0
subsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
seta %al
jmp 0x238dd
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::Intersection(Line const&) const
Vector Line::Intersection(const Line &l) const {
  Vector point;
  if (Intersection(l, point)) {
    return point;
  }
  return Vector(0.0, 0.0); // as WE2008
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorps %xmm0, %xmm0
leaq -0x10(%rbp), %rdx
movaps %xmm0, (%rdx)
callq 0x23644
testb %al, %al
jne 0x23905
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jmp 0x2390f
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::Intersection(Ray const&, Vector&) const
bool Line::Intersection(const Ray &r, Vector &point) const {
  Line l(r);

  if (!Intersection(l, point)) {
    return false;
  } else {
    return r.IsInRightDir(point);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x1cc46
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x23644
testb %al, %al
je 0x23959
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24252
jmp 0x2395b
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::GetClosestPointInBetween(Vector const&, Vector const&, Vector const&) const
Vector Line::GetClosestPointInBetween(const Vector &pt, const Vector &end1,
                                      const Vector &end2) const {
  Assert(IsOnLine(end1) && IsOnLine(end2));

  if (IsInBetween(pt, end1, end2))
    return GetProjectPoint(pt);
  else if (end1.Dist2(pt) < end2.Dist2(pt))
    return end1;
  else
    return end2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x2385a
testb %al, %al
je 0x23995
movq %r12, %rdi
movq %r14, %rsi
callq 0x1ccb4
jmp 0x239fa
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd (%r14), %xmm4
movsd 0x8(%r14), %xmm5
movapd %xmm0, %xmm6
subsd %xmm4, %xmm6
movapd %xmm1, %xmm2
subsd %xmm5, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm6, %xmm6
addsd %xmm2, %xmm6
movsd (%rbx), %xmm2
movsd 0x8(%rbx), %xmm3
movapd %xmm2, %xmm7
subsd %xmm4, %xmm7
movapd %xmm3, %xmm4
subsd %xmm5, %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm7, %xmm7
addsd %xmm4, %xmm7
ucomisd %xmm6, %xmm7
ja 0x239fa
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Circle::Intersection(Ray const&, double&, double&, double const&) const
int Circle::Intersection(const Ray &r, double &t1, double &t2,
                         const double &buffer) const {
  Vector rel_center = (mCenter - r.Origin()).Rotate(-r.Dir());

  if ((mRadius + buffer) <= fabs(rel_center.Y())) {
    return 0;
  } else if (mRadius <= fabs(rel_center.Y())) {
    t1 = rel_center.X() - 0.13;
    t2 = rel_center.X() + 0.13;
    return 2;
  } else {
    double dis = Sqrt(mRadius * mRadius - rel_center.Y() * rel_center.Y());
    t1 = rel_center.X() - dis;
    t2 = rel_center.X() + dis;
    return 2;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
subsd (%rsi), %xmm0
subsd 0x8(%rsi), %xmm1
leaq -0x40(%rbp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm1, 0x8(%rdi)
movsd 0x10(%rsi), %xmm0
xorpd 0x33319(%rip), %xmm0    # 0x57020
leaq -0x30(%rbp), %rsi
movlpd %xmm0, (%rsi)
callq 0xd02c
movapd %xmm0, %xmm4
movsd 0x10(%r12), %xmm0
movsd (%r15), %xmm3
addsd %xmm0, %xmm3
movapd 0x332e0(%rip), %xmm2    # 0x57010
andpd %xmm1, %xmm2
xorl %eax, %eax
ucomisd %xmm3, %xmm2
jae 0x23d9b
ucomisd %xmm0, %xmm2
jae 0x23d5e
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x23d74
sqrtsd %xmm0, %xmm0
jmp 0x23d83
movsd 0x349d2(%rip), %xmm1    # 0x58738
addsd %xmm4, %xmm1
movsd 0x349ce(%rip), %xmm0    # 0x58740
jmp 0x23d8b
movsd %xmm4, -0x28(%rbp)
callq 0x93e0
movsd -0x28(%rbp), %xmm4
movapd %xmm4, %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%r14)
addsd %xmm0, %xmm4
movsd %xmm4, (%rbx)
pushq $0x2
popq %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/InterceptInfo.cpp
// Function: InterceptInfo::VerifyIntInfo(int)
PlayerInterceptInfo *InterceptInfo::VerifyIntInfo(Unum unum) {
  PlayerInterceptInfo *pInfo = GetPlayerInterceptInfo(unum);
  if (!pInfo) {
    return 0;
  }

  if (pInfo->mTime != mpWorldState->CurrentTime()) {
    CalcTightInterception(mpWorldState->GetBall(), pInfo);
    pInfo->mTime = mpWorldState->CurrentTime();
  }

  return pInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x248f2
movq %rax, %r14
testq %rax, %rax
je 0x248ea
movq 0x10(%rbx), %rdi
movl 0x5c(%r14), %eax
cmpl 0x14(%rdi), %eax
jne 0x248cf
movl 0x10(%rdi), %eax
cmpl %eax, 0x58(%r14)
je 0x248ea
addq $0x30, %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x24962
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/InterceptInfo.cpp
// Function: InterceptInfo::GetPlayerInterceptInfo(int) const
PlayerInterceptInfo *InterceptInfo::GetPlayerInterceptInfo(Unum unum) const {
  if (!mpWorldState->GetPlayer(unum).IsAlive()) {
    return 0;
  }

  PlayerInterceptInfo *pInfo = const_cast<PlayerInterceptInfo *>(
      unum > 0 ? &(mTeammateInterceptInfo[unum])
               : &(mOpponentInterceptInfo[-unum]));
  pInfo->mpPlayer = &(mpWorldState->GetPlayer(unum));
  return pInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rcx
testl %esi, %esi
jle 0x24928
decl %esi
imulq $0x178, %rsi, %rdx      # imm = 0x178
cmpb $0x0, 0x1ba(%rcx,%rdx)
je 0x2495e
addq $0xa8, %rcx
imulq $0x90, %rsi, %rax
addq %rdi, %rax
addq $0x20, %rax
jmp 0x24955
notl %esi
movslq %esi, %rax
imulq $0x178, %rax, %rdx      # imm = 0x178
cmpb $0x0, 0x11e2(%rcx,%rdx)
je 0x2495e
addq $0x10d0, %rcx           # imm = 0x10D0
imulq $0x90, %rax, %rax
addq %rdi, %rax
addq $0x650, %rax            # imm = 0x650
addq %rdx, %rcx
movq %rcx, 0x60(%rax)
jmp 0x24960
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/InterceptInfo.cpp
// Function: InterceptInfo::AnalyseInterceptSolution(BallState const&, PlayerInterceptInfo*)
void InterceptInfo::AnalyseInterceptSolution(const BallState &ball,
                                             PlayerInterceptInfo *pInfo) {
  pInfo->mIntervals = (pInfo->solution.interc == 1) ? 1 : 2;
  pInfo->mMinCycle = pInfo->mInterCycle[0];
  if (pInfo->mMinCycle == 0)
    pInfo->mIntervals = 0; //表示可踢
  pInfo->mInterPos = ball.GetPredictedPos(pInfo->mMinCycle);

  if (!ServerParam::instance().pitchRectanglar().IsWithin(pInfo->mInterPos,
                                                          4.0)) {
    pInfo->mRes = IR_Failure;
  } else {
    pInfo->mRes = IR_Success;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl 0x68(%rsi), %esi
xorl %eax, %eax
cmpl $0x1, 0x4(%rbx)
setne %al
incl %eax
movl %eax, 0x88(%rbx)
movl %esi, 0x74(%rbx)
testl %esi, %esi
jne 0x24b68
andl $0x0, 0x88(%rbx)
callq 0xd4c0
leaq 0x78(%rbx), %r14
movups (%rax), %xmm0
movups %xmm0, 0x78(%rbx)
callq 0x3db2c
leaq 0x37f0(%rax), %rdi
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
leaq -0x18(%rbp), %rdx
movq %rax, (%rdx)
movq %r14, %rsi
callq 0x12516
movzbl %al, %eax
incl %eax
movl %eax, 0x8c(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/InterceptModel.cpp
// Function: InterceptModel::PlotInterceptCurve(double, double, double, double, double, double, double)
void InterceptModel::PlotInterceptCurve(double x0, double y0, double v0,
                                        double vp, double ka, double cd,
                                        double max_x) {
  Plotter::instance().GnuplotExecute("alpha = 0.94");
  Plotter::instance().GnuplotExecute("ln(x) = log(x)");
  Plotter::instance().GnuplotExecute(
      "bt(x) = ln(1 - x * (1 - alpha) / v0) / ln(alpha)");
  Plotter::instance().GnuplotExecute("s(x) = sqrt((x - x0)**2 + y0**2)");
  Plotter::instance().GnuplotExecute("pt(x) = (s(x) - ka) / vp - cd");

  Plotter::instance().GnuplotExecute("x0 = %g", x0);
  Plotter::instance().GnuplotExecute("y0 = %g", y0);
  Plotter::instance().GnuplotExecute("v0 = %g", v0);
  Plotter::instance().GnuplotExecute("vp = %g", vp);
  Plotter::instance().GnuplotExecute("ka = %g", ka);
  Plotter::instance().GnuplotExecute("cd = %g", cd);

  Plotter::instance().GnuplotExecute("set xrange[0:%g]", max_x + 1.0);
  Plotter::instance().GnuplotExecute("set yrange[0:]");

  Plotter::instance().GnuplotExecute("plot bt(x), pt(x)");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm6, -0x38(%rbp)
movsd %xmm5, -0x30(%rbp)
movsd %xmm4, -0x28(%rbp)
movsd %xmm3, -0x20(%rbp)
movsd %xmm2, -0x18(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
callq 0x3b114
leaq 0x31e72(%rip), %rsi     # 0x587d1
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e69(%rip), %rsi     # 0x587de
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e62(%rip), %rsi     # 0x587ed
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e7d(%rip), %rsi     # 0x5881e
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e88(%rip), %rsi     # 0x5883f
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e90(%rip), %rsi     # 0x5885d
movq %rax, %rdi
movsd -0x8(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e7d(%rip), %rsi     # 0x58865
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e6a(%rip), %rsi     # 0x5886d
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e57(%rip), %rsi     # 0x58875
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e44(%rip), %rsi     # 0x5887d
movq %rax, %rdi
movsd -0x28(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e31(%rip), %rsi     # 0x58885
movq %rax, %rdi
movsd -0x30(%rbp), %xmm0
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
movsd -0x38(%rbp), %xmm0
addsd 0x305d3(%rip), %xmm0    # 0x57048
leaq 0x31e11(%rip), %rsi     # 0x5888d
movq %rax, %rdi
movb $0x1, %al
callq 0x3b18e
callq 0x3b114
leaq 0x31e0c(%rip), %rsi     # 0x5889e
movq %rax, %rdi
xorl %eax, %eax
callq 0x3b18e
callq 0x3b114
leaq 0x31e05(%rip), %rsi     # 0x588ad
movq %rax, %rdi
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
jmp 0x3b18e
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::ReadUtilityTable()
void Kicker::ReadUtilityTable() {
  std::ifstream in_file("data/kicker_value", std::ios::binary);
  if (!in_file) {
    PRINT_ERROR("open file error");
    return;
  }
  in_file.read((char *)mKickerValue, sizeof(mKickerValue));
  in_file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq 0x31a2a(%rip), %rsi     # 0x588f0
leaq -0x218(%rbp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x9920
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f8(%rbp,%rax)
je 0x26f40
movq 0x50100(%rip), %rdi     # 0x76ff0
leaq 0x31a0b(%rip), %rsi     # 0x58902
callq 0x94b0
leaq 0x3426f(%rip), %rsi     # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x9890
leaq 0x32500(%rip), %rsi     # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x319e6(%rip), %rsi     # 0x58914
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
jmp 0x26f67
addq $0x558, %rbx            # imm = 0x558
leaq -0x218(%rbp), %rdi
movl $0x2b3fb0, %edx         # imm = 0x2B3FB0
movq %rbx, %rsi
callq 0x9610
leaq -0x218(%rbp), %rdi
callq 0x9120
leaq -0x218(%rbp), %rdi
callq 0x9180
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x9180
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::OneCycleKick(Agent const&, bool)
ActionPlan Kicker::OneCycleKick(const Agent &agent, bool is_shoot) {
  UpdateKickData(agent);

  AtomicAction a = GetKickOutAction(agent, mInput.mBallPos, mInput.mBallVel);

  ActionPlan p;
  p.mActionQueue.push_back(a);
  p.mCycle = 1;
  p.mSucceed = a.mSucceed;

  if (p.mSucceed ==
      false) /** mKickSpeed太大或者太小，一脚不能达到该速度，如果是射门则以最大速度射，否则先停球 */
  {
    if (is_shoot) {
      a = GetMaxKickOutAction(agent, mInput.mBallPos, mInput.mBallVel);
    } else {
      a = GetStopBallAction(agent);
    }

    if (a.mSucceed == true) {
      p.mActionQueue.clear();
      p.mActionQueue.push_back(a);
      p.mSucceed = true;
    }
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2703e
leaq 0x2b45b0(%r12), %r13
leaq 0x2b45c0(%r12), %r8
leaq -0x70(%rbp), %r14
pushq $0x1
popq %r9
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r8, -0x40(%rbp)
callq 0x28efa
movq %rbx, %rdi
callq 0x2a916
leaq 0x8(%rbx), %rdi
movq %rdi, -0x38(%rbp)
movq %r14, %rsi
callq 0x2a988
movl $0x1, 0x4(%rbx)
movb -0x70(%rbp), %al
movb %al, (%rbx)
testb %al, %al
jne 0x28566
cmpb $0x0, -0x2c(%rbp)
je 0x28512
leaq -0xa0(%rbp), %rdi
pushq $0x1
popq %r9
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq -0x40(%rbp), %r8
callq 0x29816
jmp 0x28527
leaq -0xa0(%rbp), %rdi
pushq $0x1
popq %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x29008
movups -0xa0(%rbp), %xmm0
movups -0x90(%rbp), %xmm1
movups -0x80(%rbp), %xmm2
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
cmpb $0x1, -0x70(%rbp)
jne 0x28566
movq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x2a952
leaq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x2a988
movb $0x1, (%rbx)
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2857c
jmp 0x2857c
movq %rax, %rbx
movq -0x38(%rbp), %rdi
callq 0x2b0c6
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetKickOutAction(Agent const&, Vector&, Vector&, bool)
AtomicAction Kicker::GetKickOutAction(const Agent &agent, Vector &ball_pos,
                                      Vector &ball_vel, bool is_self) {
  UpdateKickData(agent);

  AtomicAction a;
  a.mType = CT_Kick;
  a.mKickVel = (mKickTarget - ball_pos).SetLength(mKickSpeed) -
               ball_vel; /** 希望kicker产生的球速 */
  a.mKickVel =
      a.mKickVel / (is_self ? agent.GetSelf().GetKickRate()
                            : GetKickRate(ball_pos, mInput.mPlayerType));
  a.mSucceed = (a.mKickVel.Mod() < ServerParam::instance().maxPower());
  return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, -0x30(%rbp)
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2703e
movb $0x0, (%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movl $0x6, 0x4(%rbx)
movsd 0x2b45d8(%r12), %xmm0
movsd 0x2b45e0(%r12), %xmm1
subsd (%r14), %xmm0
subsd 0x8(%r14), %xmm1
leaq -0x40(%rbp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm1, 0x8(%rdi)
leaq 0x2b45d0(%r12), %rsi
callq 0x219b2
subsd (%r13), %xmm0
subsd 0x8(%r13), %xmm1
leaq 0x8(%rbx), %r13
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
cmpl $0x0, -0x30(%rbp)
je 0x28faa
movq %r15, %rdi
callq 0xcd42
movsd 0x130(%rax), %xmm0
jmp 0x28fba
movl 0x2b4580(%r12), %esi
movq %r14, %rdi
callq 0xd05c
movq %r13, %rdi
callq 0x218ee
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x3db2c
movsd 0x3130(%rax), %xmm0
ucomisd -0x30(%rbp), %xmm0
seta (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::KickBall(Agent&, Vector const&, double, KickMode, int*, bool)
bool Kicker::KickBall(Agent &agent, const Vector &target, double speed_out,
                      KickMode mode, int *cycle_left, bool is_shoot) {
  UpdateKickData(agent);

  double speed_buf = 0.0;
  switch (mode) {
  case KM_Hard:
    speed_buf = 0.04;
    break;
  case KM_Quick:
    speed_buf = 0.08; // 要快速踢出去，速度小一点也没关系
    break;
  default:
    speed_buf = 0.06;
    break;
  }

  double speed[] = {0.0, 0.0, 0.0, 0.0, ServerParam::instance().ballSpeedMax()};
  int kick_cycle = 1;
  double kick_speed = speed_out;

  for (int i = 1; i <= 4; ++i) {
    speed[i] = GetMaxSpeed(agent, target, i);

    if (speed[i] < 0.01) // 能产生的速度太小，不考虑
    {
      continue;
    }
    if (speed[i] + speed_buf > speed_out) {
      kick_cycle = i;
      kick_speed = Min(speed_out, speed[i]);
      break;
    }
  }

  if (cycle_left != 0) {
    *cycle_left = kick_cycle - 1;
  }

  bool rt = KickBall(
      agent, target, kick_speed, kick_cycle,
      is_shoot); // 花kick_cycle周期踢球，目标点为target，出球速度为SpeedOut
  return rt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, -0x3c(%rbp)
movq %r8, -0x48(%rbp)
movl %ecx, %ebx
movsd %xmm0, -0x38(%rbp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
xorl %r12d, %r12d
cmpl $0x2, %ecx
sete -0x30(%rbp)
callq 0x2703e
cmpl $0x1, %ebx
je 0x292ee
movb -0x30(%rbp), %al
movb %al, %r12b
leaq 0x2f5fa(%rip), %rax     # 0x588e0
movsd (%rax,%r12,8), %xmm0
jmp 0x292f6
movsd 0x2efc2(%rip), %xmm0    # 0x582b8
movsd %xmm0, -0x30(%rbp)
callq 0x3db2c
pushq $0x1
popq %rax
leaq -0x40(%rbp), %r12
movl %eax, %ebx
movl %ebx, -0x40(%rbp)
cmpl $0x5, %ebx
je 0x2934a
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2789e
movsd 0x2e3e8(%rip), %xmm1    # 0x57718
ucomisd %xmm0, %xmm1
ja 0x29346
movsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
ucomisd -0x38(%rbp), %xmm1
ja 0x29351
incl %ebx
jmp 0x29309
pushq $0x1
popq %rax
movl %eax, %ebx
jmp 0x2935b
minsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x48(%rbp), %rcx
testq %rcx, %rcx
je 0x29369
leal -0x1(%rbx), %eax
movl %eax, (%rcx)
movzbl -0x3c(%rbp), %r8d
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movsd -0x38(%rbp), %xmm0
movl %ebx, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2807c
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetOneKickAction(Agent const&, Vector const&, Vector const&, Vector const&, bool)
AtomicAction Kicker::GetOneKickAction(const Agent &agent,
                                      const Vector &ball_pos,
                                      const Vector &ball_vel,
                                      const Vector &target, bool is_self) {
  UpdateKickData(agent);

  AtomicAction a;
  a.mType = CT_Kick;
  a.mKickVel = (target - ball_pos) - ball_vel;
  a.mKickVel =
      a.mKickVel / (is_self ? agent.GetSelf().GetKickRate()
                            : GetKickRate(ball_pos, mInput.mPlayerType));
  a.mSucceed = (a.mKickVel.Mod() < ServerParam::instance().maxPower());
  return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %r15
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, -0x30(%rbp)
movq %rdx, %rsi
callq 0x2703e
movb $0x0, (%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movl $0x6, 0x4(%rbx)
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
subsd (%r14), %xmm0
subsd 0x8(%r14), %xmm1
subsd (%r15), %xmm0
subsd 0x8(%r15), %xmm1
leaq 0x8(%rbx), %r13
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
cmpb $0x0, 0x10(%rbp)
je 0x297b7
movq -0x30(%rbp), %rdi
callq 0xcd42
movsd 0x130(%rax), %xmm0
jmp 0x297c7
movl 0x2b4580(%r12), %esi
movq %r14, %rdi
callq 0xd05c
movq %r13, %rdi
callq 0x218ee
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x3db2c
movsd 0x3130(%rax), %xmm0
ucomisd -0x30(%rbp), %xmm0
seta (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetMaxKickOutAction(Agent const&, Vector&, Vector&, bool)
AtomicAction Kicker::GetMaxKickOutAction(const Agent &agent, Vector &ball_pos,
                                         Vector &ball_vel, bool is_self) {
  UpdateKickData(agent);

  AngleDeg kick_angle = (mKickTarget - ball_pos).Dir();
  AtomicAction a;
  a.mType = CT_Kick;
  double y = (Sin(ball_vel.Dir() - kick_angle)) * ball_vel.Mod();
  double kick_rate = (is_self ? agent.GetSelf().GetKickRate()
                              : GetKickRate(ball_pos, mInput.mPlayerType));
  double max_speed = ServerParam::instance().maxPower() * kick_rate;
  a.mSucceed = (fabs(y) < max_speed);
  a.mKickVel = Polar2Vector(max_speed, ASin(-y / max_speed) + kick_angle);
  a.mKickVel = a.mKickVel / kick_rate;
  return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x30(%rbp)
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2703e
movsd 0x2b45d8(%r12), %xmm0
movsd 0x2b45e0(%r12), %xmm1
subsd (%r14), %xmm0
subsd 0x8(%r14), %xmm1
leaq -0x80(%rbp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm1, 0x8(%rdi)
callq 0xcd30
movsd %xmm0, -0x38(%rbp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rbx)
andq $0x0, 0x28(%rbx)
movl $0x6, 0x4(%rbx)
movq %r13, %rdi
callq 0xcd30
subsd -0x38(%rbp), %xmm0
mulsd 0x2d803(%rip), %xmm0    # 0x570a8
divsd 0x2d7bb(%rip), %xmm0    # 0x57068
callq 0x9130
movapd %xmm0, -0x50(%rbp)
movsd (%r13), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd 0x8(%r13), %xmm0
movsd %xmm0, -0x58(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x298e5
movq %r15, %rdi
callq 0xcd42
movsd 0x130(%rax), %xmm0
jmp 0x298f5
movl 0x2b4580(%r12), %esi
movq %r14, %rdi
callq 0xd05c
movsd %xmm0, -0x30(%rbp)
movsd -0x58(%rbp), %xmm1
mulsd %xmm1, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movapd -0x50(%rbp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, -0x50(%rbp)
callq 0x3db2c
movsd 0x3130(%rax), %xmm0
mulsd -0x30(%rbp), %xmm0
movapd 0x2d6d4(%rip), %xmm1    # 0x57010
movapd -0x50(%rbp), %xmm2
andpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
seta (%rbx)
leaq -0x80(%rbp), %r14
xorpd 0x2d6c8(%rip), %xmm2    # 0x57020
movsd %xmm0, (%r14)
divsd %xmm0, %xmm2
leaq -0x68(%rbp), %rdi
movsd %xmm2, (%rdi)
callq 0x1cba1
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
leaq -0x70(%rbp), %rsi
movsd %xmm1, (%rsi)
movq %r14, %rdi
callq 0xd15b
leaq 0x8(%rbx), %rdi
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
movsd -0x30(%rbp), %xmm0
callq 0x218ee
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetAccelerateBallAction(Agent const&, Vector&)
AtomicAction Kicker::GetAccelerateBallAction(const Agent &agent,
                                             Vector &goal_vel) {
  UpdateKickData(agent);

  AtomicAction action;
  action.mType = CT_Kick;

  Vector accel = goal_vel.Rotate(-mInput.mPlayerBodyDir) - mInput.mBallVel;
  action.mKickVel = accel / agent.GetSelf().GetKickRate();
  if (action.mKickVel.Mod() <= ServerParam::instance().maxPower()) {
    action.mSucceed = true;
  } else {
    action.mSucceed = false;
    action.mKickVel =
        action.mKickVel.SetLength(ServerParam::instance().maxPower());
  }

  return action;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2703e
andq $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl $0x6, 0x4(%rbx)
movsd 0x2b45a8(%r15), %xmm0
xorpd 0x2cb1c(%rip), %xmm0    # 0x57020
leaq -0x30(%rbp), %rsi
movlpd %xmm0, (%rsi)
movq %r12, %rdi
callq 0xd02c
subsd 0x2b45c0(%r15), %xmm0
subsd 0x2b45c8(%r15), %xmm1
leaq -0x40(%rbp), %r15
movsd %xmm0, (%r15)
movsd %xmm1, 0x8(%r15)
movq %r14, %rdi
callq 0xcd42
movsd 0x130(%rax), %xmm0
movq %r15, %rdi
callq 0x218ee
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x3db2c
movsd 0x3130(%rax), %xmm0
ucomisd -0x28(%rbp), %xmm0
jae 0x2a5a7
leaq 0x8(%rbx), %r14
movb $0x0, (%rbx)
callq 0x3db2c
leaq 0x3130(%rax), %rsi
movq %r14, %rdi
callq 0x219b2
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
jmp 0x2a5aa
movb $0x1, (%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.cpp
// Function: Kicker::GetKickBallToAngleAction(Agent const&, double, double)
AtomicAction Kicker::GetKickBallToAngleAction(const Agent &agent,
                                              AngleDeg rel_angle,
                                              double rel_dist_rate) {
  UpdateKickData(agent);

  AtomicAction action;
  action.mType = CT_Kick;

  Vector target =
      mInput.mPlayerVel +
      Polar2Vector(agent.GetSelf().GetKickableArea() * rel_dist_rate,
                   rel_angle);
  action.mKickVel = (target - mInput.mBallPos - mInput.mBallVel) /
                    agent.GetSelf().GetKickRate();
  action.mKickVel = action.mKickVel.SetLength(action.mKickVel.Mod() - 0.01);
  if (action.mKickVel.Mod() <= ServerParam::instance().maxPower()) {
    action.mSucceed = true;
    return action;
  } else {
    action.mSucceed = false;
    return action;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm1, -0x30(%rbp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x48(%rbp), %r12
movsd %xmm0, (%r12)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2703e
movb $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
andq $0x0, 0x28(%rbx)
movl $0x6, 0x4(%rbx)
movq %r14, %rdi
callq 0xcd42
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movsd -0x30(%rbp), %xmm0
mulsd (%rax), %xmm0
leaq -0x40(%rbp), %r13
movsd %xmm0, (%r13)
movq %r13, %rdi
movq %r12, %rsi
callq 0xd15b
addsd 0x2b4598(%r15), %xmm0
addsd 0x2b45a0(%r15), %xmm1
subsd 0x2b45b0(%r15), %xmm0
subsd 0x2b45b8(%r15), %xmm1
subsd 0x2b45c0(%r15), %xmm0
subsd 0x2b45c8(%r15), %xmm1
movsd %xmm0, (%r13)
movsd %xmm1, 0x8(%r13)
movq %r14, %rdi
callq 0xcd42
movsd 0x130(%rax), %xmm0
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x218ee
leaq 0x8(%rbx), %rdi
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
addsd 0x2e221(%rip), %xmm0    # 0x588d8
movsd %xmm0, (%r14)
leaq -0x40(%rbp), %rsi
callq 0x219b2
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x3db2c
movsd 0x3130(%rax), %xmm0
ucomisd -0x30(%rbp), %xmm0
setae (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Kicker.h
// Function: Kicker::GetOneKickMaxSpeed(Vector const&, double const&, double const&)
double GetOneKickMaxSpeed(const Vector &ball_vel, const double &kick_angle,
                            const double &max_accel) {
    SinCosT value = SinCos(ball_vel.Dir() - kick_angle);

    double y = Sin(value) * ball_vel.Mod();

    if (fabs(y) < max_accel) {
      double x = Cos(value) * ball_vel.Mod();
      return (MinMax(0.0, Sqrt(max_accel * max_accel - y * y) + x,
                     ServerParam::instance().ballSpeedMax()));
    } else {
      return 0.0;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
callq 0xcd30
subsd (%r14), %xmm0
leaq -0x28(%rbp), %rdi
movsd %xmm0, (%rdi)
callq 0xd7e8
movsd (%r15), %xmm3
movsd 0x8(%r15), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
sqrtsd %xmm3, %xmm3
mulsd %xmm3, %xmm0
movapd 0x2c775(%rip), %xmm4    # 0x57010
andpd %xmm0, %xmm4
movsd (%rbx), %xmm5
xorpd %xmm2, %xmm2
ucomisd %xmm4, %xmm5
jbe 0x2a907
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm0
mulsd %xmm5, %xmm5
subsd %xmm0, %xmm5
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm5
jb 0x2a8cd
sqrtsd %xmm5, %xmm0
jmp 0x2a8e0
movapd %xmm5, %xmm0
movsd %xmm1, -0x20(%rbp)
callq 0x93e0
movsd -0x20(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
callq 0x3db2c
movsd -0x20(%rbp), %xmm0
maxsd 0x2d9e5(%rip), %xmm0    # 0x582e0
movsd 0x30f8(%rax), %xmm2
minsd %xmm0, %xmm2
movapd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.h
// Function: ReciprocalCurve::GetOutput(double const&, bool) const
double GetOutput(const double &x, const bool limited = true) const {
    double value = mA + mB / (x + mC);
    if (limited == true) {
      if (value < mOutMin) {
        value = mOutMin;
      } else if (value > mOutMax) {
        value = mOutMax;
      }
    }
    return value;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x8(%rdi), %xmm1
movsd (%rsi), %xmm0
addsd 0x10(%rdi), %xmm0
divsd %xmm0, %xmm1
addsd (%rdi), %xmm1
testl %edx, %edx
je 0x2aa40
movsd 0x18(%rdi), %xmm0
ucomisd %xmm1, %xmm0
ja 0x2aa44
movsd 0x20(%rdi), %xmm2
ucomisd %xmm2, %xmm1
movapd %xmm1, %xmm0
jbe 0x2aa44
movapd %xmm2, %xmm0
jmp 0x2aa44
movapd %xmm1, %xmm0
popq %rbp
retq