LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::Instance::SetTeammateFormations()
void Formation::Instance::SetTeammateFormations() {
  mpTeammateFormations[FT_Attack_Forward] = mpTeammateFormationsImp[0];
  mpTeammateFormations[FT_Attack_Midfield] = mpTeammateFormationsImp[0];
  mpTeammateFormations[FT_Defend_Midfield] = mpTeammateFormationsImp[1];
  mpTeammateFormations[FT_Defend_Back] = mpTeammateFormationsImp[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movq $0x0, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x409f0
movq -0x58(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x70(%rbp)
addq $0x40, %rdi
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x409f0
movq -0x70(%rbp), %rcx
movq -0x58(%rbp), %rdi
movq %rcx, (%rax)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x409f0
movq -0x58(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x68(%rbp)
addq $0x40, %rdi
movq $0x1, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x409f0
movq -0x68(%rbp), %rcx
movq -0x58(%rbp), %rdi
movq %rcx, (%rax)
movq $0x1, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x409f0
movq -0x58(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x60(%rbp)
addq $0x40, %rdi
movq $0x2, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x409f0
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rdi
movq %rcx, (%rax)
movq $0x1, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x409f0
movq -0x58(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x50(%rbp)
addq $0x40, %rdi
movq $0x3, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x409f0
movq -0x50(%rbp), %rcx
movq %rcx, (%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0x3ef98
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x40a10
movq %rax, -0x38(%rbp)
jmp 0x3ef70
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x3ef8b
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3ef8d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3ef4b
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x3efe8
movq -0x30(%rbp), %rdi
movslq -0x1c(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x409f0
movq %rax, -0x48(%rbp)
jmp 0x3efc0
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x3efdb
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3efdd
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3ef9f
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x12860
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x176f0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movsd (%rcx), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3fc08
movq -0x28(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x1ee90
jmp 0x3fc36
leaq -0x10(%rbp), %rdi
callq 0x176f0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movsd (%rcx), %xmm0
ucomisd 0x8(%rax), %xmm0
jbe 0x3fc34
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
leaq -0x10(%rbp), %rdi
callq 0x1ee90
jmp 0x3fc36
leaq -0x10(%rbp), %rdi
callq 0x17700
movq %rax, %rcx
movq -0x28(%rbp), %rax
movsd (%rcx), %xmm1
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3fc68
movq -0x28(%rbp), %rsi
addq $0x10, %rsi
leaq -0x10(%rbp), %rdi
callq 0x26210
jmp 0x3fc96
leaq -0x10(%rbp), %rdi
callq 0x17700
movq %rax, %rcx
movq -0x28(%rbp), %rax
movsd (%rcx), %xmm0
ucomisd 0x18(%rax), %xmm0
jbe 0x3fc94
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
leaq -0x10(%rbp), %rdi
callq 0x26210
jmp 0x3fc96
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Agent.h
// Function: operator<<(std::ostream&, AgentID const&)
std::ostream &operator<<(std::ostream &os, const AgentID &o) {
    if (o.mReverse) {
      return os << '-' << o.mAgentUnum;
    } else {
      return os << '+' << o.mAgentUnum;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0xc(%rax)
je 0x44b9c
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
callq 0xa6e0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0xaa40
movq %rax, -0x8(%rbp)
jmp 0x44bbc
movq -0x10(%rbp), %rdi
movl $0x2b, %esi
callq 0xa6e0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0xaa40
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x10, %rdi
callq 0x12dc0
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x48f70
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x12e20
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x48f80
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x12e40
movsd -0x50(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movaps 0x79e03(%rip), %xmm0    # 0xc1060
pand %xmm0, %xmm1
movsd 0x79d9f(%rip), %xmm0    # 0xc1008
ucomisd %xmm1, %xmm0
jbe 0x47278
movb $0x0, -0x1(%rbp)
jmp 0x4735a
movq -0x18(%rbp), %rdi
callq 0x48fa0
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x48f70
movq -0x58(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0x176f0
movsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movsd (%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x48f80
movq -0x58(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x17700
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
movsd (%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x38(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x471c0
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x4741e
movq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x32610
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x60(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x32670
movq -0x18(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x32670
movsd 0x79b9e(%rip), %xmm0    # 0xc1008
movsd %xmm0, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x1f310
testb $0x1, %al
jne 0x47486
jmp 0x4748c
movb $0x0, -0x1(%rbp)
jmp 0x474da
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x474f0
testb $0x1, %al
jne 0x474a7
movb $0x0, -0x1(%rbp)
jmp 0x474da
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x48fc0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x61(%rbp)
jne 0x474c2
jmp 0x474d2
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x48fc0
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x11a10
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x47430
movq -0x48(%rbp), %rsi
andb $0x1, %al
movb %al, -0x39(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1d6d0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x70, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
movq %rsi, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x32670
movq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x32800
movq -0x68(%rbp), %rsi
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x58(%rbp)
movsd %xmm1, -0x50(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x10520
movq -0x68(%rbp), %rax
subsd 0x10(%rax), %xmm0
movsd 0x796e7(%rip), %xmm1    # 0xc1030
movsd %xmm1, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x116b0
movaps %xmm0, %xmm1
movaps 0x796ff(%rip), %xmm0    # 0xc1060
pand %xmm0, %xmm1
movsd 0x796d3(%rip), %xmm0    # 0xc1040
ucomisd %xmm1, %xmm0
jbe 0x4797d
leaq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x4798a
movq -0x68(%rbp), %rdi
callq 0x32c70
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32800
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x49040
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x49040
movaps %xmm0, %xmm1
movsd 0x795ff(%rip), %xmm0    # 0xc1008
addsd -0x38(%rbp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x39(%rbp)
jbe 0x47a40
movq -0x20(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x49040
movaps %xmm0, %xmm1
movsd 0x795d7(%rip), %xmm0    # 0xc1008
addsd -0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 $0x60, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x11a10
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x474f0
testb $0x1, %al
jne 0x47aa0
jmp 0x47ab2
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x47ad3
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x11a10
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x32670
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x474f0
testb $0x1, %al
jne 0x47b34
movb $0x0, -0x1(%rbp)
jmp 0x47b46
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x48fc0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x479b0
testb $0x1, %al
jne 0x47b97
jmp 0x47bb0
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x32800
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x8(%rbp)
jmp 0x47c02
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x49040
movsd %xmm0, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x49040
movsd -0x40(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x47bef
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x47c02
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Rectangular::Intersection(Ray const&) const
Vector Rectangular::Intersection(const Ray &r) const {
  Vector point;
  bool ret = Intersection(r, point);
  if (!ret)
    return r.Origin(); // as WE2008
  return point;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x11a10
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x47cb0
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x47c8f
movq -0x20(%rbp), %rdi
callq 0x32c70
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x47c9f
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x50, %rsp
popq %rbp
retq
nop
// File: 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
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32c70
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x110a0
movsd %xmm0, -0x50(%rbp)
movsd %xmm1, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32c80
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x11110
movq -0x78(%rbp), %rax
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd 0x10(%rax), %xmm0
movq -0x30(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x17700
movsd -0x70(%rbp), %xmm1
movsd (%rax), %xmm0
movaps 0x78e5b(%rip), %xmm2    # 0xc1060
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x4821b
movl $0x0, -0x4(%rbp)
jmp 0x4835b
movq -0x78(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x17700
movsd -0x80(%rbp), %xmm1
movsd (%rax), %xmm0
movaps 0x78e1e(%rip), %xmm2    # 0xc1060
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x48296
leaq -0x40(%rbp), %rdi
callq 0x176f0
movsd (%rax), %xmm0
movsd 0x7a43f(%rip), %xmm1    # 0xc26a0
subsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
leaq -0x40(%rbp), %rdi
callq 0x176f0
movsd 0x7a422(%rip), %xmm0    # 0xc26a0
addsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x4835b
movq -0x78(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x17700
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x17700
movsd -0x98(%rbp), %xmm1
movsd -0x90(%rbp), %xmm0
movsd -0x88(%rbp), %xmm2
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x12420
movsd %xmm0, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x176f0
movsd (%rax), %xmm0
subsd -0x60(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
leaq -0x40(%rbp), %rdi
callq 0x176f0
movsd (%rax), %xmm0
addsd -0x60(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.h
// Function: Line::GetY(double const&) const
double GetY(const double &x) const {
    if (fabs(mB) > 0.0) {
      return ((-mC - mA * x) / mB);
    } else {
      return 0.0;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movsd 0x8(%rax), %xmm0
movaps 0x77fc0(%rip), %xmm1    # 0xc1060
pand %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x49104
movq -0x20(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
movsd (%rax), %xmm0
movq -0x18(%rbp), %rcx
movsd (%rcx), %xmm2
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x8(%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4910c
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0x14(%rbp), %esi
callq 0x49be0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x49b64
movq $0x0, -0x8(%rbp)
jmp 0x49bd0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
addq $0x58, %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rdi
callq 0x12100
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x175f0
testb $0x1, %al
jne 0x49b8f
jmp 0x49bc8
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x10570
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0x49c90
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12100
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rax), %rdi
leaq -0x14(%rbp), %rsi
callq 0x23eb0
movq %rax, %rdi
callq 0x23f20
testb $0x1, %al
jne 0x49c1a
movq $0x0, -0x8(%rbp)
jmp 0x49c83
cmpl $0x0, -0x14(%rbp)
jle 0x49c37
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
leaq -0x14(%rbp), %rsi
callq 0x4ab00
movq %rax, -0x38(%rbp)
jmp 0x49c57
movq -0x30(%rbp), %rdi
addq $0x650, %rdi            # imm = 0x650
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rsi
callq 0x4ab00
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rdi
leaq -0x14(%rbp), %rsi
callq 0x23eb0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x2, %ecx
movl $0x1, %eax
cmpl $0x1, %edx
cmovel %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x4aaa0
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x74(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x74(%rax)
jne 0x4a29b
movq -0x10(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x74(%rax), %esi
callq 0x11fc0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x78(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x80(%rax)
callq 0x855e0
movq %rax, %rdi
callq 0x1d830
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x78, %rsi
movsd 0x77fb4(%rip), %xmm0    # 0xc2298
movsd %xmm0, -0x20(%rbp)
leaq -0x20(%rbp), %rdx
callq 0x1d850
xorb $-0x1, %al
testb $0x1, %al
jne 0x4a2fa
jmp 0x4a30a
movq -0x10(%rbp), %rax
movl $0x1, 0x8c(%rax)
jmp 0x4a318
movq -0x10(%rbp), %rax
movl $0x2, 0x8c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x28(%rbp)
movsd %xmm4, -0x30(%rbp)
movsd %xmm5, -0x38(%rbp)
movsd %xmm6, -0x40(%rbp)
callq 0x7dc60
movq %rax, %rdi
leaq 0x7356b(%rip), %rsi     # 0xc2749
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x73562(%rip), %rsi     # 0xc2756
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x7355b(%rip), %rsi     # 0xc2765
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x73576(%rip), %rsi     # 0xc2796
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x73581(%rip), %rsi     # 0xc27b7
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
leaq 0x73584(%rip), %rsi     # 0xc27d5
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x73571(%rip), %rsi     # 0xc27dd
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
leaq 0x7355e(%rip), %rsi     # 0xc27e5
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x28(%rbp), %xmm0
leaq 0x7354b(%rip), %rsi     # 0xc27ed
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x30(%rbp), %xmm0
leaq 0x73538(%rip), %rsi     # 0xc27f5
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd -0x38(%rbp), %xmm0
leaq 0x73525(%rip), %rsi     # 0xc27fd
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
movsd 0x71d21(%rip), %xmm0    # 0xc1010
addsd -0x40(%rbp), %xmm0
leaq 0x7350a(%rip), %rsi     # 0xc2805
movb $0x1, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x73505(%rip), %rsi     # 0xc2816
movb $0x0, %al
callq 0x7dcf0
callq 0x7dc60
movq %rax, %rdi
leaq 0x734fe(%rip), %rsi     # 0xc2825
movb $0x0, %al
callq 0x7dcf0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq 0x72adf(%rip), %rsi     # 0xc2880
leaq -0x210(%rbp), %rdi
movl $0x4, %edx
callq 0xab00
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0xa2a0
movb %al, -0x221(%rbp)
jmp 0x4fdd2
movb -0x221(%rbp), %al
testb $0x1, %al
jne 0x4fde1
jmp 0x4feb2
jmp 0x4fde3
movq 0xae206(%rip), %rdi     # 0xfdff0
leaq 0x72aa1(%rip), %rsi     # 0xc2892
callq 0xa5a0
movq %rax, -0x238(%rbp)
jmp 0x4fdff
movq -0x238(%rbp), %rdi
leaq 0x75444(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, -0x240(%rbp)
jmp 0x4fe1b
movq -0x240(%rbp), %rdi
movl $0x1b6, %esi            # imm = 0x1B6
callq 0xaa40
movq %rax, -0x248(%rbp)
jmp 0x4fe35
movq -0x248(%rbp), %rdi
leaq 0x7371c(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, -0x250(%rbp)
jmp 0x4fe51
movq -0x250(%rbp), %rdi
leaq 0x72a45(%rip), %rsi     # 0xc28a4
callq 0xa5a0
movq %rax, -0x258(%rbp)
jmp 0x4fe6d
movq -0x258(%rbp), %rdi
movq 0xae135(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x4fe82
jmp 0x4fe84
jmp 0x4fe86
movl $0x1, -0x220(%rbp)
jmp 0x4feeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xa1b0
jmp 0x4ff00
movq -0x230(%rbp), %rsi
addq $0x558, %rsi            # imm = 0x558
leaq -0x210(%rbp), %rdi
movl $0x2b3fb0, %edx         # imm = 0x2B3FB0
callq 0xa790
jmp 0x4fed3
leaq -0x210(%rbp), %rdi
callq 0xa150
jmp 0x4fee1
movl $0x0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xa1b0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x218(%rbp), %rdi
callq 0xaa60
nopl (%rax)
// File: 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
subq $0xf0, %rsp
movq %rdi, -0xd8(%rbp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x50020
movq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq %rsi, %rcx
addq $0x2b45b0, %rcx         # imm = 0x2B45B0
movq %rsi, %r8
addq $0x2b45c0, %r8          # imm = 0x2B45C0
leaq -0x50(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
movl $0x1, %r9d
callq 0x53bd0
movq -0xd8(%rbp), %rdi
movb $0x0, -0x51(%rbp)
callq 0x56b60
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
addq $0x8, %rdi
callq 0x56c30
jmp 0x52611
movq -0xd8(%rbp), %rax
movl $0x1, 0x4(%rax)
movb -0x50(%rbp), %cl
andb $0x1, %cl
movb %cl, (%rax)
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x52719
testb $0x1, -0x19(%rbp)
je 0x526a4
movq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq %rsi, %rcx
addq $0x2b45b0, %rcx         # imm = 0x2B45B0
movq %rsi, %r8
addq $0x2b45c0, %r8          # imm = 0x2B45C0
leaq -0x98(%rbp), %rdi
movl $0x1, %r9d
callq 0x54c20
jmp 0x52670
leaq -0x50(%rbp), %rdi
leaq -0x98(%rbp), %rsi
movl $0x30, %edx
callq 0xa4b0
jmp 0x526d7
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x56bd0
jmp 0x5273f
movq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
movl $0x1, %ecx
callq 0x53d50
jmp 0x526c2
leaq -0x50(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x30, %edx
callq 0xa4b0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x52717
movq -0xd8(%rbp), %rdi
addq $0x8, %rdi
movq %rdi, -0xf0(%rbp)
callq 0x56bf0
movq -0xf0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x56c30
jmp 0x5270d
movq -0xd8(%rbp), %rax
movb $0x1, (%rax)
jmp 0x52719
movb $0x1, -0x51(%rbp)
testb $0x1, -0x51(%rbp)
jne 0x5272f
movq -0xd8(%rbp), %rdi
callq 0x56bd0
movq -0xe8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xaa60
nopl (%rax,%rax)
// File: 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
subq $0xa0, %rsp
movq %rdi, -0x78(%rbp)
movb %r9b, %al
movq %rdi, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x10(%rbp), %rsi
callq 0x50020
movq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0x1d620
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movl $0x6, 0x4(%rax)
addq $0x2b45d8, %rdi         # imm = 0x2B45D8
movq -0x18(%rbp), %rsi
callq 0x110a0
movq -0x80(%rbp), %rsi
movsd %xmm0, -0x58(%rbp)
movsd %xmm1, -0x50(%rbp)
addq $0x2b45d0, %rsi         # imm = 0x2B45D0
leaq -0x58(%rbp), %rdi
callq 0x3fcd0
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x110a0
movq -0x78(%rbp), %rdi
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
movq %rdi, -0x70(%rbp)
testb $0x1, -0x21(%rbp)
je 0x53cb5
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
movsd %xmm0, -0x90(%rbp)
jmp 0x53cd0
movq -0x80(%rbp), %rax
movq -0x18(%rbp), %rdi
movl 0x2b4580(%rax), %esi
callq 0x111b0
movsd %xmm0, -0x90(%rbp)
movq -0x70(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
callq 0x1eef0
movq -0x78(%rbp), %rdi
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x60(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
callq 0x104e0
movsd %xmm0, -0x98(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movsd -0x98(%rbp), %xmm1
movq -0x78(%rbp), %rcx
movq %rax, %rdx
movq -0x88(%rbp), %rax
movsd (%rdx), %xmm0
ucomisd %xmm1, %xmm0
seta %dl
andb $0x1, %dl
movb %dl, (%rcx)
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, -0x80(%rbp)
movb 0x10(%rbp), %al
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq -0x10(%rbp), %rsi
callq 0x50020
movq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x1d620
movq -0x70(%rbp), %rdi
movl $0x6, 0x4(%rdi)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x110a0
movsd %xmm0, -0x50(%rbp)
movsd %xmm1, -0x48(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x110a0
movq -0x70(%rbp), %rdi
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x38(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
movq %rdi, -0x68(%rbp)
testb $0x1, -0x29(%rbp)
je 0x54b81
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
movsd %xmm0, -0x88(%rbp)
jmp 0x54b9c
movq -0x78(%rbp), %rax
movq -0x18(%rbp), %rdi
movl 0x2b4580(%rax), %esi
callq 0x111b0
movsd %xmm0, -0x88(%rbp)
movq -0x68(%rbp), %rdi
movsd -0x88(%rbp), %xmm0
callq 0x1eef0
movq -0x70(%rbp), %rdi
movsd %xmm0, -0x60(%rbp)
movsd %xmm1, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x58(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
callq 0x104e0
movsd %xmm0, -0x90(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movsd -0x90(%rbp), %xmm1
movq -0x70(%rbp), %rcx
movq %rax, %rdx
movq -0x80(%rbp), %rax
movsd (%rdx), %xmm0
ucomisd %xmm1, %xmm0
seta %dl
andb $0x1, %dl
movb %dl, (%rcx)
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0xc0, %rsp
movq %rdi, -0xa0(%rbp)
movb %r9b, %al
movq %rdi, -0xb0(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movq -0x10(%rbp), %rsi
callq 0x50020
movq -0xa8(%rbp), %rdi
addq $0x2b45d8, %rdi         # imm = 0x2B45D8
movq -0x18(%rbp), %rsi
callq 0x110a0
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x10520
movq -0xa0(%rbp), %rdi
movsd %xmm0, -0x30(%rbp)
xorl %esi, %esi
callq 0x1d620
movq -0xa0(%rbp), %rdi
movl $0x6, 0x4(%rdi)
movq -0x20(%rbp), %rdi
callq 0x10520
subsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x56fc0
movsd %xmm0, -0x98(%rbp)
movq -0x20(%rbp), %rdi
callq 0x104e0
movaps %xmm0, %xmm1
movsd -0x98(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
testb $0x1, -0x21(%rbp)
je 0x54d12
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
movsd %xmm0, -0xb8(%rbp)
jmp 0x54d30
movq -0xa8(%rbp), %rax
movq -0x18(%rbp), %rdi
movl 0x2b4580(%rax), %esi
callq 0x111b0
movsd %xmm0, -0xb8(%rbp)
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movsd (%rcx), %xmm0
mulsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x48(%rbp), %xmm1
movaps 0x6c2f2(%rip), %xmm0    # 0xc1060
pand %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
ucomisd %xmm1, %xmm0
seta %cl
andb $0x1, %cl
movb %cl, (%rax)
movsd -0x48(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x32500
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x112c0
movq -0xa0(%rbp), %rdi
movsd %xmm0, -0x70(%rbp)
movsd %xmm1, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x68(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
movsd -0x58(%rbp), %xmm0
callq 0x1eef0
movq -0xa0(%rbp), %rcx
movq -0xb0(%rbp), %rax
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
movq -0x90(%rbp), %rdx
movq %rdx, 0x8(%rcx)
movq -0x88(%rbp), %rdx
movq %rdx, 0x10(%rcx)
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, -0x80(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq -0x10(%rbp), %rsi
callq 0x50020
movq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x1d620
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rdi
movl $0x6, 0x4(%rdi)
movq -0x18(%rbp), %rdi
movsd 0x2b45a8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x11110
movq -0x78(%rbp), %rsi
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
addq $0x2b4580, %rsi         # imm = 0x2B4580
addq $0x40, %rsi
leaq -0x38(%rbp), %rdi
callq 0x110a0
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10590
movq %rax, %rdi
callq 0x11190
leaq -0x28(%rbp), %rdi
callq 0x1eef0
movq -0x70(%rbp), %rdi
movsd %xmm0, -0x50(%rbp)
movsd %xmm1, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x48(%rbp), %rax
movq %rax, 0x10(%rdi)
addq $0x8, %rdi
callq 0x104e0
movsd %xmm0, -0x68(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movsd -0x68(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x56152
movq -0x70(%rbp), %rax
movb $0x1, (%rax)
jmp 0x5619e
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
addq $0x8, %rax
movq %rax, -0x88(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x10f10
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x3fcd0
movq -0x70(%rbp), %rax
movsd %xmm0, -0x60(%rbp)
movsd %xmm1, -0x58(%rbp)
movq -0x60(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)