LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::CorrectTurnForDash(PlayerState const&, Vector const&, double)
Vector Dasher::CorrectTurnForDash(const PlayerState &player,
                                  const Vector &target, double fix) {
  if (player.GetPosConf() > 0.99 - FLOAT_EPS &&
      player.GetBodyDirConf() > 0.99 - FLOAT_EPS) {
    Ray body_ray(player.GetPos(), player.GetBodyDir());
    Line body_line(body_ray);
    Vector closest_pt = body_line.GetProjectPoint(target);

    double buffer = 0.05 + ServerParam::instance().ballSize();
    if (closest_pt.Dist(player.GetPos()) >
        player.GetKickableArea() + buffer - fix) {
      if (closest_pt.Dist(target) < player.GetKickableArea() - buffer + fix) {
        return closest_pt;
      }
    }
  }
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movsd 0x20(%rsi), %xmm1
ucomisd 0x4a585(%rip), %xmm1    # 0x6c320
jbe 0x21ed5
movq %rsi, %r14
movsd 0xc0(%rsi), %xmm1
ucomisd 0x4a56c(%rip), %xmm1    # 0x6c320
jbe 0x21ed5
movsd %xmm0, -0x40(%rbp)
movups 0x8(%r14), %xmm0
leaq -0x60(%rbp), %rsi
movaps %xmm0, (%rsi)
movsd 0xb0(%r14), %xmm0
movsd %xmm0, 0x10(%rsi)
leaq -0x78(%rbp), %r15
movq %r15, %rdi
callq 0x2276a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2282c
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
callq 0x4a75c
movsd 0x30d8(%rax), %xmm0
addsd 0x4a4e9(%rip), %xmm0    # 0x6c2f8
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
subsd 0x8(%r14), %xmm0
movsd -0x28(%rbp), %xmm1
subsd 0x10(%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x21e46
sqrtsd %xmm0, %xmm0
jmp 0x21e4b
callq 0x93c0
movsd %xmm0, -0x20(%rbp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movsd (%rax), %xmm0
addsd -0x38(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x21ed5
movsd -0x30(%rbp), %xmm0
subsd (%rbx), %xmm0
movsd -0x28(%rbp), %xmm1
subsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x21ea1
sqrtsd %xmm0, %xmm0
jmp 0x21ea6
callq 0x93c0
movsd %xmm0, -0x20(%rbp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movsd (%rax), %xmm0
subsd -0x38(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x21ed5
movsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
jmp 0x21ede
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.h
// Function: Dasher::GetDashDirIdx(double const&)
static int GetDashDirIdx(const AngleDeg &dir) {
    for (int i = 0; i < 8; ++i) {
      if (GetAngleDegDiffer(dir, DASH_DIR[i]) < FLOAT_EPS)
        return i;
    }
    Assert(0);
    return -1;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd (%rdi), %xmm0
xorl %eax, %eax
leaq 0x6b71f(%rip), %rcx     # 0x8de18
movsd 0x4895f(%rip), %xmm1    # 0x6b060
movsd 0x48967(%rip), %xmm2    # 0x6b070
movapd 0x488ff(%rip), %xmm3    # 0x6b010
movsd 0x48927(%rip), %xmm4    # 0x6b040
movsd 0x48927(%rip), %xmm5    # 0x6b048
movsd 0x4893f(%rip), %xmm6    # 0x6b068
movapd %xmm0, %xmm7
subsd (%rcx,%rax,8), %xmm7
ucomisd %xmm7, %xmm1
jbe 0x22757
addsd %xmm2, %xmm7
ucomisd %xmm7, %xmm1
ja 0x22738
andpd %xmm3, %xmm7
ucomisd %xmm7, %xmm4
ja 0x22768
incq %rax
cmpq $0x8, %rax
jne 0x22729
jmp 0x22763
ucomisd %xmm5, %xmm7
jb 0x22742
addsd %xmm6, %xmm7
jmp 0x22757
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/BaseState.h
// Function: MobileState::Predictor::GetPredictedPos(int)
const Vector &GetPredictedPos(int step = 1) {
      step = Min(step, int(MAX_STEP));

      if (step <= mPredictedStep) {
        return mPredictedPos[step];
      } else {
        PredictTo(step);

        return mPredictedPos[step];
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpl $0x32, %esi
movl $0x32, %eax
cmovll %esi, %eax
movq %rdi, %rbx
movl %eax, -0x14(%rbp)
cmpl 0x668(%rdi), %eax
jle 0x228c6
leaq -0x14(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf062
movl (%r14), %eax
cltq
shlq $0x4, %rax
addq %rbx, %rax
addq $0x8, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DecisionTree.cpp
// Function: DecisionTree::Decision(Agent&)
bool DecisionTree::Decision(Agent &agent) {
  Assert(agent.GetSelf().IsAlive());

  ActiveBehavior beh = Search(agent, 1);

  if (beh.GetType() != BT_None) {
    agent.SetActiveBehaviorInAct(beh.GetType());
    Assert(&beh.GetAgent() == &agent);
    return beh.Execute();
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x229d2
movl (%r14), %esi
testl %esi, %esi
je 0x229c4
movq %rbx, %rdi
callq 0xf4b0
leaq -0xb8(%rbp), %rdi
callq 0x130c0
jmp 0x229c6
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DecisionTree.cpp
// Function: DecisionTree::GetBestActiveBehavior(Agent&, std::__cxx11::list<ActiveBehavior, std::allocator<ActiveBehavior>>&)
ActiveBehavior
DecisionTree::GetBestActiveBehavior(Agent &agent,
                                    std::list<ActiveBehavior> &behavior_list) {
  agent.SaveActiveBehaviorList(
      behavior_list); // behavior_list里面存储了本周期所有behavior决策出的最优activebehavior，这里统一保存一下，供特定behavior下周期plan时用

  behavior_list.sort(std::greater<ActiveBehavior>());

  return behavior_list.front();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xf4c2
movq %rbx, %rdi
callq 0x12a4c
movq (%rbx), %rsi
addq $0x10, %rsi
movl $0xa8, %edx
movq %r14, %rdi
callq 0x93e0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::DynamicDebug()
DynamicDebug::DynamicDebug() {
  mpObserver = 0;
  mInitialOK = false;

  mpIndex = 0;
  mpParserTime = 0;
  mpDecisionTime = 0;
  mpCommandSendTime = 0;
  mpCurrentIndex = 0;

  mpFile = 0;
  mpFileStream = 0;
  mpStreamBuffer = std::cin.rdbuf(); // 保存std::cin的流，后面要重定向

  mRunning = false;
  mShowMessage = false;
  mRuntoCycle = Time(-3, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
movq %rax, 0x10(%rdi)
leaq 0x58(%rdi), %r14
leaq 0x70(%rdi), %r15
leaq 0x88(%rdi), %r12
leaq 0xf8(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movq $0x0, 0xc8(%rbx)
callq 0x4f670
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x13c(%rbx)
xorl %ecx, %ecx
movq %rcx, (%rbx)
movb $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movq %rcx, 0xf0(%rbx)
movups %xmm0, 0x120(%rbx)
movq 0x6413e(%rip), %rcx     # 0x86fd8
movq (%rcx), %rdx
movq -0x18(%rdx), %rdx
movq 0xe8(%rcx,%rdx), %rcx
movq %rcx, 0x130(%rbx)
movw $0x0, 0x138(%rbx)
movq %rax, 0x13c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0xb8(%rbx), %rdi
callq 0x24662
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x22ef9
movq 0xb0(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9d2d
movq %r13, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::~DynamicDebug()
DynamicDebug::~DynamicDebug() {
  Flush();

  if (mpIndex != 0) {
    delete[] mpIndex;
  }

  if (mpParserTime != 0) {
    delete[] mpParserTime;
  }

  if (mpDecisionTime != 0) {
    delete[] mpDecisionTime;
  }

  if (mpCommandSendTime != 0) {
    delete[] mpCommandSendTime;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22ff4
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x22f31
callq 0x9630
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x22f42
callq 0x9630
movq 0xe0(%rbx), %rdi
testq %rdi, %rdi
je 0x22f53
callq 0x9630
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x22f64
callq 0x9630
leaq 0xf8(%rbx), %rdi
callq 0x4f67c
leaq 0xb8(%rbx), %rdi
callq 0x24662
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x22f97
movq 0xb0(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x22fb2
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x22fca
movq 0x80(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x22fe5
movq 0x68(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x94e0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
callq 0x12d4d
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::AddMessage(char const*, MessageType)
void DynamicDebug::AddMessage(const char *msg, MessageType msg_type) {
  if (PlayerParam::instance().SaveServerMessage() &&
      !PlayerParam::instance().DynamicDebugMode()) {
    if (!mInitialOK) {
      return; // 没有初始化或者不用记录server信息都返回
    }

    mFileMutex.Lock(); // 有可能多个线程同时在写文件，所以要保证互斥

    MessageIndexTableUnit index_table_unit;
    index_table_unit.mServerTime = mpObserver->CurrentTime();
    index_table_unit.mDataSize = strlen(msg);

    switch (msg_type) {
    case MT_Parse:
      index_table_unit.mTimeOffset = mParserTimeTable.size();
      break;
    case MT_Run:
      index_table_unit.mTimeOffset = mDecisionTimeTable.size();
      break;
    case MT_Send:
      index_table_unit.mTimeOffset = mCommandSendTimeTable.size();
      break;
    default:
      break;
    }

    mMessageTable.push_back(Message(msg_type, msg));
    mIndexTable.push_back(index_table_unit);
    mFileHead.mMaxCycle =
        Max(mFileHead.mMaxCycle, index_table_unit.mServerTime);

    mFileMutex.UnLock();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x450ba
cmpb $0x1, 0x5c42(%rax)
jne 0x23853
callq 0x450ba
cmpb $0x0, 0x5c40(%rax)
jne 0x23853
cmpb $0x1, 0x8(%rbx)
jne 0x23853
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
callq 0x4f686
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, -0x50(%rbp)
movq (%rbx), %rax
movq 0xc(%rax), %rax
movq %rax, -0x50(%rbp)
movq %r15, %rdi
callq 0x9200
movq %rax, -0x48(%rbp)
leal -0x1(%r12), %eax
cmpl $0x2, %eax
ja 0x237b3
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq 0x78(%rbx,%rax,8), %rcx
subq 0x70(%rbx,%rax,8), %rcx
sarq $0x4, %rcx
movq %rcx, -0x38(%rbp)
leaq 0xb8(%rbx), %r13
leaq -0x70(%rbp), %rdi
movl %r12d, -0x8(%rdi)
leaq -0x29(%rbp), %rdx
movq %r15, %rsi
callq 0x24892
leaq -0x78(%rbp), %rsi
movq %r13, %rdi
callq 0x24916
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x237f3
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x94e0
movq 0x60(%rbx), %rsi
cmpq 0x68(%rbx), %rsi
je 0x23813
movups -0x50(%rbp), %xmm0
movups -0x40(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x60(%rbx)
jmp 0x23820
leaq 0x58(%rbx), %rdi
leaq -0x50(%rbp), %rdx
callq 0x24bc0
leaq 0x10(%rbx), %rax
movl -0x50(%rbp), %ecx
cmpl %ecx, 0x10(%rbx)
jge 0x23832
leaq -0x50(%rbp), %rcx
jmp 0x23845
movq %rax, %rcx
jne 0x23845
movl 0x14(%rbx), %edx
leaq -0x50(%rbp), %rcx
cmpl 0x4(%rcx), %edx
cmovgeq %rax, %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
callq 0x4f6a2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2387e
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::GetMessage(char*)
MessageType DynamicDebug::GetMessage(char *msg) {
  if (mpCurrentIndex == 0) {
    return MT_Null;
  }

  if (mpCurrentIndex->mServerTime >= mFileHead.mMaxCycle) {
    std::cerr << "End ..." << std::endl;
    return MT_Null;
  } else {
    ++mpCurrentIndex;
  }

  fseek(mpFile, mpCurrentIndex->mDataOffset, SEEK_SET);
  if (fread(msg, 1, 1, mpFile) < 1) // 读取信息类型
  {
    Assert(0);
  }
  MessageType msg_type = (MessageType)msg[0];

  if (mpCurrentIndex->mDataSize > 0 &&
      fread(msg, mpCurrentIndex->mDataSize, 1, mpFile) < 1) // 读取信息内容
  {
    Assert(0);
  }
  msg[mpCurrentIndex->mDataSize] = '\0';

  if (mShowMessage == true) {
    std::cerr << msg << std::endl;
  }

  return msg_type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xf0(%rdi), %rax
testq %rax, %rax
je 0x2446f
movq %rdi, %r15
movl 0x10(%rdi), %ecx
cmpl %ecx, (%rax)
jle 0x24476
movq 0x62b99(%rip), %rdi     # 0x86ff0
leaq 0x480d8(%rip), %rsi     # 0x6c536
movl $0x7, %edx
callq 0x9560
xorl %ebx, %ebx
jmp 0x24516
xorl %ebx, %ebx
jmp 0x24544
movq %rsi, %r14
jne 0x24484
movl 0x4(%rax), %ecx
cmpl 0x14(%r15), %ecx
jge 0x24450
leaq 0x20(%rax), %rcx
movq %rcx, 0xf0(%r15)
movq 0x120(%r15), %rdi
movq 0x30(%rax), %rsi
xorl %edx, %edx
callq 0x9530
movq 0x120(%r15), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x9720
movsbl (%r14), %ebx
movq 0xf0(%r15), %rax
movq 0x8(%rax), %rsi
testq %rsi, %rsi
jle 0x244e2
movq 0x120(%r15), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x9720
movq 0xf0(%r15), %rax
movq 0x8(%rax), %rax
movb $0x0, (%r14,%rax)
cmpb $0x1, 0x139(%r15)
jne 0x24544
movq %r14, %rdi
callq 0x9200
movq 0x62ae5(%rip), %rdi     # 0x86ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
movq 0x62ad3(%rip), %r14     # 0x86ff0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::FindCycle(int)
bool DynamicDebug::FindCycle(int cycle) {
  Time cycle_time(cycle, 0);
  if (cycle_time == mpObserver->CurrentTime()) {
    return true;
  }

  int begin = 0;
  int end = mFileHead.mIndexTableSize - 1;
  int mid;
  while (begin < end) {
    mid = (begin + end) / 2;
    if (mpIndex[mid].mServerTime == cycle_time) {
      mpCurrentIndex = &mpIndex[mid];
      return true;
    } else if (mpIndex[mid].mServerTime < cycle_time) {
      begin = mid;
    } else {
      end = mid;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq (%rdi), %rcx
cmpl $0x0, 0x10(%rcx)
movb $0x1, %al
jne 0x24567
cmpl %esi, 0xc(%rcx)
je 0x245d5
movl 0x18(%rdi), %edx
decl %edx
testl %edx, %edx
setg %al
jle 0x245d5
movq 0xd0(%rdi), %rcx
xorl %r8d, %r8d
leal (%rdx,%r8), %eax
shrl %eax
movq %rax, %r10
shlq $0x5, %r10
movl (%rcx,%r10), %r11d
movl 0x4(%rcx,%r10), %r9d
movl %r11d, %ebx
xorl %esi, %ebx
orl %r9d, %ebx
je 0x245c9
movb $0x1, %r10b
cmpl %esi, %r11d
jl 0x245b3
sete %r11b
testl %r9d, %r9d
sets %r10b
andb %r11b, %r10b
testb %r10b, %r10b
je 0x245bd
movl %eax, %r8d
movl %edx, %eax
movl %eax, %edx
cmpl %eax, %r8d
setl %al
jl 0x2457d
jmp 0x245d5
addq %r10, %rcx
movq %rcx, 0xf0(%rdi)
movb $0x1, %al
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Evaluation.cpp
// Function: Evaluation::EvaluatePosition(Vector const&, bool)
double Evaluation::EvaluatePosition(const Vector &pos, bool ourside) {
  static double input[2];
  static double output[1];

  input[0] = pos.X() / (ServerParam::instance().PITCH_LENGTH * 0.5);
  input[1] =
      fabs(pos.Y()) / (ServerParam::instance().PITCH_WIDTH * 0.5) * 2.0 - 1.0;
  if (!ourside) {
    input[0] *= -1.0;
  }
  mSensitivityNet->Run(input, output);

  return output[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movsd (%rsi), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x4a75c
leaq 0x48fa1(%rip), %rax     # 0x6df18
movsd (%rax), %xmm0
mulsd 0x468f5(%rip), %xmm0    # 0x6b878
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x690bc(%rip)    # 0x8e050
movsd 0x8(%r15), %xmm0
andps 0x4606f(%rip), %xmm0    # 0x6b010
movaps %xmm0, -0x30(%rbp)
callq 0x4a75c
leaq 0x48f6f(%rip), %rax     # 0x6df20
movsd 0x468bf(%rip), %xmm0    # 0x6b878
mulsd (%rax), %xmm0
movapd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd %xmm1, %xmm1
addsd 0x460c6(%rip), %xmm1    # 0x6b098
movsd %xmm1, 0x6907e(%rip)    # 0x8e058
testl %r14d, %r14d
jne 0x24ff7
movsd 0x69069(%rip), %xmm0    # 0x8e050
xorpd 0x46031(%rip), %xmm0    # 0x6b020
movlpd %xmm0, 0x69059(%rip)    # 0x8e050
movq (%rbx), %rdi
leaq 0x6904f(%rip), %rsi     # 0x8e050
leaq 0x69058(%rip), %rdx     # 0x8e060
callq 0x37c8a
movsd 0x6904b(%rip), %xmm0    # 0x8e060
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: FormationBase::SetUnumForPos(int, int, int)
bool FormationBase::SetUnumForPos(Unum player1, int index_i, int index_j) {
  int pos1 = mUnum2Index[player1], pos2 = mPos2Index[index_i][index_j - 1];
  Unum player2 = mIndex2Unum[pos2];
  if (player1 != player2) {
    swap(mIndex2Unum[pos1], mIndex2Unum[pos2]);
    swap(mUnum2Index[player1], mUnum2Index[player2]);
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edx, %rax
imulq $0x2c, %rax, %rax
addq %rdi, %rax
movslq %ecx, %rcx
movslq 0x26c(%rax,%rcx,4), %rcx
movl 0x320(%rdi,%rcx,4), %eax
cmpl %esi, %eax
je 0x251a1
movslq %eax, %rdx
movslq %esi, %r8
movslq 0x350(%rdi,%r8,4), %r9
movl 0x320(%rdi,%r9,4), %r10d
movl %eax, 0x320(%rdi,%r9,4)
movl %r10d, 0x320(%rdi,%rcx,4)
movl 0x350(%rdi,%r8,4), %ecx
movl 0x350(%rdi,%rdx,4), %r9d
movl %r9d, 0x350(%rdi,%r8,4)
movl %ecx, 0x350(%rdi,%rdx,4)
cmpl %esi, %eax
setne %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: FormationBase::GetFormationCenter(WorldState const&, bool, double)
const Vector &FormationBase::GetFormationCenter(const WorldState &world_state,
                                                bool is_teammate,
                                                double min_conf) {
  double conf = 0.0;
  double total_conf = 0.0;
  Vector center = Vector(0.0, 0.0);

  for (int i = 1; i <= TEAMSIZE; ++i) {
    if (is_teammate) {
      if (mIndex2Unum[i] == world_state.GetTeammateGoalieUnum()) {
        continue;
      }
      conf = world_state.GetTeammate(i).GetPosConf();
      if (conf > min_conf) {
        center += (world_state.GetTeammate(i).GetPos() +
                   mOffsetMatrix[mUnum2Index[i]][0]) *
                  conf;
        total_conf += conf;
      }
    } else {
      if (mIndex2Unum[i] == world_state.GetOpponentGoalieUnum()) {
        continue;
      }
      conf = world_state.GetOpponent(i).GetPosConf();
      if (conf > min_conf) {
        center += (world_state.GetOpponent(i).GetPos() +
                   mOffsetMatrix[mUnum2Index[i]][0]) *
                  conf;
        total_conf += conf;
      }
    }
  }

  mFormationCT = center / total_conf;
  return mFormationCT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x2110(%rsi), %eax
movl 0x2114(%rsi), %ecx
leaq 0xa8(%rsi), %r8
leaq 0x380(%rdi), %r9
addq $0x10d8, %rsi           # imm = 0x10D8
xorpd %xmm2, %xmm2
movl $0x1, %r10d
xorl %r11d, %r11d
xorpd %xmm1, %xmm1
xorpd %xmm3, %xmm3
testb %dl, %dl
je 0x25214
cmpl %eax, 0x324(%rdi,%r11,4)
je 0x25266
movsd -0x1010(%rsi), %xmm4
ucomisd %xmm0, %xmm4
jbe 0x25266
imulq $0x178, %r10, %rbx      # imm = 0x178
addq %r8, %rbx
addq $-0x170, %rbx           # imm = 0xFE90
jmp 0x2522c
cmpl %ecx, 0x324(%rdi,%r11,4)
je 0x25266
movsd 0x18(%rsi), %xmm4
ucomisd %xmm0, %xmm4
movq %rsi, %rbx
jbe 0x25266
movslq 0x354(%rdi,%r11,4), %r14
leaq (%r14,%r14,2), %r14
shlq $0x6, %r14
movsd (%rbx), %xmm5
addsd (%r9,%r14), %xmm5
movsd 0x8(%rbx), %xmm6
addsd 0x8(%r9,%r14), %xmm6
mulsd %xmm4, %xmm5
mulsd %xmm4, %xmm6
addsd %xmm5, %xmm3
addsd %xmm6, %xmm1
addsd %xmm4, %xmm2
incq %r10
incq %r11
addq $0x178, %rsi            # imm = 0x178
cmpq $0xb, %r11
jne 0x251e5
xorpd %xmm0, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm2
setae %al
movapd 0x45d7e(%rip), %xmm0    # 0x6b010
andpd %xmm2, %xmm0
leaq 0x47323(%rip), %rcx     # 0x6c5c0
movsd (%rcx,%rax,8), %xmm4
cmpltsd 0x45d95(%rip), %xmm0    # 0x6b040
andpd %xmm0, %xmm4
andnpd %xmm2, %xmm0
orpd %xmm4, %xmm0
divsd %xmm0, %xmm3
divsd %xmm0, %xmm1
leaq 0xc80(%rdi), %rax
movsd %xmm3, 0xc80(%rdi)
movsd %xmm1, 0xc88(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: FormationBase::GetFormationPoint(WorldState const&, bool, int, double)
Vector FormationBase::GetFormationPoint(const WorldState &world_state,
                                        bool is_teammate, Unum unum,
                                        double min_conf) {
  if (is_teammate) {
    return GetFormationCenter(world_state, is_teammate, min_conf) +
           mOffsetMatrix[0][mUnum2Index[unum]];
  } else {
    return GetFormationCenter(world_state, is_teammate, min_conf) -
           mOffsetMatrix[0][mUnum2Index[unum]];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x380(%rdi), %r14
movslq %ecx, %r15
testl %edx, %edx
je 0x253ad
movl $0x1, %edx
callq 0x251a8
movslq 0x350(%rbx,%r15,4), %rcx
shlq $0x4, %rcx
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
addsd (%r14,%rcx), %xmm0
addsd 0x8(%r14,%rcx), %xmm1
jmp 0x253d6
xorl %edx, %edx
callq 0x251a8
movslq 0x350(%rbx,%r15,4), %rcx
shlq $0x4, %rcx
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
subsd (%r14,%rcx), %xmm0
subsd 0x8(%r14,%rcx), %xmm1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: TeammateFormation::SetTeammateRole()
void TeammateFormation::SetTeammateRole() {
  for (int i = 1; i <= TEAMSIZE; ++i) {
    mPlayerRole[i].mLineType = LineType(mPlayerRole[i].mIndexX);

    /** 确定mPositionType */
    double midoffset = mPlayerRole[i].mIndexY -
                       (mLineArrange[mPlayerRole[i].mIndexX] + 1) * 0.5;
    if (fabs(midoffset) < FLOAT_EPS) {
      mPlayerRole[i].mPositionType = PT_Middle;
    } else if (fabs(midoffset - 0.5) < FLOAT_EPS) {
      mPlayerRole[i].mPositionType = PT_RightMiddle;
    } else if (fabs(midoffset + 0.5) < FLOAT_EPS) {
      mPlayerRole[i].mPositionType = PT_LeftMiddle;
    } else if (fabs(midoffset - 1.25) < 0.25 + FLOAT_EPS) { // 1.5 or 1.0
      mPlayerRole[i].mPositionType = PT_Right;
    } else if (fabs(midoffset + 1.25) < 0.25 + FLOAT_EPS) { // 1.5 or 1.0
      mPlayerRole[i].mPositionType = PT_Left;
    } else if (midoffset > 2.0 - FLOAT_EPS) {
      mPlayerRole[i].mPositionType = PT_RightRight;
    } else {
      mPlayerRole[i].mPositionType = PT_LeftLeft;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movsd 0x44f9c(%rip), %xmm0    # 0x6b088
movapd 0x44f1c(%rip), %xmm1    # 0x6b010
movsd 0x44f44(%rip), %xmm2    # 0x6b040
movsd 0x45774(%rip), %xmm3    # 0x6b878
movsd 0x464dc(%rip), %xmm4    # 0x6c5e8
movsd 0x464dc(%rip), %xmm5    # 0x6c5f0
movsd 0x464dc(%rip), %xmm6    # 0x6c5f8
movsd 0x464dc(%rip), %xmm7    # 0x6c600
movslq 0x60(%rdi,%rax), %rcx
movl %ecx, 0x68(%rdi,%rax)
xorps %xmm9, %xmm9
cvtsi2sdl 0x64(%rdi,%rax), %xmm9
movl 0x40(%rdi,%rcx,4), %ecx
incl %ecx
xorps %xmm8, %xmm8
cvtsi2sd %ecx, %xmm8
mulsd %xmm0, %xmm8
addsd %xmm9, %xmm8
movapd %xmm8, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm2
jbe 0x2616f
movl $0x2, 0x6c(%rdi,%rax)
jmp 0x26208
movapd %xmm8, %xmm9
addsd %xmm0, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm2
jbe 0x2618f
movl $0x5, 0x6c(%rdi,%rax)
jmp 0x26208
movapd %xmm8, %xmm9
addsd %xmm3, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm2
jbe 0x261af
movl $0x6, 0x6c(%rdi,%rax)
jmp 0x26208
movapd %xmm8, %xmm9
addsd %xmm4, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm5
jbe 0x261cf
movl $0x3, 0x6c(%rdi,%rax)
jmp 0x26208
movapd %xmm8, %xmm9
addsd %xmm6, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm5
jbe 0x261ef
movl $0x1, 0x6c(%rdi,%rax)
jmp 0x26208
ucomisd %xmm7, %xmm8
jbe 0x26200
movl $0x4, 0x6c(%rdi,%rax)
jmp 0x26208
movl $0x7, 0x6c(%rdi,%rax)
addq $0x10, %rax
cmpq $0xb0, %rax
jne 0x26124
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: OpponentFormation::OpponentFormation(int, FormationType)
OpponentFormation::OpponentFormation(Unum goalie_unum, FormationType type)
    : FormationBase(type), mGoalieUnum(goalie_unum) {
  mTactics.bzero();
  map<string, FormationTacticType> formation_tactic_map;

  mUsedTimes = 0;
  mHIntervalTimes[0] = 0;
  mHIntervalTimes[1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x6010c(%rip), %rax     # 0x86718
movq %rax, (%rdi)
movl %edx, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movl $0x6c, %eax
movaps 0x45f7b(%rip), %xmm0    # 0x6c5b0
movups %xmm0, -0xc(%rbx,%rax)
addq $0x10, %rax
cmpq $0x11c, %rax            # imm = 0x11C
jne 0x26635
leaq 0x110(%rbx), %rdi
leaq 0x380(%rbx), %r15
xorl %r12d, %r12d
movl $0x210, %edx            # imm = 0x210
xorl %esi, %esi
callq 0x92b0
movl $0x910, %edx            # imm = 0x910
movq %r15, %rdi
xorl %esi, %esi
callq 0x92b0
movl %r12d, 0x350(%rbx,%r12,4)
movl %r12d, 0x320(%rbx,%r12,4)
incq %r12
cmpq $0xc, %r12
jne 0x26672
leaq 0x600e6(%rip), %rax     # 0x86778
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc90(%rbx)
movups %xmm0, 0xca0(%rbx)
movups %xmm0, 0xcb0(%rbx)
movups %xmm0, 0xcc0(%rbx)
xorl %eax, %eax
movq %rax, 0xcd0(%rbx)
movl %r14d, 0xce8(%rbx)
movq %rax, 0xcf0(%rbx)
leaq -0x48(%rbp), %rcx
movl $0x0, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movups %xmm0, 0xcd8(%rbx)
leaq -0x50(%rbp), %rdi
callq 0x28490
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::Formation(Agent&)
Formation::Formation(Agent &agent) : mAgent(agent) {
  if (mAgent.IsReverse()) {
    mpTeammateFormation = &instance.GetOpponentFormation(FT_Attack_Forward);
    mpOpponentFormation = &instance.GetTeammateFormation(FT_Attack_Forward);
  } else {
    mpTeammateFormation = &instance.GetTeammateFormation(FT_Attack_Forward);
    mpOpponentFormation = &instance.GetOpponentFormation(FT_Attack_Forward);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5fa18(%rip), %rax     # 0x867d8
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
addq $0x20, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
xorl %esi, %esi
callq 0x28c86
movq 0x8(%rbx), %rax
leaq 0x672dc(%rip), %rcx     # 0x8e0d0
leaq 0x672b5(%rip), %rdx     # 0x8e0b0
cmpb $0x0, 0xc(%rax)
movq %rdx, %rax
cmovneq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x10(%rbx)
cmoveq %rcx, %rdx
movq (%rdx), %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::GetTeammateFormationPoint(int, Vector const&)
Vector Formation::GetTeammateFormationPoint(Unum unum, const Vector &ball_pos) {
  Assert(unum >= 1 && unum <= TEAMSIZE);

  Vector point;
  if (unum == mAgent.GetWorldState().GetTeammateGoalieUnum()) {
    return Vector(-47.5, 0);
  }

  point.SetX(ball_pos.X() * mpTeammateFormation->GetHBallFactor() +
             mpTeammateFormation->GetOffside(0, unum).X());
  point.SetY(ball_pos.Y() * mpTeammateFormation->GetVBallFactor() +
             mpTeammateFormation->GetOffside(0, unum).Y());
  return point;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rax
cmpl %esi, 0x2110(%rax)
jne 0x27082
xorpd %xmm1, %xmm1
movsd 0x455a0(%rip), %xmm0    # 0x6c620
jmp 0x270cc
movq 0x10(%rdi), %rax
movslq 0x350(%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movslq %esi, %rsi
movslq 0x350(%rax,%rsi,4), %rsi
shlq $0x4, %rsi
movsd (%rdx), %xmm0
movsd 0x8(%rdx), %xmm1
mulsd 0x50(%rax), %xmm0
addsd 0x380(%rsi,%rcx), %xmm0
mulsd 0x58(%rax), %xmm1
addsd 0x388(%rsi,%rcx), %xmm1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::GetTeammateFormationPoint(int, int, Vector)
Vector Formation::GetTeammateFormationPoint(Unum unum, Unum focusTm,
                                            Vector focusPt) {
  Assert(unum >= 1 && unum <= TEAMSIZE);
  if (unum == mAgent.GetWorldState().GetTeammateGoalieUnum()) {
    return Vector(-47.5, 0);
  }

  if (focusTm == mAgent.GetWorldState().GetTeammateGoalieUnum()) {
    int back_center = mpTeammateFormation->GetLineArrange(1) / 2 + 1; // 中后卫
    focusTm = mpTeammateFormation->GetUnumFromPos(1, back_center);
    focusPt.SetX(focusPt.X() + 9.0);
  } else if (focusTm <= Unum_Unknown ||
             mAgent.GetWorldState().CurrentTime().T() < 1) {
    return GetTeammateFormationPoint(unum);
  }

  focusPt = mpTeammateFormation->GetActiveField(focusTm).AdjustToWithin(
      focusPt); //调整到有效范围
  if (focusTm == unum) {
    return focusPt;
  }
  return focusPt + mpTeammateFormation->GetOffside(focusTm, unum);
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rax
movl 0x2110(%rax), %ecx
cmpl %esi, %ecx
jne 0x270f1
xorpd %xmm2, %xmm2
movsd 0x45534(%rip), %xmm0    # 0x6c620
jmp 0x271da
movapd %xmm0, %xmm2
cmpl %edx, %ecx
jne 0x27125
movq 0x10(%rdi), %rax
movl 0x44(%rax), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movslq %edx, %rcx
movslq 0x29c(%rax,%rcx,4), %rcx
movl 0x320(%rax,%rcx,4), %edx
addsd 0x45505(%rip), %xmm2    # 0x6c628
jmp 0x27137
testl %edx, %edx
jle 0x271c4
cmpl $0x0, 0x10(%rax)
jle 0x271c4
movq 0x10(%rdi), %rax
movslq %edx, %rcx
movslq 0x350(%rax,%rcx,4), %rcx
movq %rcx, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
addq $0xf0, %rdi
movsd (%rdi), %xmm0
ucomisd %xmm2, %xmm0
ja 0x27174
movsd 0x8(%rdi), %xmm3
ucomisd %xmm3, %xmm2
movapd %xmm2, %xmm0
jbe 0x27174
movapd %xmm3, %xmm0
movsd 0x10(%rdi), %xmm2
ucomisd %xmm1, %xmm2
ja 0x27192
movsd 0x18(%rdi), %xmm3
ucomisd %xmm3, %xmm1
movapd %xmm1, %xmm2
jbe 0x27192
movapd %xmm3, %xmm2
cmpl %esi, %edx
je 0x271da
leaq (%rcx,%rcx,2), %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movslq %esi, %rdx
movslq 0x350(%rax,%rdx,4), %rax
shlq $0x4, %rax
addsd 0x380(%rax,%rcx), %xmm0
addsd 0x388(%rax,%rcx), %xmm2
jmp 0x271da
pushq %rbp
movq %rsp, %rbp
movsd 0x447f0(%rip), %xmm0    # 0x6b9c0
callq 0x26e70
movapd %xmm1, %xmm2
popq %rbp
movapd %xmm2, %xmm1
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::GetOpponentFormationPoint(int, Vector const&)
Vector Formation::GetOpponentFormationPoint(Unum unum, const Vector &ball_pos) {
  double x = ball_pos.X() * mpOpponentFormation->GetHBallFactor() -
             mpOpponentFormation->GetOffside(0, unum).X();
  if (mAgent.GetWorldState().GetPlayMode() == PM_Our_Kick_Off && x > 0) {
    x = 0.0;
  }
  double y = ball_pos.Y() * mpOpponentFormation->GetVBallFactor() -
             mpOpponentFormation->GetOffside(0, unum).Y();
  return Vector(x, y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %r8
movq 0x18(%rdi), %rax
movslq 0x350(%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movslq %esi, %rsi
movslq 0x350(%rax,%rsi,4), %rsi
shlq $0x4, %rsi
movsd (%rdx), %xmm2
mulsd 0x50(%rax), %xmm2
subsd 0x380(%rsi,%rcx), %xmm2
movsd 0x8(%rdx), %xmm1
movq 0x18(%r8), %rdx
cmpl $0x2, 0x1c(%rdx)
je 0x27446
movapd %xmm2, %xmm0
jmp 0x2744e
xorpd %xmm0, %xmm0
minsd %xmm2, %xmm0
mulsd 0x58(%rax), %xmm1
subsd 0x388(%rsi,%rcx), %xmm1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::IsOpponentRoleValid()
bool Formation::IsOpponentRoleValid() {
  return mAgent.IsReverse()
             ? true
             : (static_cast<OpponentFormation *>(mpOpponentFormation)
                    ->IsRoleValid());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
cmpb $0x0, 0xc(%rax)
je 0x27470
movb $0x1, %al
popq %rbp
retq
movq 0x18(%rdi), %rdi
movq (%rdi), %rax
popq %rbp
jmpq *0x10(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x80(%rdi)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x44b97(%rip), %rdx     # 0x6c66d
movq %rax, %rdi
xorl %esi, %esi
callq 0x25876
movq %r14, (%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x44b8c(%rip), %rdx     # 0x6c683
movq %rax, %rdi
movl $0x3, %esi
callq 0x25876
movq %r14, 0x8(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x44b7d(%rip), %rdx     # 0x6c699
movq %rax, %rdi
xorl %esi, %esi
callq 0x25876
movq %r14, 0x10(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x44b71(%rip), %rdx     # 0x6c6af
movq %rax, %rdi
movl $0x3, %esi
callq 0x25876
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 0x94c0
movq %rax, %r14
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x265f0
movq %r14, 0x20(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x265f0
movq %r14, 0x28(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x265f0
movq %r14, 0x30(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x265f0
movq %r14, 0x38(%rbx)
movq 0x20(%rbx,%r15,8), %rax
movq %rax, 0x60(%rbx,%r15,8)
incq %r15
cmpq $0x4, %r15
jne 0x27be6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27c0a
jmp 0x27c0a
jmp 0x27c0a
movq %rax, %rbx
movl $0xca8, %esi            # imm = 0xCA8
movq %r14, %rdi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O1/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
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rcx, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq 0x20(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x27c5d
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
cmpq $0x4, %r14
jne 0x27c4d
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x27c78
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
cmpq $0x4, %r14
jne 0x27c69
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x1, 0xc(%rsi)
jne 0x2908a
leaq -0x9(%rbp), %rsi
movb $0x2d, (%rsi)
jmp 0x29091
leaq -0xa(%rbp), %rsi
movb $0x2b, (%rsi)
movl $0x1, %edx
callq 0x9560
movl (%rbx), %esi
movq %rax, %rdi
callq 0x9880
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5dda2(%rip), %rax     # 0x87530
cmoveq %rax, %rdx
movq %rdx, 0x8(%rdi)
testq %rcx, %rcx
cmoveq %rax, %rcx
movq %rcx, 0x10(%rdi)
movq (%rsi), %r15
movq %rsi, -0x38(%rbp)
cmpq 0x8(%rsi), %r15
je 0x29873
movq %rdi, %r14
addq $0x30, %r14
xorl %ebx, %ebx
leaq -0x1c0(%rbp), %r13
leaq -0x30(%rbp), %r12
movq %r13, %rdi
movq %r15, %rsi
movl $0x18, %edx
callq 0x97b0
movq $0x0, -0x30(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x18(%r14)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x10(%r14)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x8(%r14)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movq %r13, %rdi
movq 0x5d759(%rip), %rsi     # 0x86f98
callq 0x9370
leaq -0x140(%rbp), %rdi
callq 0x91c0
addq $0x20, %r15
movq -0x38(%rbp), %rax
cmpq 0x8(%rax), %r15
je 0x29873
leaq 0x1(%rbx), %rax
addq $0x20, %r14
cmpq $0xa, %rbx
movq %rax, %rbx
jb 0x297c6
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x5d709(%rip), %rsi     # 0x86f98
leaq -0x1c0(%rbp), %rdi
callq 0x9370
leaq -0x140(%rbp), %rdi
callq 0x91c0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movsd 0x10(%rdi), %xmm0
mulsd 0x416e9(%rip), %xmm0    # 0x6b050
divsd 0x416d9(%rip), %xmm0    # 0x6b048
leaq -0x38(%rbp), %r12
leaq -0x30(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x92d0
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd (%r12), %xmm3
mulsd %xmm1, %xmm3
movsd (%r13), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
movapd 0x41663(%rip), %xmm3    # 0x6b010
andpd %xmm2, %xmm3
movsd 0x41687(%rip), %xmm4    # 0x6b040
ucomisd %xmm3, %xmm4
jbe 0x299c3
xorl %eax, %eax
jmp 0x299f3
xorpd 0x41655(%rip), %xmm0    # 0x6b020
mulsd (%r14), %xmm0
subsd 0x10(%r15), %xmm0
mulsd 0x8(%r14), %xmm1
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, (%rbx)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setae %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x29940
movl %eax, %r14d
testb %al, %al
je 0x29a61
leaq -0x20(%rbp), %rsi
movq %r15, %rdi
callq 0x2abbc
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_O1/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 %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2276a
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x2276a
movsd 0x8(%r12), %xmm1
movapd 0x4155e(%rip), %xmm2    # 0x6b010
andpd %xmm1, %xmm2
movsd 0x41582(%rip), %xmm0    # 0x6b040
ucomisd %xmm2, %xmm0
jbe 0x29ad7
movsd -0x30(%rbp), %xmm2
andpd 0x4153f(%rip), %xmm2    # 0x6b010
ucomisd %xmm2, %xmm0
ja 0x29b2c
movsd -0x50(%rbp), %xmm2
divsd %xmm1, %xmm2
movsd -0x38(%rbp), %xmm1
divsd -0x30(%rbp), %xmm1
subsd %xmm1, %xmm2
andpd 0x4151a(%rip), %xmm2    # 0x6b010
ucomisd %xmm2, %xmm0
ja 0x29b2c
leaq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movq %rbx, %rdx
callq 0x29b3c
testb %al, %al
je 0x29b2c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2ac24
testb %al, %al
je 0x29b2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ac24
jmp 0x29b2e
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movsd 0x8(%rdi), %xmm0
movapd 0x414c3(%rip), %xmm2    # 0x6b010
andpd %xmm0, %xmm2
movsd 0x414e7(%rip), %xmm1    # 0x6b040
ucomisd %xmm2, %xmm1
jbe 0x29b74
movsd 0x8(%rsi), %xmm2
andpd 0x414a4(%rip), %xmm2    # 0x6b010
movb $0x1, %al
ucomisd %xmm2, %xmm1
ja 0x29b98
movsd (%rdi), %xmm2
movsd (%rsi), %xmm3
divsd 0x8(%rsi), %xmm3
divsd %xmm0, %xmm2
subsd %xmm3, %xmm2
andpd 0x4147f(%rip), %xmm2    # 0x6b010
ucomisd %xmm2, %xmm1
seta %al
testb %al, %al
jne 0x29c67
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movsd (%rdi), %xmm2
je 0x29c01
movsd 0x8(%rsi), %xmm3
ucomisd %xmm3, %xmm1
xorpd 0x41461(%rip), %xmm2    # 0x6b020
je 0x29c3c
movsd 0x10(%rdi), %xmm4
movsd 0x10(%rsi), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm4, %xmm1
mulsd %xmm3, %xmm1
subsd %xmm5, %xmm1
mulsd %xmm2, %xmm3
movsd (%rsi), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm3, %xmm5
divsd %xmm5, %xmm1
movsd %xmm1, (%rdx)
mulsd %xmm2, %xmm1
subsd %xmm4, %xmm1
divsd %xmm0, %xmm1
jmp 0x29c62
movsd 0x10(%rdi), %xmm0
xorpd 0x41412(%rip), %xmm0    # 0x6b020
divsd %xmm2, %xmm0
movsd 0x8(%rsi), %xmm2
ucomisd %xmm2, %xmm1
je 0x29c36
movsd (%rsi), %xmm1
xorpd 0x413f7(%rip), %xmm1    # 0x6b020
mulsd %xmm0, %xmm1
subsd 0x10(%rsi), %xmm1
divsd %xmm2, %xmm1
movsd %xmm0, (%rdx)
jmp 0x29c62
movsd 0x10(%rsi), %xmm1
xorpd 0x413d7(%rip), %xmm1    # 0x6b020
divsd (%rsi), %xmm1
mulsd %xmm1, %xmm2
subsd 0x10(%rdi), %xmm2
divsd %xmm0, %xmm2
movsd %xmm1, (%rdx)
movapd %xmm2, %xmm1
movsd %xmm1, 0x8(%rdx)
xorb $0x1, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r12
movaps %xmm0, (%r12)
movq %r12, %rdx
callq 0x29a70
movl %eax, %r14d
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
subsd (%r15), %xmm0
subsd 0x8(%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x29ccc
sqrtsd %xmm0, %xmm0
jmp 0x29cd1
callq 0x93c0
movsd %xmm0, (%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop