LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43dce
cmpb $0x1, 0x5c42(%rax)
jne 0x2319b
callq 0x43dce
cmpb $0x0, 0x5c40(%rax)
jne 0x2319b
cmpb $0x1, 0x8(%rbx)
jne 0x2319b
leaq 0xf8(%rbx), %rdi
movq %rdi, -0x38(%rbp)
callq 0x4e01a
movq (%rbx), %rax
movq 0xc(%rax), %r14
movq %r14, -0x58(%rbp)
movq %r15, %rdi
callq 0x9200
movq %rax, -0x50(%rbp)
leal -0x1(%r12), %eax
cmpl $0x2, %eax
ja 0x230f9
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, -0x40(%rbp)
leaq 0xb8(%rbx), %r13
leaq -0x78(%rbp), %rdi
movl %r12d, -0x8(%rdi)
leaq -0x29(%rbp), %rdx
movq %r15, %rsi
callq 0x241d4
leaq -0x80(%rbp), %rsi
movq %r13, %rdi
callq 0x24258
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23139
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x94e0
movq 0x60(%rbx), %rsi
cmpq 0x68(%rbx), %rsi
je 0x23159
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x60(%rbx)
jmp 0x2316c
leaq 0x58(%rbx), %rdi
leaq -0x58(%rbp), %r15
movq %r15, %rdx
callq 0x2450a
movl (%r15), %r14d
leaq 0x10(%rbx), %rax
cmpl %r14d, 0x10(%rbx)
jge 0x2317c
leaq -0x58(%rbp), %rcx
jmp 0x2318c
movq %rax, %rcx
jne 0x2318c
movl 0x14(%rbx), %edx
movq %rax, %rcx
cmpl -0x54(%rbp), %edx
jl 0x23176
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rdi
callq 0x4e036
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x231c6
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x23da7
movq %rdi, %r15
movl 0x10(%rdi), %ecx
cmpl %ecx, (%rax)
jle 0x23dae
movq 0x60261(%rip), %rdi     # 0x83ff0
leaq 0x46790(%rip), %rsi     # 0x6a526
movl $0x7, %edx
callq 0x9560
xorl %ebx, %ebx
jmp 0x23e4e
xorl %ebx, %ebx
jmp 0x23e7c
movq %rsi, %r14
jne 0x23dbc
movl 0x4(%rax), %ecx
cmpl 0x14(%r15), %ecx
jge 0x23d88
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 0x23e25
movq 0x120(%r15), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x9720
movq 0xf0(%r15), %rax
movq 0x8(%rax), %rsi
movb $0x0, (%r14,%rsi)
cmpb $0x1, 0x139(%r15)
jne 0x23e7c
movq %r14, %rdi
callq 0x9200
movq 0x601ad(%rip), %rdi     # 0x83ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
movq 0x6019b(%rip), %r14     # 0x83ff0
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_O3/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 %r14
pushq %rbx
movq (%rdi), %rcx
cmpl $0x0, 0x10(%rcx)
movb $0x1, %al
jne 0x23ea1
cmpl %esi, 0xc(%rcx)
je 0x23f11
movl 0x18(%rdi), %r8d
decl %r8d
xorl %ecx, %ecx
testl %r8d, %r8d
jle 0x23f03
movq 0xd0(%rdi), %rdx
leal (%r8,%rcx), %r9d
shrl %r9d
movq %r9, %r11
shlq $0x5, %r11
movl (%rdx,%r11), %r10d
movl 0x4(%rdx,%r11), %ebx
movl %r10d, %r14d
xorl %esi, %r14d
orl %ebx, %r14d
je 0x23f07
testl %ebx, %ebx
movl %ecx, %r11d
cmovsl %r9d, %r11d
movl %r9d, %ebx
cmovsl %r8d, %ebx
cmpl %esi, %r10d
cmovll %r9d, %ecx
cmovll %r8d, %r9d
cmovel %r11d, %ecx
cmovel %ebx, %r9d
movl %r9d, %r8d
cmpl %r9d, %ecx
jl 0x23eb6
xorl %eax, %eax
jmp 0x23f11
addq %r11, %rdx
movq %rdx, 0xf0(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x49360
leaq 0x4762f(%rip), %rax     # 0x6bee8
movsd (%rax), %xmm0
mulsd 0x44fb3(%rip), %xmm0    # 0x69878
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x6677a(%rip)    # 0x8b050
movsd 0x8(%r15), %xmm0
andps 0x4472d(%rip), %xmm0    # 0x69010
movaps %xmm0, -0x30(%rbp)
callq 0x49360
leaq 0x475fd(%rip), %rax     # 0x6bef0
movsd 0x44f7d(%rip), %xmm0    # 0x69878
mulsd (%rax), %xmm0
movapd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd %xmm1, %xmm1
addsd 0x44784(%rip), %xmm1    # 0x69098
movsd %xmm1, 0x6673c(%rip)    # 0x8b058
testl %r14d, %r14d
jne 0x24939
movsd 0x66727(%rip), %xmm0    # 0x8b050
xorpd 0x446ef(%rip), %xmm0    # 0x69020
movlpd %xmm0, 0x66717(%rip)    # 0x8b050
movq (%rbx), %rdi
leaq 0x6670d(%rip), %rsi     # 0x8b050
leaq 0x66716(%rip), %rdx     # 0x8b060
callq 0x36d92
movsd 0x66709(%rip), %xmm0    # 0x8b060
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x380(%rdi), %r8
leaq 0xa8(%rsi), %r9
addq $0x10d8, %rsi           # imm = 0x10D8
xorpd %xmm3, %xmm3
movl $0x1, %r10d
movq $-0xb, %r11
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movl 0x350(%rdi,%r11,4), %ebx
testb %dl, %dl
je 0x24b5e
cmpl %eax, %ebx
je 0x24baa
movsd -0x1010(%rsi), %xmm4
ucomisd %xmm0, %xmm4
jbe 0x24baa
imulq $0x178, %r10, %rbx      # imm = 0x178
addq %r9, %rbx
addq $-0x170, %rbx           # imm = 0xFE90
jmp 0x24b70
cmpl %ecx, %ebx
je 0x24baa
movsd 0x18(%rsi), %xmm4
ucomisd %xmm0, %xmm4
movq %rsi, %rbx
jbe 0x24baa
movslq 0x380(%rdi,%r11,4), %r14
leaq (%r14,%r14,2), %r14
shlq $0x6, %r14
movsd (%rbx), %xmm5
addsd (%r8,%r14), %xmm5
movsd 0x8(%rbx), %xmm6
addsd 0x8(%r8,%r14), %xmm6
mulsd %xmm4, %xmm5
mulsd %xmm4, %xmm6
addsd %xmm5, %xmm2
addsd %xmm6, %xmm1
addsd %xmm4, %xmm3
incq %r10
addq $0x178, %rsi            # imm = 0x178
incq %r11
jne 0x24b2d
xorpd %xmm0, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm3
setae %al
movapd 0x4443e(%rip), %xmm0    # 0x69010
andpd %xmm3, %xmm0
leaq 0x459d3(%rip), %rcx     # 0x6a5b0
movsd (%rcx,%rax,8), %xmm4
cmpltsd 0x44455(%rip), %xmm0    # 0x69040
andpd %xmm0, %xmm4
andnpd %xmm3, %xmm0
orpd %xmm4, %xmm0
divsd %xmm0, %xmm2
divsd %xmm0, %xmm1
leaq 0xc80(%rdi), %rax
movsd %xmm2, 0xc80(%rdi)
movsd %xmm1, 0xc88(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x24ced
movl $0x1, %edx
callq 0x24aec
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 0x24d16
xorl %edx, %edx
callq 0x24aec
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_O3/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 0x43716(%rip), %xmm0    # 0x69088
movapd 0x43696(%rip), %xmm1    # 0x69010
movsd 0x436be(%rip), %xmm2    # 0x69040
movsd 0x43eee(%rip), %xmm3    # 0x69878
movsd 0x44c46(%rip), %xmm4    # 0x6a5d8
movsd 0x44c46(%rip), %xmm5    # 0x6a5e0
movsd 0x44c46(%rip), %xmm6    # 0x6a5e8
movsd 0x44c46(%rip), %xmm7    # 0x6a5f0
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 0x259f5
movl $0x2, 0x6c(%rdi,%rax)
jmp 0x25a8e
movapd %xmm8, %xmm9
addsd %xmm0, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm2
jbe 0x25a15
movl $0x5, 0x6c(%rdi,%rax)
jmp 0x25a8e
movapd %xmm8, %xmm9
addsd %xmm3, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm2
jbe 0x25a35
movl $0x6, 0x6c(%rdi,%rax)
jmp 0x25a8e
movapd %xmm8, %xmm9
addsd %xmm4, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm5
jbe 0x25a55
movl $0x3, 0x6c(%rdi,%rax)
jmp 0x25a8e
movapd %xmm8, %xmm9
addsd %xmm6, %xmm9
andpd %xmm1, %xmm9
ucomisd %xmm9, %xmm5
jbe 0x25a75
movl $0x1, 0x6c(%rdi,%rax)
jmp 0x25a8e
ucomisd %xmm7, %xmm8
jbe 0x25a86
movl $0x4, 0x6c(%rdi,%rax)
jmp 0x25a8e
movl $0x7, 0x6c(%rdi,%rax)
addq $0x10, %rax
cmpq $0xb0, %rax
jne 0x259aa
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
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 0x446e3(%rip), %xmm0    # 0x6a5a0
movups %xmm0, -0xc(%rbx,%rax)
addq $0x10, %rax
cmpq $0x11c, %rax            # imm = 0x11C
jne 0x25ebd
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 0x25efa
leaq 0x5d886(%rip), %rax     # 0x837a0
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 0x27c5a
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5d1a4(%rip), %rax     # 0x83800
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 0x2842a
movq 0x8(%rbx), %rax
leaq 0x64a40(%rip), %rcx     # 0x8b0d0
leaq 0x64a19(%rip), %rdx     # 0x8b0b0
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_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::GetTeammateExpectedGoaliePos(Vector, double)
Vector Formation::GetTeammateExpectedGoaliePos(Vector bp, double run) {
  const WorldState &world_state = mAgent.GetWorldState();

  Vector gPos;
  int Uncyc;
  if (world_state.GetTeammateGoalieUnum() == 0 ||
      world_state.GetTeammate(world_state.GetTeammateGoalieUnum())
              .GetPosConf() < FLOAT_EPS) { //取守门员的位置以及没有见到的周期
    gPos = Vector(ServerParam::instance().PITCH_LENGTH / 2.0, 0.0); // 估值而已

    Vector p[2];
    double dist[2];
    p[0] = Vector(ServerParam::instance().PITCH_LENGTH / 2.0,
                  -ServerParam::instance().goalWidth() / 2.0 + 0.1); // top
    p[1] = Vector(ServerParam::instance().PITCH_LENGTH / 2.0,
                  ServerParam::instance().goalWidth() / 2.0 - 0.1); // down
    dist[0] = bp.Dist(p[0]);
    dist[1] = bp.Dist(p[1]);
    Uncyc = (int)(Min(dist[0], dist[1]) / 5.0);
  } else {
    gPos =
        world_state.GetTeammate(world_state.GetTeammateGoalieUnum()).GetPos();
    Uncyc = world_state.GetTeammate(world_state.GetTeammateGoalieUnum())
                .GetPosDelay();
  }

  return mpTeammateFormation->GetExpectedGoaliePos(bp, run, gPos, Uncyc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x2110(%rax), %rcx
testq %rcx, %rcx
je 0x267a2
imulq $0x178, %rcx, %rcx      # imm = 0x178
movsd 0x428ad(%rip), %xmm3    # 0x69040
ucomisd -0xb0(%rcx,%rax), %xmm3
jbe 0x2687b
movsd %xmm2, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x28(%rbp)
callq 0x49360
leaq 0x4572b(%rip), %rax     # 0x6bee8
movsd (%rax), %xmm0
mulsd 0x430af(%rip), %xmm0    # 0x69878
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
callq 0x49360
callq 0x49360
movsd 0x3008(%rax), %xmm0
mulsd 0x43083(%rip), %xmm0    # 0x69878
movsd 0x43dc3(%rip), %xmm1    # 0x6a5c0
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
callq 0x49360
callq 0x49360
movsd -0x38(%rbp), %xmm2
movsd 0x4305b(%rip), %xmm0    # 0x69878
mulsd 0x3008(%rax), %xmm0
addsd 0x43d9b(%rip), %xmm0    # 0x6a5c8
movapd %xmm0, %xmm4
movsd -0x28(%rbp), %xmm3
subsd -0x20(%rbp), %xmm3
movsd -0x30(%rbp), %xmm1
movapd %xmm1, %xmm0
subsd -0x18(%rbp), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
sqrtsd %xmm0, %xmm0
subsd %xmm4, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
sqrtsd %xmm1, %xmm1
minsd %xmm0, %xmm1
divsd 0x43153(%rip), %xmm1    # 0x699c8
cvttsd2si %xmm1, %ecx
jmp 0x26890
addq %rcx, %rax
addq $-0xc8, %rax
movupd (%rax), %xmm0
movapd %xmm0, -0x10(%rbp)
movl 0x10(%rax), %ecx
leaq -0x48(%rbp), %rsi
leaq -0x10(%rbp), %rdx
movaps %xmm2, %xmm0
callq 0x24d22
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x268c8
xorpd %xmm1, %xmm1
movsd 0x43d4a(%rip), %xmm0    # 0x6a610
jmp 0x26912
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_O3/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 0x26937
xorpd %xmm3, %xmm3
movsd 0x43cde(%rip), %xmm2    # 0x6a610
jmp 0x26a20
cmpl %edx, %ecx
jne 0x26967
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 0x43cb3(%rip), %xmm0    # 0x6a618
jmp 0x2697d
testl %edx, %edx
jle 0x26a06
cmpl $0x0, 0x10(%rax)
jle 0x26a06
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), %xmm2
ucomisd %xmm0, %xmm2
ja 0x269b6
movsd 0x8(%rdi), %xmm3
ucomisd %xmm3, %xmm0
movapd %xmm0, %xmm2
jbe 0x269b6
movapd %xmm3, %xmm2
movsd 0x10(%rdi), %xmm3
ucomisd %xmm1, %xmm3
ja 0x269d4
movsd 0x18(%rdi), %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm3
jbe 0x269d4
movapd %xmm0, %xmm3
cmpl %esi, %edx
je 0x26a20
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), %xmm2
addsd 0x388(%rax,%rcx), %xmm3
jmp 0x26a20
pushq %rbp
movq %rsp, %rbp
movsd 0x42fae(%rip), %xmm0    # 0x699c0
callq 0x2670c
movapd %xmm0, %xmm2
movapd %xmm1, %xmm3
popq %rbp
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::GetOpponentExpectedGoaliePos(Vector, double)
Vector Formation::GetOpponentExpectedGoaliePos(Vector bp, double run) {
  const WorldState &world_state = mAgent.GetWorldState();

  Vector gPos;
  int Uncyc;
  if (world_state.GetOpponentGoalieUnum() == 0 ||
      world_state.GetOpponent(world_state.GetOpponentGoalieUnum())
              .GetPosConf() < FLOAT_EPS) { //取守门员的位置以及没有见到的周期
    gPos = Vector(ServerParam::instance().PITCH_LENGTH / 2.0, 0.0); // 估值而已

    Vector p[2];
    double dist[2];
    p[0] = Vector(ServerParam::instance().PITCH_LENGTH / 2.0,
                  -ServerParam::instance().goalWidth() / 2.0 + 0.1); // top
    p[1] = Vector(ServerParam::instance().PITCH_LENGTH / 2.0,
                  ServerParam::instance().goalWidth() / 2.0 - 0.1); // down
    dist[0] = bp.Dist(p[0]);
    dist[1] = bp.Dist(p[1]);
    Uncyc = (int)(Min(dist[0], dist[1]) / 5.0);
  } else {
    gPos =
        world_state.GetOpponent(world_state.GetOpponentGoalieUnum()).GetPos();
    Uncyc = world_state.GetOpponent(world_state.GetOpponentGoalieUnum())
                .GetPosDelay();
  }

  return mpOpponentFormation->GetExpectedGoaliePos(bp, run, gPos, Uncyc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x2114(%rax), %rcx
testq %rcx, %rcx
je 0x26ae4
imulq $0x178, %rcx, %rcx      # imm = 0x178
movsd 0x4256b(%rip), %xmm3    # 0x69040
ucomisd 0xf78(%rcx,%rax), %xmm3
jbe 0x26bbd
movsd %xmm2, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x28(%rbp)
callq 0x49360
leaq 0x453e9(%rip), %rax     # 0x6bee8
movsd (%rax), %xmm0
mulsd 0x42d6d(%rip), %xmm0    # 0x69878
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
callq 0x49360
callq 0x49360
movsd 0x3008(%rax), %xmm0
mulsd 0x42d41(%rip), %xmm0    # 0x69878
movsd 0x43a81(%rip), %xmm1    # 0x6a5c0
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
callq 0x49360
callq 0x49360
movsd -0x38(%rbp), %xmm2
movsd 0x42d19(%rip), %xmm0    # 0x69878
mulsd 0x3008(%rax), %xmm0
addsd 0x43a59(%rip), %xmm0    # 0x6a5c8
movapd %xmm0, %xmm4
movsd -0x28(%rbp), %xmm3
subsd -0x20(%rbp), %xmm3
movsd -0x30(%rbp), %xmm1
movapd %xmm1, %xmm0
subsd -0x18(%rbp), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
sqrtsd %xmm0, %xmm0
subsd %xmm4, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
sqrtsd %xmm1, %xmm1
minsd %xmm0, %xmm1
divsd 0x42e11(%rip), %xmm1    # 0x699c8
cvttsd2si %xmm1, %ecx
jmp 0x26bd2
addq %rcx, %rax
addq $0xf60, %rax            # imm = 0xF60
movupd (%rax), %xmm0
movapd %xmm0, -0x10(%rbp)
movl 0x10(%rax), %ecx
leaq -0x48(%rbp), %rsi
leaq -0x10(%rbp), %rdx
movaps %xmm2, %xmm0
callq 0x24d22
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x26c3c
movapd %xmm2, %xmm0
jmp 0x26c44
xorpd %xmm0, %xmm0
minsd %xmm2, %xmm0
mulsd 0x58(%rax), %xmm1
subsd 0x388(%rsi,%rcx), %xmm1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x26c66
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_O3/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 0x433a7(%rip), %rdx     # 0x6a65d
movq %rax, %rdi
xorl %esi, %esi
callq 0x250f8
movq %r14, (%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x4339c(%rip), %rdx     # 0x6a673
movq %rax, %rdi
movl $0x3, %esi
callq 0x250f8
movq %r14, 0x8(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x4338d(%rip), %rdx     # 0x6a689
movq %rax, %rdi
xorl %esi, %esi
callq 0x250f8
movq %r14, 0x10(%rbx)
movl $0xca8, %edi            # imm = 0xCA8
callq 0x94c0
movq %rax, %r14
leaq 0x43381(%rip), %rdx     # 0x6a69f
movq %rax, %rdi
movl $0x3, %esi
callq 0x250f8
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 0x25e82
movq %r14, 0x20(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x25e82
movq %r14, 0x28(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x25e82
movq %r14, 0x30(%rbx)
movl $0xcf8, %edi            # imm = 0xCF8
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x25e82
movq %r14, 0x38(%rbx)
movq 0x20(%rbx,%r15,8), %rax
movq %rax, 0x60(%rbx,%r15,8)
incq %r15
cmpq $0x4, %r15
jne 0x273c6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x273ea
jmp 0x273ea
jmp 0x273ea
movq %rax, %rbx
movl $0xca8, %esi            # imm = 0xCA8
movq %r14, %rdi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2743d
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
cmpq $0x4, %r14
jne 0x2742d
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x27458
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
cmpq $0x4, %r14
jne 0x27449
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x28834
leaq -0x9(%rbp), %rsi
movb $0x2d, (%rsi)
jmp 0x2883b
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_O3/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 0x5b608(%rip), %rax     # 0x84530
cmoveq %rax, %rdx
movq %rdx, 0x8(%rdi)
testq %rcx, %rcx
cmoveq %rax, %rcx
movq %rcx, 0x10(%rdi)
movq (%rsi), %r12
movq %rsi, -0x38(%rbp)
cmpq 0x8(%rsi), %r12
je 0x2900d
movq %rdi, %r14
addq $0x30, %r14
xorl %ebx, %ebx
leaq -0x1c0(%rbp), %r13
leaq -0x30(%rbp), %r15
movq %r13, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x97b0
movq $0x0, -0x30(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x18(%r14)
movq %r13, %rdi
movq %r15, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x10(%r14)
movq %r13, %rdi
movq %r15, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x8(%r14)
movq %r13, %rdi
movq %r15, %rsi
callq 0x9310
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movq %r13, %rdi
movq 0x5afbf(%rip), %rsi     # 0x83f98
callq 0x9370
leaq -0x140(%rbp), %rdi
callq 0x91c0
addq $0x20, %r12
movq -0x38(%rbp), %rax
cmpq 0x8(%rax), %r12
je 0x2900d
leaq 0x1(%rbx), %rax
addq $0x20, %r14
cmpq $0xa, %rbx
movq %rax, %rbx
jb 0x28f60
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x5af6f(%rip), %rsi     # 0x83f98
leaq -0x1c0(%rbp), %rdi
callq 0x9370
leaq -0x140(%rbp), %rdi
callq 0x91c0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3ff59(%rip), %xmm0    # 0x69050
divsd 0x3ff49(%rip), %xmm0    # 0x69048
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 0x3fed3(%rip), %xmm3    # 0x69010
andpd %xmm2, %xmm3
movsd 0x3fef7(%rip), %xmm4    # 0x69040
ucomisd %xmm3, %xmm4
jbe 0x29153
xorl %eax, %eax
jmp 0x29183
xorpd 0x3fec5(%rip), %xmm0    # 0x69020
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_O3/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 0x290d0
movl %eax, %r14d
testb %al, %al
je 0x291f1
leaq -0x20(%rbp), %rsi
movq %r15, %rdi
callq 0x2a27a
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_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::Intersection(Ray const&, Vector&) const
bool Ray::Intersection(const Ray &r, Vector &point) const {
  Line l1(*this);
  Line l2(r);

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x220f2
leaq -0x40(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x220f2
movsd 0x8(%r12), %xmm1
movapd 0x3fdc9(%rip), %xmm3    # 0x69010
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
movsd 0x3fde9(%rip), %xmm0    # 0x69040
ucomisd %xmm2, %xmm0
movsd 0x8(%r13), %xmm2
jbe 0x2926d
andpd %xmm2, %xmm3
ucomisd %xmm3, %xmm0
ja 0x292c1
movsd -0x58(%rbp), %xmm3
divsd %xmm1, %xmm3
movsd -0x40(%rbp), %xmm1
divsd %xmm2, %xmm1
subsd %xmm1, %xmm3
andpd 0x3fd85(%rip), %xmm3    # 0x69010
ucomisd %xmm3, %xmm0
ja 0x292c1
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %rbx, %rdx
callq 0x292d2
testb %al, %al
je 0x292c1
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2a2e2
testb %al, %al
je 0x292c1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a2e2
jmp 0x292c3
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3fd2d(%rip), %xmm2    # 0x69010
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
movsd 0x3fd4d(%rip), %xmm4    # 0x69040
ucomisd %xmm1, %xmm4
movsd 0x8(%rsi), %xmm1
jbe 0x29308
andpd %xmm1, %xmm2
ucomisd %xmm2, %xmm4
ja 0x29332
movsd (%rdi), %xmm2
movapd %xmm2, %xmm5
divsd %xmm0, %xmm5
movsd (%rsi), %xmm3
movapd %xmm3, %xmm6
divsd %xmm1, %xmm6
subsd %xmm6, %xmm5
andpd 0x3fce4(%rip), %xmm5    # 0x69010
ucomisd %xmm5, %xmm4
jbe 0x29339
xorl %eax, %eax
jmp 0x293f0
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm0
je 0x2938d
ucomisd %xmm4, %xmm1
xorpd 0x3fcd1(%rip), %xmm2    # 0x69020
je 0x293c3
movsd 0x10(%rdi), %xmm5
movsd 0x10(%rsi), %xmm6
mulsd %xmm0, %xmm6
movapd %xmm5, %xmm4
mulsd %xmm1, %xmm4
subsd %xmm6, %xmm4
mulsd %xmm2, %xmm1
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
divsd %xmm3, %xmm4
movsd %xmm4, (%rdx)
mulsd %xmm2, %xmm4
subsd %xmm5, %xmm4
divsd %xmm0, %xmm4
jmp 0x293e9
movsd 0x10(%rdi), %xmm0
xorpd 0x3fc86(%rip), %xmm0    # 0x69020
divsd %xmm2, %xmm0
ucomisd %xmm4, %xmm1
je 0x293bd
xorpd 0x3fc74(%rip), %xmm3    # 0x69020
mulsd %xmm0, %xmm3
subsd 0x10(%rsi), %xmm3
divsd %xmm1, %xmm3
movapd %xmm3, %xmm4
movsd %xmm0, (%rdx)
jmp 0x293e9
movsd 0x10(%rsi), %xmm1
xorpd 0x3fc50(%rip), %xmm1    # 0x69020
divsd %xmm3, %xmm1
mulsd %xmm1, %xmm2
subsd 0x10(%rdi), %xmm2
divsd %xmm0, %xmm2
movsd %xmm1, (%rdx)
movapd %xmm2, %xmm4
movsd %xmm4, 0x8(%rdx)
movb $0x1, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Ray::GetClosestPoint(Vector const&) const
Vector Ray::GetClosestPoint(const Vector &point) const {
  Line l(*this);
  Vector closest_point = l.GetProjectPoint(point);
  return fabs(GetNormalizeAngleDeg((closest_point - mOrigin).Dir() -
                                   mDirection)) < 90
             ? closest_point
             : this->Origin();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x220f2
movq %r15, %rdi
movq %r14, %rsi
callq 0x221b4
movapd %xmm0, %xmm6
movapd %xmm1, %xmm5
movapd %xmm0, %xmm1
subsd (%rbx), %xmm1
movapd %xmm5, %xmm2
subsd 0x8(%rbx), %xmm2
movapd 0x3fb74(%rip), %xmm3    # 0x69010
movapd %xmm1, %xmm0
andpd %xmm3, %xmm0
movsd 0x3fb94(%rip), %xmm4    # 0x69040
ucomisd %xmm0, %xmm4
jbe 0x294c0
andpd %xmm2, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm4
ja 0x294ed
movapd %xmm2, %xmm0
movsd %xmm5, -0x20(%rbp)
movapd %xmm6, -0x30(%rbp)
callq 0x90d0
movapd -0x30(%rbp), %xmm6
movsd -0x20(%rbp), %xmm5
mulsd 0x3fb63(%rip), %xmm0    # 0x69048
divsd 0x3fb63(%rip), %xmm0    # 0x69050
subsd 0x10(%rbx), %xmm0
movsd 0x3fb66(%rip), %xmm1    # 0x69060
ucomisd %xmm0, %xmm1
jbe 0x29514
movsd 0x3fb68(%rip), %xmm2    # 0x69070
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x29508
jmp 0x29538
ucomisd 0x3fb2c(%rip), %xmm0    # 0x69048
jb 0x29538
movsd 0x3fb42(%rip), %xmm1    # 0x69068
movsd 0x3fb1a(%rip), %xmm2    # 0x69048
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jae 0x2952e
andpd 0x3fad0(%rip), %xmm0    # 0x69010
movsd 0x3fb68(%rip), %xmm1    # 0x690b0
ucomisd %xmm0, %xmm1
ja 0x29553
movsd 0x8(%rbx), %xmm5
cmpltsd %xmm1, %xmm0
andpd %xmm0, %xmm6
movsd (%rbx), %xmm1
andnpd %xmm1, %xmm0
orpd %xmm6, %xmm0
movapd %xmm5, %xmm1
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Geometry.cpp
// Function: Line::IsInBetween(Vector const&, Vector const&, Vector const&) const
bool Line::IsInBetween(const Vector &pt, const Vector &end1,
                       const Vector &end2) const {
  Assert(IsOnLine(end1) && IsOnLine(end2));

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

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

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

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x29578
testb %al, %al
je 0x296b3
movq %r12, %rdi
movq %r14, %rsi
callq 0x221b4
jmp 0x29718
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd (%r14), %xmm4
movsd 0x8(%r14), %xmm5
movapd %xmm0, %xmm6
subsd %xmm4, %xmm6
movapd %xmm1, %xmm2
subsd %xmm5, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm6, %xmm6
addsd %xmm2, %xmm6
movsd (%rbx), %xmm2
movsd 0x8(%rbx), %xmm3
movapd %xmm2, %xmm7
subsd %xmm4, %xmm7
movapd %xmm3, %xmm4
subsd %xmm5, %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm7, %xmm7
addsd %xmm4, %xmm7
ucomisd %xmm6, %xmm7
ja 0x29718
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop