LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Simulator.cpp
// Function: Simulator::Player::Dash(double, int)
void Simulator::Player::Dash(double power, int dir_idx) {
  power = GetNormalizeDashPower(power);

  AngleDeg dir = Dasher::DASH_DIR[dir_idx];
  double dir_rate = Dasher::DIR_RATE[dir_idx];
  ;

  bool back_dash = power < 0.0;

  double power_need = (back_dash ? power * -2.0 : power);
  power_need = std::min(
      power_need,
      mStamina +
          PlayerParam::instance().HeteroPlayer(mPlayerType).extraStamina());
  mStamina = std::max(0.0, mStamina - power_need);

  power = (back_dash ? power_need / -2.0 : power_need);

  double acc = std::fabs(
      mEffort * power * dir_rate *
      PlayerParam::instance().HeteroPlayer(mPlayerType).dashPowerRate());

  if (back_dash) {
    dir += 180.0;
  }

  mVel += Polar2Vector(acc, GetNormalizeAngleDeg(mBodyDir + dir));
  Step();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x40(%rbp), %r15
movsd %xmm0, (%r15)
movq %r15, %rdi
callq 0xce6b
movaps %xmm0, -0x50(%rbp)
movsd %xmm0, (%r15)
movslq %r14d, %rax
leaq 0x3e907(%rip), %rcx     # 0x7de18
movsd (%rcx,%rax,8), %xmm0
movaps %xmm0, -0x60(%rbp)
leaq 0x3e957(%rip), %rcx     # 0x7de78
movsd (%rcx,%rax,8), %xmm0
movaps %xmm0, -0x30(%rbp)
cvtsi2sdl 0x28(%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x38d94
movapd -0x50(%rbp), %xmm1
movslq 0x38(%rbx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
ja 0x3f559
movapd %xmm1, %xmm0
jmp 0x3f565
movsd 0x17af7(%rip), %xmm0    # 0x57058
mulsd %xmm1, %xmm0
movq 0x5c38(%rax), %rax
movsd -0x38(%rbp), %xmm3
addsd 0x3050(%rax,%rcx), %xmm3
minsd %xmm0, %xmm3
cvtsi2sdl 0x28(%rbx), %xmm0
subsd %xmm3, %xmm0
maxsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x28(%rbx)
jbe 0x3f59c
mulsd 0x17ac4(%rip), %xmm3    # 0x57060
movsd %xmm3, -0x40(%rbp)
mulsd 0x30(%rbx), %xmm3
movapd -0x30(%rbp), %xmm0
mulsd %xmm3, %xmm0
movapd %xmm0, -0x30(%rbp)
callq 0x38d94
movq 0x5c38(%rax), %rax
movslq 0x38(%rbx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movapd -0x30(%rbp), %xmm0
mulsd 0x3030(%rax,%rcx), %xmm0
andpd 0x17a2f(%rip), %xmm0    # 0x57010
leaq -0x78(%rbp), %r14
movlpd %xmm0, (%r14)
movsd 0x17a76(%rip), %xmm2    # 0x57068
movapd -0x60(%rbp), %xmm3
addsd %xmm3, %xmm2
movapd -0x50(%rbp), %xmm0
cmpltsd 0x18cd7(%rip), %xmm0    # 0x582e0
movapd %xmm0, %xmm1
andnpd %xmm3, %xmm1
andpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addsd 0x20(%rbx), %xmm0
movabsq $-0x3f99800000000000, %rax # imm = 0xC066800000000000
leaq -0x68(%rbp), %rdi
movq %rax, (%rdi)
callq 0xd305
leaq -0x70(%rbp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0xd15b
addsd 0x10(%rbx), %xmm0
movsd %xmm0, 0x10(%rbx)
addsd 0x18(%rbx), %xmm1
movsd %xmm1, 0x18(%rbx)
movq %rbx, %rdi
callq 0x3f702
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Simulator.cpp
// Function: Simulator::Player::Act(AtomicAction const&)
void Simulator::Player::Act(const AtomicAction &act) {
  switch (act.mType) {
  case CT_Turn:
    Turn(GetTurnMoment(act.mTurnAngle, mPlayerType, mVel.Mod()));
    break;
  case CT_Dash:
    Dash(act.mDashPower, Dasher::GetDashDirIdx(act.mDashDir));
    break;
  case CT_Kick:
    Step();
    break;
  case CT_None:
    break;
  default:
    Assert(0);
    break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x4(%rsi), %eax
cmpl $0x6, %eax
je 0x3f6f3
cmpl $0x2, %eax
je 0x3f6c8
cmpl $0x1, %eax
jne 0x3f6c1
movsd 0x18(%rsi), %xmm0
movl 0x38(%rbx), %edi
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
callq 0xcde1
leaq -0x18(%rbp), %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x3f772
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movsd 0x20(%rsi), %xmm0
movsd %xmm0, -0x10(%rbp)
addq $0x28, %rsi
movq %rsi, %rdi
callq 0x1cb50
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
movl %eax, %esi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x3f4da
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x3f702
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Simulator.h
// Function: Simulator::Player::Turn(double const&)
void Turn(const AngleDeg &moment) {
      mBodyDir = GetNormalizeAngleDeg(
          mBodyDir +
          GetNormalizeMoment(moment) / (1.0 + PlayerParam::instance()
                                                      .HeteroPlayer(mPlayerType)
                                                      .inertiaMoment() *
                                                  mVel.Mod()));
      Step();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x20(%rdi), %xmm0
movsd %xmm0, -0x18(%rbp)
movq %rsi, %rdi
callq 0xce36
movsd %xmm0, -0x10(%rbp)
callq 0x38d94
movq 0x5c38(%rax), %rax
movslq 0x38(%rbx), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
mulsd 0x3028(%rax,%rcx), %xmm0
addsd 0x17871(%rip), %xmm0    # 0x57048
movsd -0x10(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x18(%rbp), %xmm1
movapd %xmm1, %xmm0
movabsq $-0x3f99800000000000, %rax # imm = 0xC066800000000000
leaq -0x20(%rbp), %rdi
movq %rax, (%rdi)
callq 0xd305
movsd %xmm0, 0x20(%rbx)
movq %rbx, %rdi
callq 0x3f702
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::Strategy(Agent&)
Strategy::Strategy(Agent &agent) : DecisionData(agent) {
  mSituation = ST_Defense;
  mLastController = 0;

  mIsBallActuralKickable = false;
  mIsBallFree = false;
  mController = 0;
  mChallenger = 0;

  mForbiddenDribble = false;

  mIsPenaltyFirstStep = false;
  mPenaltyTaker = 0;
  mPenaltySetupTime = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1cdd8
leaq 0x371e2(%rip), %rax     # 0x76c50
movq %rax, (%rbx)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x54(%rbx)
leaq 0xb0(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
callq 0x24d88
movl $0x2, 0xa4(%rbx)
andl $0x0, 0x5c(%rbx)
andw $0x0, 0x40(%rbx)
andq $0x0, 0x48(%rbx)
xorl %eax, %eax
movb %al, 0xa8(%rbx)
movb %al, 0x140(%rbx)
andq $0x0, 0x144(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x1ce32
movq %r14, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::StrategyAnalyze()
void Strategy::StrategyAnalyze() {
  mIsLastBallFree = mIsBallFree;
  if (mIsBallFree == false) //记录上次不free时的状态，参考WE2008
  {
    mLastController = mController;
    mLastChallenger = mChallenger;
  }

  mIsBallActuralKickable = false;
  mIsBallFree = true;
  mController = 0;

  mMyInterCycle = 150;
  mMinTmInterCycle = 150;
  mMinOppInterCycle = 150;
  mMinIntercCycle = 150;
  mSureTmInterCycle = 150;
  mSureOppInterCycle = 150;
  mSureInterCycle = 150;
  mFastestTm = 0;
  mFastestOpp = 0;
  mSureTm = 0;
  mSureOpp = 0;

  mBallInterPos = mWorldState.GetBall().GetPos();
  mBallFreeCycleLeft = 0;
  mBallOutCycle = 1000;

  mController = 0;
  mChallenger = 0;

  if (mForbiddenDribble) {
    if (!mSelfState.IsKickable()) {
      mForbiddenDribble = false;
    }
  }

  BallPossessionAnalyse();

  SituationAnalyse();

  // And once they are over, roll back formation. Formation will be updated by
  // BehaviorData when needed.
  mFormation.Rollback("Strategy");

  if (mSelfState.GetTackleProb(false) < FLOAT_EPS) {
    if (mIsBallFree) {
      if (mMyTackleInfo.mMinCycle >= mSureInterCycle ||
          (mController > 0 && mController != mSelfState.GetUnum())) {
        mMyTackleInfo.mRes = IR_Failure;
      }
    }
  } else {
    mMyTackleInfo.mRes = IR_Success;
    mMyTackleInfo.mMinCycle = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb 0x41(%rdi), %al
movb %al, 0x50(%rdi)
testb %al, %al
jne 0x3fb84
movq 0x48(%rbx), %rax
movq %rax, 0x5c(%rbx)
movw $0x100, 0x40(%rbx)      # imm = 0x100
andl $0x0, 0x48(%rbx)
movaps 0x1af4b(%rip), %xmm0    # 0x5aae0
movups %xmm0, 0x64(%rbx)
movabsq $0x9600000096, %rax     # imm = 0x9600000096
movq %rax, 0x7c(%rbx)
movl $0x96, 0x84(%rbx)
andq $0x0, 0x74(%rbx)
andq $0x0, 0x88(%rbx)
movq 0x18(%rbx), %rax
movups 0x38(%rax), %xmm0
movups %xmm0, 0x90(%rbx)
andq $0x0, 0x44(%rbx)
movl $0x3e8, 0xa0(%rbx)      # imm = 0x3E8
andl $0x0, 0x4c(%rbx)
cmpb $0x1, 0xa8(%rbx)
jne 0x3fbfd
movq 0x28(%rbx), %rax
cmpb $0x0, 0x128(%rax)
jne 0x3fbfd
movb $0x0, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x3fd26
movq %rbx, %rdi
callq 0x40742
movq 0x38(%rbx), %r14
leaq 0x1aee8(%rip), %rsi     # 0x5ab00
leaq -0x40(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
callq 0x10e4a
movq %r14, %rdi
movq %r15, %rsi
callq 0x2122e
leaq -0x40(%rbp), %rdi
callq 0x9240
movq 0x28(%rbx), %rdx
movsd 0x173f8(%rip), %xmm0    # 0x57040
ucomisd 0x140(%rdx), %xmm0
jbe 0x3fc7f
cmpb $0x1, 0x41(%rbx)
jne 0x3fc93
movl 0x124(%rbx), %esi
pushq $0x1
popq %rax
movl $0x13c, %ecx            # imm = 0x13C
cmpl 0x84(%rbx), %esi
jge 0x3fc90
movl 0x48(%rbx), %esi
testl %esi, %esi
jle 0x3fc93
cmpl 0x11c(%rdx), %esi
jne 0x3fc90
jmp 0x3fc93
movl $0x2, 0x13c(%rbx)
xorl %eax, %eax
movl $0x124, %ecx            # imm = 0x124
movl %eax, (%rbx,%rcx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x9240
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::PenaltyAnalyze()
void Strategy::PenaltyAnalyze() {
  if (IsPenaltyPlayMode() == false) {
    return;
  }

  if (mWorldState.GetPlayModeTime() == mWorldState.CurrentTime()) {
    static Unum penalty_taker_seq[] = {1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2};
    const PlayMode &play_mode = mWorldState.GetPlayMode();
    if (play_mode == PM_Our_Penalty_Setup) {
      while (penalty_taker_seq[++mPenaltySetupTime % TEAMSIZE] ==
             mWorldState.GetTeammateGoalieUnum())
        ;
      mPenaltyTaker = penalty_taker_seq[mPenaltySetupTime % TEAMSIZE];
    } else if (play_mode == PM_Opp_Penalty_Setup) {
      mPenaltyTaker = -1;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x40d10
testb %al, %al
je 0x3fd1e
movq 0x18(%rbx), %rax
movl 0x28(%rax), %ecx
cmpl 0x14(%rax), %ecx
jne 0x3fd1e
movl 0x10(%rax), %ecx
cmpl %ecx, 0x24(%rax)
jne 0x3fd1e
movl 0x1c(%rax), %ecx
cmpl $0x31, %ecx
je 0x3fd15
cmpl $0xe, %ecx
jne 0x3fd1e
movl 0x2110(%rax), %esi
movl 0x144(%rbx), %ecx
pushq $0xb
popq %rdi
leaq 0x1ae25(%rip), %r8      # 0x5ab20
incl %ecx
movl %ecx, %eax
cltd
idivl %edi
movslq %edx, %rax
movl (%r8,%rax,4), %eax
cmpl %esi, %eax
je 0x3fcfb
movl %ecx, 0x144(%rbx)
jmp 0x3fd18
pushq $-0x1
popq %rax
movl %eax, 0x148(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::SituationAnalyse()
void Strategy::SituationAnalyse() {
  if (mController < 0 && mWorldState.GetBall().GetPos().X() < -10) {
    mSituation = ST_Defense;
  } else {
    if (!mIsBallFree) {
      if (mController >= 0) {
        if (mBallInterPos.X() < 32.0) {
          if (mInfoState.GetPositionInfo().GetTeammateOffsideLine() > 40.0 &&
              mAgent.GetFormation()
                      .GetTeammateRoleType(mController)
                      .mLineType == LT_Midfielder &&
              mBallInterPos.X() > 25.0) {
            mSituation = ST_Penalty_Attack;
          } else {
            mSituation = ST_Forward_Attack;
          }
        } else {
          mSituation = ST_Penalty_Attack;
        }
      } else {
        mSituation = ST_Defense;
      }
    } else {
      if (IsMyControl() || mSureTmInterCycle <= mSureOppInterCycle) {
        if (mBallInterPos.X() < 32.0 && mController > 0) {
          if (mInfoState.GetPositionInfo().GetTeammateOffsideLine() > 40.0 &&
              mAgent.GetFormation()
                      .GetTeammateRoleType(mController)
                      .mLineType == LT_Midfielder &&
              mBallInterPos.X() > 25.0) {
            mSituation = ST_Penalty_Attack;
          } else {
            mSituation = ST_Forward_Attack;
          }
        } else {
          mSituation = ST_Penalty_Attack;
        }
      } else {
        mSituation = ST_Defense;
      }
    }
  }

  mFormation.Update(Formation::Offensive, "Strategy");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x48(%rdi), %eax
pushq $0x2
popq %r14
testl %eax, %eax
jns 0x40772
movq 0x18(%rbx), %rcx
movsd 0x18801(%rip), %xmm0    # 0x58f68
ucomisd 0x38(%rcx), %xmm0
ja 0x40804
cmpb $0x0, 0x41(%rbx)
je 0x40796
movq 0x10(%rbx), %rcx
cmpl 0x8(%rcx), %eax
je 0x4078c
movl 0x7c(%rbx), %ecx
cmpl 0x80(%rbx), %ecx
jg 0x40804
pushq $0x1
popq %r14
testl %eax, %eax
jg 0x4079e
jmp 0x40804
testl %eax, %eax
js 0x40804
pushq $0x1
popq %r14
movsd 0x1a352(%rip), %xmm0    # 0x5aaf8
ucomisd 0x90(%rbx), %xmm0
jbe 0x40804
movq 0x30(%rbx), %rdi
callq 0x244e8
movsd 0x17a0(%rax), %xmm0
ucomisd 0x1877f(%rip), %xmm0    # 0x58f48
jbe 0x40801
movq 0x10(%rbx), %rdi
callq 0x10dfe
movslq 0x48(%rbx), %rcx
movq 0x10(%rax), %rax
movslq 0x350(%rax,%rcx,4), %rcx
shlq $0x4, %rcx
cmpl $0x2, 0x58(%rcx,%rax)
jne 0x40801
movsd 0x90(%rbx), %xmm0
ucomisd 0x18c41(%rip), %xmm0    # 0x59440
ja 0x40804
xorl %r14d, %r14d
movl %r14d, 0xa4(%rbx)
movq 0x38(%rbx), %rbx
leaq 0x1a2ea(%rip), %rsi     # 0x5ab00
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x10e4a
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20fe8
leaq -0x38(%rbp), %rdi
callq 0x9240
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x9240
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::SetPlayAnalyse()
bool Strategy::SetPlayAnalyse() {
  PlayMode play_mode = mWorldState.GetPlayMode();
  if (play_mode == PM_Before_Kick_Off) {
    mIsBallFree = true;
    mController = mInfoState.GetPositionInfo().GetClosestPlayerToBall();
    return true;
  } else if (play_mode < PM_Our_Mode && play_mode > PM_Play_On) {
    mIsBallFree = true;
    if (mBallState.GetVel().Mod() < 0.16) { //如果有球速，说明已经发球了
      mController = mInfoState.GetPositionInfo().GetClosestTeammateToBall();
    }
    return true;
  } else if (play_mode > PM_Opp_Mode) {
    mIsBallFree = true;
    if (mBallState.GetVel().Mod() < 0.16) { //如果有球速，说明已经发球了
      mController = -mInfoState.GetPositionInfo().GetClosestOpponentToBall();
    }
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl 0x1c(%rax), %eax
cmpl $0x16, %eax
jne 0x40890
movb $0x1, 0x41(%rbx)
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x40d86
movl %eax, 0x48(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leal -0x2(%rax), %ecx
cmpl $0x12, %ecx
ja 0x408dd
movb $0x1, 0x41(%rbx)
movq 0x20(%rbx), %rax
movsd 0x30(%rax), %xmm0
movsd 0x38(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movb $0x1, %al
movsd 0x1800c(%rip), %xmm1    # 0x588d0
ucomisd %xmm0, %xmm1
jbe 0x40889
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x114f0
jmp 0x40884
cmpl $0x25, %eax
jl 0x40930
movb $0x1, 0x41(%rbx)
movq 0x20(%rbx), %rax
movsd 0x30(%rax), %xmm0
movsd 0x38(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movb $0x1, %al
movsd 0x17fc2(%rip), %xmm1    # 0x588d0
ucomisd %xmm0, %xmm1
jbe 0x40889
movq 0x30(%rbx), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x12338
negl %eax
jmp 0x40884
xorl %eax, %eax
jmp 0x40889
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::GetTeammateSBSPPosition(int, Vector const&)
Vector Strategy::GetTeammateSBSPPosition(Unum t, const Vector &ballpos) {
  Vector position;

  if (mController > 0 || (mController == 0 && mBallInterPos.X() > 10.0)) {
    position = mAgent.GetFormation().GetTeammateFormationPoint(t, mController,
                                                               ballpos);
  } else {
    position = mAgent.GetFormation().GetTeammateFormationPoint(t);
  }

  double x =
      Min(position.X(), mInfoState.GetPositionInfo().GetTeammateOffsideLine() -
                            PlayerParam::instance().AtPointBuffer());
  if (mAgent.GetFormation().GetTeammateRoleType(t).mLineType ==
      LT_Defender) { //后卫不过中场，便于回防
    position.SetX(Min(0.0, x));
  } else if (mAgent.GetFormation().GetTeammateRoleType(t).mLineType ==
             LT_Forward) { //前锋不回场，便于进攻…………
    position.SetX(Max(-1.0, x));
  } else
    position.SetX(x);

  return position;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x0, 0x48(%rdi)
jg 0x40970
jne 0x40a48
movsd 0x90(%rbx), %xmm0
ucomisd 0x16dbe(%rip), %xmm0    # 0x57728
jbe 0x40a48
movq 0x10(%rbx), %rdi
callq 0x10dfe
movl 0x48(%rbx), %edx
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movq %rax, %rdi
movl %r14d, %esi
callq 0x20c6e
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movq 0x30(%rbx), %rdi
callq 0x244e8
movsd 0x17a0(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x38d94
movsd -0x20(%rbp), %xmm0
subsd 0x5c68(%rax), %xmm0
minsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq 0x10(%rbx), %rdi
callq 0x10dfe
movq 0x10(%rax), %rax
movslq %r14d, %r14
movslq 0x350(%rax,%r14,4), %rcx
shlq $0x4, %rcx
cmpl $0x1, 0x58(%rcx,%rax)
jne 0x40a04
xorpd %xmm0, %xmm0
movsd -0x20(%rbp), %xmm1
minsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x40a38
movq 0x10(%rbx), %rdi
callq 0x10dfe
movq 0x10(%rax), %rax
movslq 0x350(%rax,%r14,4), %rcx
shlq $0x4, %rcx
cmpl $0x3, 0x58(%rcx,%rax)
jne 0x40a33
movsd -0x20(%rbp), %xmm0
maxsd 0x1663f(%rip), %xmm0    # 0x57070
jmp 0x40a38
movsd -0x20(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rdi
callq 0x10dfe
movsd 0x16f37(%rip), %xmm0    # 0x57990
movq %rax, %rdi
movl %r14d, %esi
callq 0x20a9c
jmp 0x40992
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::IsPenaltyPlayMode() const
bool Strategy::IsPenaltyPlayMode() const {
  const PlayMode &play_mode = mWorldState.GetPlayMode();
  return (play_mode == PM_Penalty_On_Our_Field) ||
         (play_mode == PM_Penalty_On_Opp_Field) ||
         (play_mode >= PM_Our_Penalty_Setup &&
          play_mode <= PM_Our_Penalty_Miss) ||
         (play_mode >= PM_Opp_Penalty_Setup &&
          play_mode <= PM_Opp_Penalty_Miss);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
movl 0x1c(%rax), %ecx
movb $0x1, %al
cmpl $0x17, %ecx
je 0x40d38
cmpl $0x1a, %ecx
je 0x40d38
leal -0xe(%rcx), %edx
cmpl $0x5, %edx
jb 0x40d38
addl $-0x31, %ecx
cmpl $0x5, %ecx
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Tackler.cpp
// Function: Tackler::GetBallVelAfterTackle(Agent const&, double)
Vector Tackler::GetBallVelAfterTackle(const Agent &agent,
                                      AngleDeg tackle_angle) {
  UpdateTackleData(agent);

  tackle_angle = GetNormalizeAngleDeg(tackle_angle, 0.0);
  int idx1 = ang2idx(tackle_angle);       //下界
  int idx2 = ang2idx(tackle_angle + 1.0); //上界
  double rate = MinMax(0.0, idx2 - tackle_angle, 1.0);

  return mBallVelAfterTackle[idx1] * rate +
         mBallVelAfterTackle[idx2] * (1.0 - rate);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
callq 0x40e8c
leaq -0x30(%rbp), %r14
andq $0x0, (%r14)
movsd -0x28(%rbp), %xmm0
movq %r14, %rdi
callq 0xd305
leaq -0x38(%rbp), %r15
movsd %xmm0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41902
movl %eax, %r12d
movsd (%r15), %xmm0
addsd 0x15de5(%rip), %xmm0    # 0x57048
movsd %xmm0, (%r14)
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x41902
cvtsi2sd %eax, %xmm0
subsd (%r15), %xmm0
xorpd %xmm1, %xmm1
maxsd %xmm1, %xmm0
movsd 0x15dbb(%rip), %xmm1    # 0x57048
movapd %xmm1, %xmm3
minsd %xmm0, %xmm3
movslq %r12d, %rcx
shlq $0x4, %rcx
movsd 0xb58(%rbx,%rcx), %xmm2
mulsd %xmm3, %xmm2
subsd %xmm3, %xmm1
mulsd 0xb60(%rbx,%rcx), %xmm3
cltq
shlq $0x4, %rax
movsd 0xb58(%rbx,%rax), %xmm0
mulsd %xmm1, %xmm0
mulsd 0xb60(%rbx,%rax), %xmm1
addsd %xmm2, %xmm0
addsd %xmm3, %xmm1
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Thread.cpp
// Function: ThreadCondition::Wait(int)
bool ThreadCondition::Wait(int ms) {
  while (pthread_mutex_lock(&mMutex)) {
  }

  int ret = ETIMEDOUT;
  if (ms > 0) {
    timespec timeout;
    RealTime outtime = GetRealTime();
    outtime = outtime + ms;
    timeout.tv_sec = outtime.GetSec();
    timeout.tv_nsec = outtime.GetUsec() * 1000;
    while ((ret = pthread_cond_timedwait(&mCond, &mMutex, &timeout)) == EINTR) {
    }
  } else {
    ret = pthread_cond_wait(&mCond, &mMutex);
  }

  while (pthread_mutex_unlock(&mMutex)) {
  }
  return (ret == ETIMEDOUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %esi, %r15d
movq %rdi, %r14
leaq 0x30(%rdi), %rbx
movq %rbx, %rdi
callq 0x9710
testl %eax, %eax
jne 0x41f91
testl %r15d, %r15d
jle 0x41ff1
callq 0x47448
leaq -0x30(%rbp), %r12
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
movq %r12, %rdi
movl %r15d, %esi
callq 0x4759a
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
leaq -0x40(%rbp), %r12
movq %rax, (%r12)
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
movq %rax, 0x8(%r12)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x9760
cmpl $0x4, %eax
je 0x41fdc
jmp 0x41ffc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9780
movl %eax, %r15d
movq %rbx, %rdi
callq 0x93a0
testl %eax, %eax
jne 0x41fff
cmpl $0x6e, %r15d
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/TimeTest.cpp
// Function: TimeTest::TimeTest()
TimeTest::TimeTest() {
  mEventQueue.clear();
  mRecordQueue.clear();
  mIsExecute.clear();
  mIsBegin.clear();

  mUpdateTime = Time(-3, 0);
  mUnum = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x40(%rdi)
andl $0x0, 0x48(%rdi)
andq $0x0, 0x68(%rdi)
andl $0x0, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x2c(%rdi)
andl $0x0, 0x60(%rdi)
movups %xmm0, 0x50(%rdi)
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
movq %r14, 0x80(%rdi)
callq 0x21ad6
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x4213b
movq %rax, 0x20(%rbx)
movq 0x30(%rbx), %rax
movq 0x58(%rbx), %rcx
movq %rax, 0x40(%rbx)
andl $0x0, 0x48(%rbx)
movq %rcx, 0x68(%rbx)
andl $0x0, 0x70(%rbx)
movq %r14, 0x80(%rbx)
andl $0x0, 0x88(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/TimeTest.cpp
// Function: TimeTest::Update(Time)
void TimeTest::Update(Time current_time) {
  if (PlayerParam::instance().TimeTest()) {
    if (mUpdateTime == current_time) {
      return;
    }

    long last_num = 0;
    double last_ave_cost = 0;
    long cycle_time_cost = 0;
    for (unsigned i = 0; i < mEventQueue.size(); ++i) {
      if (mIsExecute[i] == false) {
        continue;
      }

      last_num = mRecordQueue[i].mEachCycle.mNum;
      last_ave_cost = mRecordQueue[i].mEachCycle.mAveCost;
      cycle_time_cost = mRecordQueue[i].mCycleTimeCost;

      if (cycle_time_cost > mRecordQueue[i].mEachCycle.mMaxCost) {
        mRecordQueue[i].mEachCycle.mMaxCost = cycle_time_cost;
        mRecordQueue[i].mEachCycle.mMaxTime = mUpdateTime;
      }
      if (cycle_time_cost < mRecordQueue[i].mEachCycle.mMinCost) {
        mRecordQueue[i].mEachCycle.mMinCost = cycle_time_cost;
        mRecordQueue[i].mEachCycle.mMinTime = mUpdateTime;
      }

      mRecordQueue[i].mEachCycle.mAveCost =
          (last_ave_cost * last_num + cycle_time_cost) / (last_num + 1);
      ++mRecordQueue[i].mEachCycle.mNum;
      mRecordQueue[i].mCycleTimeCost = 0;
      mIsExecute[i] = false;
    }

    mUpdateTime = current_time;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x38d94
cmpb $0x1, 0x5c48(%rax)
jne 0x426c5
movq %rbx, %rax
shrq $0x20, %rax
cmpl %eax, 0x84(%r14)
jne 0x425f0
cmpl %ebx, 0x80(%r14)
je 0x426c5
leaq 0x30(%r14), %r15
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x426be
movq %r15, %rdi
movq %r12, %rsi
callq 0x429d4
testq %rdx, (%rax)
je 0x426b6
movq 0x18(%r14), %rdi
imulq $0x78, %r12, %rax
movq 0x70(%rdi,%rax), %rdx
movq %rdi, %rcx
cmpq 0x18(%rdi,%rax), %rdx
jle 0x42650
leaq (%rdi,%rax), %rcx
movq %rdx, 0x18(%rcx)
movq 0x80(%r14), %rsi
movq %rsi, 0x10(%rcx)
movq 0x18(%r14), %rcx
movq (%rdi,%rax), %rsi
movsd 0x8(%rdi,%rax), %xmm0
cmpq 0x28(%rcx,%rax), %rdx
jge 0x42677
addq %rax, %rcx
movq %rdx, 0x28(%rcx)
movq 0x80(%r14), %rdi
movq %rdi, 0x20(%rcx)
movq 0x18(%r14), %rcx
cvtsi2sd %rsi, %xmm1
mulsd %xmm1, %xmm0
cvtsi2sd %rdx, %xmm1
addsd %xmm0, %xmm1
incq %rsi
cvtsi2sd %rsi, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rcx,%rax)
incq (%rcx,%rax)
andq $0x0, 0x70(%rcx,%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x429d4
notq %rdx
andq %rdx, (%rax)
incl %r12d
jmp 0x425f7
movq %rbx, 0x80(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/TimeTest.cpp
// Function: TimeTest::Begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int TimeTest::Begin(std::string func_name) {
  int i = 0;
  if (PlayerParam::instance().TimeTest()) {
    for (; i < (int)mEventQueue.size(); ++i) {
      if (mEventQueue[i] == func_name) {
        break;
      }
    }

    if (i == (int)mEventQueue.size()) {
      TimeRecord time_record;
      mEventQueue.push_back(func_name);
      mRecordQueue.push_back(time_record);
      mIsExecute.push_back(false);
      mIsBegin.push_back(true);
      mRecordQueue[i].mBeginTime = GetRealTime();
    } else if (mIsBegin[i] == false) {
      mIsBegin[i] = true;
      mRecordQueue[i].mBeginTime = GetRealTime();
    } else {
      i = -1;
    }
  }
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %r14
callq 0x38d94
xorl %ebx, %ebx
cmpb $0x1, 0x5c48(%rax)
jne 0x42808
pushq $0x68
popq %r13
xorl %r12d, %r12d
xorl %ebx, %ebx
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
movq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rbx
jge 0x4273e
addq %r12, %rdi
movq %r15, %rsi
callq 0x2e063
testb %al, %al
jne 0x42737
incq %rbx
addq $0x78, %r13
addq $0x20, %r12
jmp 0x42702
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x5, %rax
cmpl %ebx, %eax
jne 0x427cf
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r12
movaps %xmm0, (%r12)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x10(%r12)
andq $0x0, 0x18(%r12)
movq %rax, 0x20(%r12)
movl $0xf4240, %ecx          # imm = 0xF4240
movq %rcx, 0x28(%r12)
movaps %xmm0, 0x30(%r12)
movq %rax, 0x40(%r12)
andq $0x0, 0x48(%r12)
movq %rax, 0x50(%r12)
movq %rcx, 0x58(%r12)
movaps %xmm0, 0x60(%r12)
andq $0x0, 0x70(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x21ae4
leaq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0x42a18
leaq 0x30(%r14), %rdi
xorl %esi, %esi
callq 0x42a50
leaq 0x58(%r14), %rdi
pushq $0x1
popq %rsi
callq 0x42a50
jmp 0x427f6
leaq 0x58(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x429d4
testq %rdx, (%rax)
je 0x427e8
pushq $-0x1
popq %rbx
jmp 0x42808
movq %r15, %rdi
movq %rbx, %rsi
callq 0x429d4
orq %rdx, (%rax)
callq 0x47448
movq 0x18(%r14), %rcx
movq %rax, -0x8(%rcx,%r13)
movq %rdx, (%rcx,%r13)
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/TimeTest.cpp
// Function: TimeTest::End(int)
void TimeTest::End(int event_id) {
  if (PlayerParam::instance().TimeTest()) {
    RealTime end_time = GetRealTime();
    long cost_time = end_time.Sub(mRecordQueue[event_id].mBeginTime);
    long last_num = mRecordQueue[event_id].mEachTime.mNum;
    double last_ave_cost = mRecordQueue[event_id].mEachTime.mAveCost;
    if (cost_time > mRecordQueue[event_id].mEachTime.mMaxCost) {
      mRecordQueue[event_id].mEachTime.mMaxCost = cost_time;
      mRecordQueue[event_id].mEachTime.mMaxTime = mUpdateTime;
    }
    if (cost_time < mRecordQueue[event_id].mEachTime.mMinCost) {
      mRecordQueue[event_id].mEachTime.mMinCost = cost_time;
      mRecordQueue[event_id].mEachTime.mMinTime = mUpdateTime;
    }

    mRecordQueue[event_id].mEachTime.mAveCost =
        (last_ave_cost * last_num + cost_time) / (last_num + 1);
    ++mRecordQueue[event_id].mEachTime.mNum;
    mRecordQueue[event_id].mCycleTimeCost += cost_time;
    mIsExecute[event_id] = true;
    mIsBegin[event_id] = false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x38d94
cmpb $0x1, 0x5c48(%rax)
jne 0x42908
callq 0x47448
leaq -0x28(%rbp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
movslq %r14d, %r14
movq 0x18(%rbx), %rax
imulq $0x78, %r14, %r15
leaq (%rax,%r15), %rsi
addq $0x60, %rsi
callq 0x47628
movq 0x18(%rbx), %rsi
movq %rsi, %rcx
cmpq 0x48(%rsi,%r15), %rax
jle 0x4288c
leaq (%rsi,%r15), %rcx
movq %rax, 0x48(%rcx)
movq 0x80(%rbx), %rdx
movq %rdx, 0x40(%rcx)
movq 0x18(%rbx), %rcx
movq 0x30(%rsi,%r15), %rdx
movsd 0x38(%rsi,%r15), %xmm0
cmpq 0x58(%rcx,%r15), %rax
jge 0x428b5
addq %r15, %rcx
movq %rax, 0x58(%rcx)
movq 0x80(%rbx), %rsi
movq %rsi, 0x50(%rcx)
movq 0x18(%rbx), %rcx
cvtsi2sd %rdx, %xmm1
mulsd %xmm1, %xmm0
cvtsi2sd %rax, %xmm1
addsd %xmm0, %xmm1
incq %rdx
cvtsi2sd %rdx, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rcx,%r15)
incq 0x30(%rcx,%r15)
addq %rax, 0x70(%rcx,%r15)
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x429d4
orq %rdx, (%rax)
addq $0x58, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x429d4
notq %rdx
andq %rdx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::PlayerState::PlayerState(int, Vector, Vector, double, int)
Trainer::PlayerState::PlayerState(Unum num, Vector pos, Vector vel,
                                  AngleDeg dir, int type) {
  mUnum = num;
  mPos = pos;
  mVel = vel;
  mBodyDir = dir;
  mPlayerType = type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
movsd %xmm0, 0x8(%rdi)
movsd %xmm1, 0x10(%rdi)
movsd %xmm2, 0x18(%rdi)
movsd %xmm3, 0x20(%rdi)
movsd %xmm4, 0x28(%rdi)
movl %edx, 0x30(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::Trainer()
Trainer::Trainer() {
  mTrainTime = 0;
  mTrainCount = 0;
  mInitialized = false;
  mConverse = false;
  mPrepared = false;
  mHaveRcg = 0;
  mpEndCondition = new Trainer::Condition(this, ET_Null, 0, 0, 0x0, mConverse);
  mLastStopTime = 0;
  mpObserver->SetSelfUnum(TRAINER_UNUM);
  mInitialTime = 0;
  mPlayerStatesList.clear();
  mBallStateList.clear();
  mNeedOpponentList.clear();
  if (!PlayerParam::instance().ForcePenaltyMode()) {
    ReadConfigFile();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1797c
leaq 0x33af7(%rip), %rax     # 0x76c90
movq %rax, (%rbx)
leaq 0x120(%rbx), %r14
xorps %xmm0, %xmm0
andq $0x0, 0x130(%rbx)
movups %xmm0, 0x120(%rbx)
andq $0x0, 0x150(%rbx)
movups %xmm0, 0x140(%rbx)
andq $0x0, 0x98(%rbx)
leaq 0x140(%rbx), %r15
andl $0x0, 0x30(%rbx)
leaq 0x160(%rbx), %r12
movups %xmm0, 0x160(%rbx)
movups %xmm0, 0x170(%rbx)
movups %xmm0, 0x180(%rbx)
pushq $0x58
popq %rdi
callq 0x94d0
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movq %rbx, 0x38(%rax)
andl $0x0, (%rax)
movabsq $0x177000000000, %rcx   # imm = 0x177000000000
movq %rcx, 0x40(%rax)
movups %xmm0, 0x8(%rax)
andq $0x0, 0x48(%rax)
andq $0x0, 0x4d(%rax)
movq %rax, 0x158(%rbx)
andl $0x0, 0x194(%rbx)
movq 0x8(%rbx), %rax
movl $0xc, 0x2c(%rax)
andl $0x0, 0x138(%rbx)
movq %r14, %rdi
callq 0x45c4c
movq 0x160(%rbx), %rax
cmpq %rax, 0x168(%rbx)
je 0x43268
movq %rax, 0x168(%rbx)
movq 0x140(%rbx), %rax
cmpq %rax, 0x148(%rbx)
je 0x4327f
movq %rax, 0x148(%rbx)
callq 0x38d94
cmpb $0x0, 0x5c41(%rax)
jne 0x43295
movq %rbx, %rdi
callq 0x432dc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0x178(%rbx), %rdi
callq 0x46526
movq %r12, %rdi
callq 0x464e8
movq %r15, %rdi
callq 0x13008
movq %r14, %rdi
callq 0x45c5a
movq %rbx, %rdi
callq 0x17ac0
movq %r13, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::Record()
void Trainer::Record() {
  //记录统计信息
  ofstream os;
  os.open("./train/train.report");
  if (mConverse)
    os << "Converse Train!!" << endl;
  os << "Total Train Count:" << mTrainCount << endl;
  mpEndCondition->Report(os);
  os.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
leaq -0x210(%rbp), %r14
movq %r14, %rdi
callq 0x9880
leaq 0x17bcf(%rip), %rsi     # 0x5b174
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x9080
cmpb $0x1, 0x33(%rbx)
jne 0x435d1
leaq 0x17bcc(%rip), %rsi     # 0x5b189
leaq -0x210(%rbp), %rdi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
leaq 0x17bc2(%rip), %rsi     # 0x5b19a
leaq -0x210(%rbp), %rdi
callq 0x94b0
movl 0x9c(%rbx), %esi
movq %rax, %rdi
callq 0x9330
movq %rax, %rdi
callq 0x99e8
movq 0x158(%rbx), %rdi
leaq -0x210(%rbp), %rsi
callq 0x45920
leaq -0x210(%rbp), %rdi
callq 0x96e0
leaq -0x210(%rbp), %rdi
callq 0x9720
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x9720
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::SendOptionToServer()
void Trainer::SendOptionToServer() {
  while (!mpParser->IsEyeOnOk()) {
    UDPSocket::instance().Send("(eye on)");
    WaitFor(200);
  }

  while (!mpParser->IsEarOnOk()) {
    cout << "Send (ear on)" << endl;
    UDPSocket::instance().Send("(ear on)");
    WaitFor(200);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x149f9(%rip), %r14     # 0x58078
movq 0x20(%rbx), %rdi
callq 0x1839c
testb %al, %al
jne 0x436a8
callq 0x471ac
movq %rax, %rdi
movq %r14, %rsi
callq 0x473e8
movl $0x30d40, %edi          # imm = 0x30D40
callq 0x96b0
jmp 0x4367f
movq 0x33911(%rip), %r14     # 0x76fc0
leaq 0x176f6(%rip), %r15     # 0x5adac
leaq 0x176f4(%rip), %r12     # 0x5adb1
movq 0x20(%rbx), %rdi
callq 0x45c86
testb %al, %al
jne 0x436f9
movq %r14, %rdi
movq %r15, %rsi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
callq 0x471ac
movq %rax, %rdi
movq %r12, %rsi
callq 0x473e8
movl $0x30d40, %edi          # imm = 0x30D40
callq 0x96b0
jmp 0x436bd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::Run()
void Trainer::Run() {
  // TIMETEST("coach_run");

  mpObserver->Lock();

  /** 下面几个更新顺序不能变 */
  mpAgent->CheckCommands(mpObserver); // 检查上周期发送命令情况
  mpWorldModel->Update(mpObserver);

  mpObserver->UnLock();

  DoDecisionMaking();

  Logger::instance().LogSight();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x3548, %r14d          # imm = 0x3548
movq 0x8(%rdi), %rdi
addq %r14, %rdi
callq 0x4206e
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
callq 0x17f12
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
callq 0x4c538
addq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x4208a
movq %rbx, %rdi
callq 0x4375e
callq 0x2ca2e
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2cdf0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::DoDecisionMaking()
void Trainer::DoDecisionMaking() {
  switch (mpAgent->World().GetPlayMode()) {
  case PM_Our_Penalty:
  case PM_Opp_Penalty:
  case PM_Penalty_On_Our_Field:
  case PM_Penalty_On_Opp_Field:
  case PM_Our_Penalty_Setup:
  case PM_Our_Penalty_Ready:
  case PM_Our_Penalty_Taken:
  case PM_Our_Penalty_Score:
  case PM_Our_Penalty_Miss:
  case PM_Our_Penalty_Foul:
  case PM_Our_Penalty_Winner:
  case PM_Opp_Penalty_Setup:
  case PM_Opp_Penalty_Ready:
  case PM_Opp_Penalty_Taken:
  case PM_Opp_Penalty_Score:
  case PM_Opp_Penalty_Miss:
  case PM_Opp_Penalty_Foul:
  case PM_Opp_Penalty_Winner:
    return;
  default:
    break;
  }

  if (PlayerParam::instance()
          .ForcePenaltyMode()) //普通比赛，临近结束时强制进行点球
  {
    if (mpAgent->World().GetPlayMode() == PM_Before_Kick_Off &&
        mpAgent->World().GetLastPlayMode() == PM_Play_On)
      mPrepared = false;

    if (mpAgent->World().GetTeammateScore() !=
            mpAgent->World().GetOpponentScore() &&
        !mPrepared)

      mpAgent->World().GetTeammateScore() < mpAgent->World().GetOpponentScore()
          ? Score(true)
          : Score(false);
  } else if (CheckOpponent()) {
    if (!mInitialized) {
      InitializeStadium();
    }
    if (mpEndCondition->CheckState(mpAgent->World()) ||
        mpAgent->World().GetPlayMode() == PM_Before_Kick_Off) {
      mPrepared = false;
    }
    if (!mPrepared && mInitialized) {
      PrepareForTrain();
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %eax
cmpq $0x37, %rax
ja 0x4378f
movabsq $0xfe0000079fc000, %rcx # imm = 0xFE0000079FC000
btq %rax, %rcx
jae 0x4378f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x38d94
cmpb $0x1, 0x5c41(%rax)
jne 0x437d7
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
cmpl $0x16, 0x1c(%rax)
jne 0x437b5
cmpl $0x1, 0x20(%rax)
jne 0x437b5
movb $0x0, 0x31(%rbx)
movl 0x2118(%rax), %ecx
movl 0x211c(%rax), %eax
cmpl %eax, %ecx
je 0x43788
cmpb $0x0, 0x31(%rbx)
jne 0x43788
cmpl %eax, %ecx
jge 0x43833
pushq $0x1
popq %rsi
movq %rbx, %rdi
jmp 0x43838
movq %rbx, %rdi
callq 0x43928
testb %al, %al
je 0x43788
cmpb $0x0, 0x30(%rbx)
jne 0x437f1
movq %rbx, %rdi
callq 0x43970
movq 0x18(%rbx), %rax
movq 0x158(%rbx), %rdi
movq 0x18(%rax), %rsi
callq 0x43a12
testb %al, %al
jne 0x43817
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
cmpl $0x16, 0x1c(%rax)
jne 0x43843
movb $0x0, 0x31(%rbx)
cmpb $0x1, 0x30(%rbx)
jne 0x43788
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43e9c
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43850
testb $0x1, 0x31(%rbx)
jne 0x43788
jmp 0x4381b
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::Score(bool)
void Trainer::Score(bool isLeft) {
  if (mpAgent->World().GetPlayMode() != PM_Play_On) {
    ChangePlayMode(PM_Play_On);
  }
  Vector tmp = FindValidPoint(isLeft) - mpAgent->World().Ball().GetVel();
  if (isLeft) {
    tmp.SetX(Min(tmp.X(), ServerParam::instance().PITCH_LENGTH / 2 - 3.1));
  } else {
    tmp.SetX(Max(tmp.X(), -ServerParam::instance().PITCH_LENGTH / 2 + 3.1));
  }
  MoveBall(tmp, Vector(isLeft ? ServerParam::instance().ballSpeedMax()
                              : -ServerParam::instance().ballSpeedMax(),
                       0));
  mPrepared = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
cmpl $0x1, 0x1c(%rax)
je 0x4387a
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x44230
movzbl %r14b, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x45abc
movsd %xmm1, -0x30(%rbp)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
subsd 0x60(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x68(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x3db2c
leaq 0x16612(%rip), %rax     # 0x59ec8
movsd (%rax), %xmm0
mulsd 0x13f86(%rip), %xmm0    # 0x57848
movsd %xmm0, -0x20(%rbp)
callq 0x3db2c
movsd 0x30f8(%rax), %xmm2
testb %r14b, %r14b
je 0x438ed
movsd -0x20(%rbp), %xmm0
addsd 0x1733a(%rip), %xmm0    # 0x5ac20
minsd -0x18(%rbp), %xmm0
jmp 0x43906
movsd 0x17323(%rip), %xmm0    # 0x5ac18
subsd -0x20(%rbp), %xmm0
maxsd -0x18(%rbp), %xmm0
xorps 0x1371a(%rip), %xmm2    # 0x57020
movsd -0x30(%rbp), %xmm1
subsd -0x28(%rbp), %xmm1
xorps %xmm3, %xmm3
movq %rbx, %rdi
callq 0x44546
movb $0x1, 0x31(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::CheckOpponent() const
bool Trainer::CheckOpponent() const {
  WorldState &world = mpAgent->World();
  if (world.CurrentTime().T() > 1) {
    return true; //已经开场之后，如果有人不齐的话，估计就是死了……
  }
  for (std::vector<Unum>::const_iterator it = mNeedOpponentList.begin();
       it != mNeedOpponentList.end(); it++) {
    if (!world.GetOpponent(*it).IsAlive())
      return false;
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rcx
movb $0x1, %al
cmpl $0x1, 0x10(%rcx)
jg 0x4396e
movq 0x140(%rdi), %rdx
movq 0x148(%rdi), %rsi
addq $0x10d0, %rcx           # imm = 0x10D0
cmpq %rsi, %rdx
sete %al
je 0x4396e
movslq (%rdx), %rdi
addq $0x4, %rdx
imulq $0x178, %rdi, %rdi      # imm = 0x178
cmpb $0x0, -0x66(%rdi,%rcx)
jne 0x43951
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::InitializeStadium()
void Trainer::InitializeStadium() {
  for (std::vector<Trainer::PlayerState>::const_iterator it =
           mPlayerStatesList[0].begin();
       it != mPlayerStatesList[0].end(); it++) {
    //		ChangePlayerType(it->mUnum,
    //it->mPlayerType);让教练自己选择异构吧
  }

  for (vector<vector<Trainer::PlayerState>>::iterator it =
           mPlayerStatesList.begin();
       it != mPlayerStatesList.end(); it++) {
    for (std::vector<Trainer::PlayerState>::iterator it2 = it->begin();
         it2 != it->end(); it2++) {
      it2->mVel /=
          PlayerParam::instance().HeteroPlayer(it2->mPlayerType).playerDecay();
      it2->mPos -= it2->mVel;
    }
  }
  mInitialized = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x120(%rdi), %r14
cmpq 0x128(%rbx), %r14
je 0x43a03
movq (%r14), %r15
cmpq 0x8(%r14), %r15
je 0x439fd
callq 0x38d94
movq 0x5c38(%rax), %rax
movslq 0x30(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x18(%r15), %xmm0
divsd 0x3020(%rax,%rcx), %xmm0
movsd %xmm0, 0x18(%r15)
movsd 0x20(%r15), %xmm1
divsd 0x3020(%rax,%rcx), %xmm1
movsd %xmm1, 0x20(%r15)
movsd 0x8(%r15), %xmm2
movsd 0x10(%r15), %xmm3
subsd %xmm0, %xmm2
movsd %xmm2, 0x8(%r15)
subsd %xmm1, %xmm3
movsd %xmm3, 0x10(%r15)
addq $0x38, %r15
jmp 0x43990
addq $0x18, %r14
jmp 0x43984
movb $0x1, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::MovePlayer(int, Vector, Vector, double)
void Trainer::MovePlayer(Unum num, Vector pos, Vector vel, AngleDeg dir) {
  if (num > 0) {
    mpAgent->MovePlayer(PlayerParam::instance().teamName(), num, pos, vel, dir);
  } else {
    mpAgent->MovePlayer(PlayerParam::instance().opponentTeamName(), -num, pos,
                        vel, dir);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movsd %xmm4, -0x40(%rbp)
movsd %xmm3, -0x38(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
movl %esi, %r14d
movq 0x18(%rdi), %r15
callq 0x38d94
testl %r14d, %r14d
jle 0x444d7
addq $0x3138, %rax           # imm = 0x3138
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9680
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x38(%rbp), %xmm3
movsd -0x40(%rbp), %xmm4
callq 0x45cde
jmp 0x44516
addq $0x3160, %rax           # imm = 0x3160
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9680
negl %r14d
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x38(%rbp), %xmm3
movsd -0x40(%rbp), %xmm4
callq 0x45cde
movq %rbx, %rdi
callq 0x9240
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0x44539
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x9240
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::ChangePlayerType(int, int)
void Trainer::ChangePlayerType(Unum num, int player_type) {
  if (num > 0) {
    mpAgent->ChangePlayerType(PlayerParam::instance().teamName(), num,
                              player_type);
    mpObserver->SetTeammateType(num, player_type);
  } else {
    mpAgent->ChangePlayerType(PlayerParam::instance().opponentTeamName(), -num,
                              player_type);
    mpObserver->SetOpponentType(-num, player_type);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movq 0x18(%rdi), %r13
callq 0x38d94
testl %r14d, %r14d
jle 0x445f2
addq $0x3138, %rax           # imm = 0x3138
leaq -0x68(%rbp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x9680
movq %r13, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x45e00
leaq -0x68(%rbp), %rdi
callq 0x9240
movq 0x8(%r15), %rax
decl %r14d
leaq (%rax,%r14,4), %rax
addq $0x3c, %rax
jmp 0x44634
addq $0x3160, %rax           # imm = 0x3160
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x9680
movl %r14d, %edx
negl %edx
movq %r13, %rdi
movq %r12, %rsi
movl %ebx, %ecx
callq 0x45e00
leaq -0x48(%rbp), %rdi
callq 0x9240
movq 0x8(%r15), %rax
notl %r14d
movslq %r14d, %rcx
leaq (%rax,%rcx,4), %rax
addq $0x68, %rax
movl %ebx, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x44647
movq %rax, %rbx
movq %r12, %rdi
callq 0x9240
movq %rbx, %rdi
callq 0x98b0