LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldState::WorldState(HistoryState*)
WorldState::WorldState(HistoryState *history_state)
    : mpHistory(history_state), mCurrentTime(Time(-3, 0)),
      mPlayMode(PM_No_Mode), mPlayModeTime(Time(-3, 0)), mIsBallDropped(false),
      mTeammateGoalieUnum(0), mOpponentGoalieUnum(0), mTeammateScore(0),
      mOpponentScore(0), mIsCycleStopped(false) {
  //为各个球员分配号码
  for (Unum i = 1; i <= TEAMSIZE; i++) {
    mTeammate[i].UpdateUnum(i);
    mOpponent[i].UpdateUnum(-i);

    mPlayerList.push_back(&mTeammate[i]);
    mPlayerList.push_back(&mOpponent[i]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r13
leaq 0x2a669(%rip), %rax     # 0x76d78
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x10(%rdi)
andl $0x0, 0x1c(%rdi)
movq %rax, 0x24(%rdi)
movb $0x0, 0x2c(%rdi)
addq $0x30, %rdi
movq %rdi, -0x48(%rbp)
callq 0x3387e
leaq 0xa8(%r13), %rbx
movq %rbx, %rdi
callq 0x33afe
movq %rbx, -0x40(%rbp)
leaq 0x10d0(%r13), %r15
movq %r15, %rdi
callq 0x33afe
leaq 0x20f8(%r13), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x2111(%r13)
movups %xmm0, 0x2108(%r13)
movups %xmm0, 0x20f8(%r13)
pushq $-0x1
popq %rbx
pushq $-0xb
popq %r14
leaq -0x30(%rbp), %r13
movq %r15, -0x38(%rbp)
testq %r14, %r14
je 0x4c7d5
leaq -0x1028(%r15), %rax
leal 0xc(%r14), %ecx
movl %ecx, -0xf0c(%r15)
movl %ebx, 0x11c(%r15)
movq %rax, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5615e
movq %r15, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5615e
decl %ebx
incq %r14
addq $0x178, %r15            # imm = 0x178
jmp 0x4c78b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
jmp 0x4c804
movq %rax, %r13
jmp 0x4c80d
jmp 0x4c7f0
movq %rax, %r13
movq %r12, %rdi
callq 0x4c680
movq -0x38(%rbp), %rdi
callq 0x33b5c
movq -0x40(%rbp), %rdi
callq 0x33b5c
movq -0x48(%rbp), %rdi
callq 0xd716
movq %r13, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldState::GetHistory(int) const
WorldState *WorldState::GetHistory(int i) const {
  if (i == 0) {
    return const_cast<WorldState *>(this);
  } else if (i > HistoryState::HISTORY_SIZE) {
    return 0;
  }

  return mpHistory->GetHistory(i);
}

// Assembly:
movq %rdi, %rax
testl %esi, %esi
je 0x4c82c
cmpl $0xa, %esi
jle 0x4c82d
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rax), %rcx
movl $0xa, %edi
movl %esi, %eax
cltd
idivl %edi
movl 0x14b90(%rcx), %eax
subl %edx, %eax
addl $0xa, %eax
cltd
idivl %edi
movslq %edx, %rax
imulq $0x2128, %rax, %rax     # imm = 0x2128
addq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: HistoryState::GetHistory(int)
WorldState *HistoryState::GetHistory(int num) {
  Assert(num > 0);

  num = num % HISTORY_SIZE;
  num = (mNum + HISTORY_SIZE - num) % HISTORY_SIZE;

  return &mRecord[num];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl 0x14b90(%rdi), %eax
subl %edx, %eax
addl $0xa, %eax
cltd
idivl %ecx
movslq %edx, %rax
imulq $0x2128, %rax, %rax     # imm = 0x2128
addq %rdi, %rax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldState::GetReverseFrom(WorldState*)
void WorldState::GetReverseFrom(WorldState *world_state) {
  mCurrentTime = world_state->CurrentTime();
  mPlayMode = world_state->GetPlayMode();
  mIsCycleStopped = world_state->mIsCycleStopped;
  mPlayModeTime = world_state->mPlayModeTime;

  mTeammateGoalieUnum = world_state->mOpponentGoalieUnum;
  mOpponentGoalieUnum = world_state->mTeammateGoalieUnum;

  mTeammateScore = world_state->mOpponentScore;
  mOpponentScore = world_state->mTeammateScore;

  Ball().GetReverseFrom(world_state->Ball());

  for (Unum i = 1; i <= TEAMSIZE; ++i) {
    Opponent(i).GetReverseFrom(world_state->Teammate(i));
    Teammate(i).GetReverseFrom(world_state->Opponent(i));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movl 0x1c(%rsi), %eax
movl %eax, 0x1c(%rdi)
movb 0x2120(%rsi), %al
movb %al, 0x2120(%rdi)
movq 0x24(%rsi), %rax
movq %rax, 0x24(%rdi)
movl 0x2114(%rsi), %eax
movl %eax, 0x2110(%rdi)
movl 0x2110(%rsi), %eax
movl %eax, 0x2114(%rdi)
movl 0x211c(%rsi), %eax
movl %eax, 0x2118(%rdi)
movl 0x2118(%rsi), %eax
movl %eax, 0x211c(%rdi)
addq $0x30, %rdi
addq $0x30, %rsi
callq 0x5566c
movl $0x10d0, %eax           # imm = 0x10D0
addq %rax, %r14
addq %rax, %rbx
pushq $0xb
popq %r15
movq $-0x1028, %r12          # imm = 0xEFD8
movl $0x178, %r13d           # imm = 0x178
subq $0x1, %r15
jb 0x4c9cb
leaq (%rbx,%r12), %rsi
movq %r14, %rdi
callq 0x3a4ac
leaq (%r14,%r12), %rdi
movq %rbx, %rsi
callq 0x3a4ac
addq %r13, %r14
addq %r13, %rbx
jmp 0x4c9a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::UpdateFieldInfo()
void WorldStateUpdater::UpdateFieldInfo() {
  mpWorldState->mCurrentTime = mpObserver->CurrentTime();
  mpWorldState->mIsBallDropped = mpObserver->IsBallDropped();
  mpWorldState->mKickOffMode = mpObserver->GetKickOffMode();

  if (mpWorldState->mPlayMode != mpObserver->GetPlayMode()) {
    mpWorldState->mLastPlayMode = mpWorldState->mPlayMode;
    mpWorldState->mPlayMode = mpObserver->GetPlayMode();
    mpWorldState->mPlayModeTime = mpObserver->CurrentTime();
  }

  Formation::instance.SetOpponentGoalieUnum(
      mpObserver->OppGoalieUnum()); // 设置OpponentFormation的守门员号码
  mpWorldState->mTeammateGoalieUnum = PlayerParam::instance().ourGoalieUnum();
  mpWorldState->mOpponentGoalieUnum = mpObserver->OppGoalieUnum();

  mpWorldState->mTeammateScore = mpObserver->OurScore();
  mpWorldState->mOpponentScore = mpObserver->OppScore();

  if (mpWorldState->GetHistory(1) &&
      mpWorldState->GetHistory(1)->CurrentTime().T() ==
          mpWorldState->mCurrentTime.T()) {
    mpWorldState->mIsCycleStopped = true;
  } else {
    mpWorldState->mIsCycleStopped = false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0xc(%rax), %rax
movq %rax, 0x10(%rcx)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x118(%rax), %dl
movb %dl, 0x2c(%rcx)
movl 0x20(%rax), %edx
movl %edx, 0x18(%rcx)
movl 0x1c(%rcx), %edx
cmpl 0x1c(%rax), %edx
je 0x4dae4
movl %edx, 0x20(%rcx)
movl 0x1c(%rax), %edx
movl %edx, 0x1c(%rcx)
movq 0xc(%rax), %rax
movq %rax, 0x24(%rcx)
movq (%rbx), %rax
movl 0x30(%rax), %esi
leaq 0x30582(%rip), %rdi     # 0x7e070
callq 0x218d0
callq 0x38d94
movl 0x31a0(%rax), %eax
movq 0x8(%rbx), %rcx
movl %eax, 0x2110(%rcx)
movq (%rbx), %rax
movl 0x30(%rax), %edx
movl %edx, 0x2114(%rcx)
movl 0x34(%rax), %edx
movl %edx, 0x2118(%rcx)
movl 0x38(%rax), %eax
movl %eax, 0x211c(%rcx)
movq 0x8(%rcx), %rsi
movl 0x14b90(%rsi), %eax
addl $0x9, %eax
pushq $0xa
popq %rdi
cltd
idivl %edi
movslq %edx, %rax
imulq $0x2128, %rax, %rax     # imm = 0x2128
movl 0x10(%rsi,%rax), %eax
cmpl 0x10(%rcx), %eax
sete 0x2120(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::AutoDelay(int)
void WorldStateUpdater::AutoDelay(int delay_add) {
  // team均delay一周期
  for (Unum i = 1; i <= TEAMSIZE; i++) {
    mpWorldState->mTeammate[i].AutoUpdate(
        delay_add, PlayerParam::instance().playerConfDecay());
    mpWorldState->mOpponent[i].AutoUpdate(
        delay_add, PlayerParam::instance().playerConfDecay());
  }

  //球delay一周期
  Ball().AutoUpdate(delay_add, PlayerParam::instance().ballConfDecay());

  //特殊处理
  SelfState().UpdateBodyDir(SelfState().GetBodyDir(),
                            SelfState().GetBodyDirDelay(),
                            1.0); //认为自己的身体方向肯定是清楚的
  SelfState().UpdateVel(SelfState().GetVel(), SelfState().GetVelDelay(),
                        1.0); //认为自己的速度肯定是清楚的
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl $0xa8, %r12d
movq 0x8(%rbx), %r15
cmpq $0x10d0, %r12           # imm = 0x10D0
je 0x4dbc7
addq %r12, %r15
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r15, %rdi
movl %r14d, %esi
callq 0x55cc8
movq 0x8(%rbx), %rax
leaq (%rax,%r12), %r15
addq $0x1028, %r15           # imm = 0x1028
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r15, %rdi
movl %r14d, %esi
callq 0x55cc8
addq $0x178, %r12            # imm = 0x178
jmp 0x4db6f
addq $0x30, %r15
callq 0x38d94
movsd 0x3200(%rax), %xmm0
movq %r15, %rdi
movl %r14d, %esi
callq 0xde4c
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
movq $-0xd0, %r14
leaq (%rcx,%r14), %rdi
addq %rax, %rdi
movsd -0x20(%rax,%rcx), %xmm0
movl -0x18(%rax,%rcx), %esi
movsd 0x9436(%rip), %xmm1     # 0x57048
callq 0x382a6
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addq %rcx, %r14
addq %rax, %r14
leaq (%rax,%rcx), %rsi
addq $-0xa0, %rsi
movl 0x10(%rsi), %edx
movq %r14, %rdi
movsd 0x9403(%rip), %xmm0     # 0x57048
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdde8
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EstimateWorld(bool, int)
void WorldStateUpdater::EstimateWorld(bool is_estimate_to_now, int cycle) {
  /**预估自己的信息*/
  EstimateSelf(is_estimate_to_now, cycle);

  /**预估球的信息*/
  EstimateBall(is_estimate_to_now, cycle);

  /**预估球员的信息*/
  EstimatePlayers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x54054
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x54640
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x549a0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::UpdateSightDelay()
void WorldStateUpdater::UpdateSightDelay() {
  mSightDelay = mpObserver->CurrentTime() - mpObserver->LatestSightTime();
  mBallConf = ComputeConf(PlayerParam::instance().ballConfDecay(), mSightDelay);
  mPlayerConf =
      ComputeConf(PlayerParam::instance().playerConfDecay(), mSightDelay);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0xc(%rsi), %rdi
addq $0x14, %rsi
callq 0x4770c
movl %eax, 0x28(%rbx)
callq 0x38d94
movsd 0x3200(%rax), %xmm0
movl 0x28(%rbx), %esi
callq 0x517c2
movsd %xmm0, 0x20(%rbx)
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movl 0x28(%rbx), %esi
callq 0x517c2
movsd %xmm0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::UpdateKnownPlayers()
void WorldStateUpdater::UpdateKnownPlayers() {
  //暂时定队友的位置为最新的时间表示看到

  //更新看到的队友
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (i == mSelfUnum) {
      continue;
    }

    if (mpObserver->Teammate(i).GetDir().time() ==
        mpObserver->LatestSightTime()) {
      UpdateSpecificPlayer(mpObserver->Teammate(i), i, true);
    }
  }

  //更新看到的对手
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (mpObserver->Opponent(i).GetDir().time() ==
        mpObserver->LatestSightTime()) {
      UpdateSpecificPlayer(mpObserver->Opponent(i), i, false);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %r15
movl $0x1870, %r12d          # imm = 0x1870
pushq $0x1
popq %r14
cmpq $0xc, %r15
je 0x4ec6e
movl 0x14(%rbx), %eax
cmpq %rax, %r15
je 0x4ec62
movq (%rbx), %rsi
movl 0x1c(%rsi,%r12), %eax
cmpl 0x18(%rsi), %eax
jne 0x4ec62
movl 0x14(%rsi), %eax
cmpl %eax, 0x18(%rsi,%r12)
jne 0x4ec62
addq %r12, %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x51da4
incq %r15
addq $0xa8, %r12
jmp 0x4ec2c
movl $0x1fa8, %r15d          # imm = 0x1FA8
cmpq $0x26e0, %r15           # imm = 0x26E0
je 0x4ecb0
movq (%rbx), %rsi
movl 0x1c(%rsi,%r15), %eax
cmpl 0x18(%rsi), %eax
jne 0x4eca4
movl 0x14(%rsi), %eax
cmpl %eax, 0x18(%rsi,%r15)
jne 0x4eca4
addq %r15, %rsi
movq %rbx, %rdi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x51da4
addq $0xa8, %r15
incl %r14d
jmp 0x4ec74
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EstimateToNow()
void WorldStateUpdater::EstimateToNow() {
  if (mSightDelay > 0 && mSightDelay <= HistoryState::HISTORY_SIZE) {
    //保存与sense相关的信息 主要有 mSelfVel mNeckDir
    const Vector &vel = SelfState().GetVel();

    SelfState().UpdateVel(
        mpWorldState->GetHistory(mSightDelay)->mTeammate[mSelfUnum].GetVel());
    int cycle = mSightDelay;
    for (int i = 0; i < cycle; i++) {
      EstimateWorld(true, cycle - i);
    }

    //恢复现场 此时应该看见了 delay可设置为0
    SelfState().UpdateVel(vel);
  }
}

// Assembly:
movl 0x28(%rdi), %esi
leal -0x1(%rsi), %eax
cmpl $0x9, %eax
ja 0x50785
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rdi
imulq $0x178, %rax, %r15      # imm = 0x178
leaq (%rdi,%r15), %r14
addq $-0xd0, %r14
callq 0x4c81e
leaq (%rax,%r15), %rsi
addq $-0xa0, %rsi
xorl %r13d, %r13d
movsd 0x68f5(%rip), %xmm0     # 0x57048
movq %r14, %rdi
xorl %edx, %edx
callq 0xdde8
movl 0x28(%rbx), %r15d
testl %r15d, %r15d
cmovgl %r15d, %r13d
pushq $0x1
popq %r12
subl $0x1, %r13d
jb 0x50786
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x4e6e6
decl %r15d
jmp 0x5076c
retq
addq $0x30, %r14
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
movsd 0x689c(%rip), %xmm0     # 0x57048
movq %r14, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdde8
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EvaluateConf()
void WorldStateUpdater::EvaluateConf() {
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (i != mSelfUnum) {
      EvaluatePlayer(Teammate(i));
    }

    EvaluatePlayer(Opponent(i));
  }

  //根据delay置球员生死
  int dead_level = 100;
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (i != mSelfUnum && GetTeammate(i).IsAlive()) {
      if (GetTeammate(i).GetPosDelay() > dead_level) {
        Teammate(i).SetIsAlive(false);
      }
    }

    if (GetOpponent(i).IsAlive()) {
      if (GetOpponent(i).GetPosDelay() > dead_level) {
        Opponent(i).SetIsAlive(false);
      }
    }
  }

  // evaluate ball
  EvaluateBall();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
movl $0xa8, %r15d
xorl %r13d, %r13d
cmpq $0xb, %r13
je 0x50ffb
leaq 0x1(%r13), %r12
movl 0x14(%rbx), %eax
cmpq %rax, %r12
je 0x50fcd
leaq -0x1(%r14), %r13
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x54bde
movq 0x8(%rbx), %rax
imulq $0x178, %r13, %rcx      # imm = 0x178
leaq (%rax,%rcx), %rsi
addq $0x10d0, %rsi           # imm = 0x10D0
movq %rbx, %rdi
callq 0x54bde
incq %r14
movl $0x178, %eax            # imm = 0x178
addq %rax, %r15
movq %r12, %r13
jmp 0x50fa8
pushq $0x1
popq %r14
movl $0x1ba, %r15d           # imm = 0x1BA
xorl %r13d, %r13d
cmpq $0xb, %r13
je 0x51082
leaq 0x1(%r13), %r12
movl 0x14(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpq %rcx, %r12
je 0x5104a
leaq -0x1(%r14), %r13
cmpb $0x1, (%rax,%r15)
jne 0x5104a
cmpl $0x65, -0xfa(%rax,%r15)
jl 0x5104a
leaq (%rax,%r15), %rdi
addq $-0x112, %rdi           # imm = 0xFEEE
xorl %esi, %esi
callq 0x381ec
movq 0x8(%rbx), %rax
imulq $0x178, %r13, %rcx      # imm = 0x178
cmpb $0x1, 0x11e2(%rax,%rcx)
jne 0x51073
leaq (%rax,%rcx), %rdi
addq $0x10d0, %rdi           # imm = 0x10D0
cmpl $0x65, 0x18(%rdi)
jl 0x51073
xorl %esi, %esi
callq 0x381ec
incq %r14
addq $0x178, %r15            # imm = 0x178
movq %r12, %r13
jmp 0x51008
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x54d34
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::ComputeConf(double, int)
double WorldStateUpdater::ComputeConf(double decay, int cycle) {
  if (cycle <= 0) {
    return 1;
  }

  double sum = 1;
  for (int i = 0; i < cycle; i++) {
    sum *= decay;
  }
  return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0x517e1
movapd %xmm0, %xmm1
movsd 0x5872(%rip), %xmm0     # 0x57048
subl $0x1, %esi
jb 0x517e9
mulsd %xmm1, %xmm0
jmp 0x517d6
movsd 0x585f(%rip), %xmm0     # 0x57048
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::ComputeSelfDir(double&)
bool WorldStateUpdater::ComputeSelfDir(double &angle) {
  //计算可以看到的线，如果有两个则表示在球场外
  int sample_line = SL_NONE; // mark
  int num = 0;
  double min = 10000; //初始值
  for (int i = 0; i < SL_MAX; i++) {
    if (mpObserver->SideLine((SideLineType)i).GetDir().time() ==
        mpObserver->LatestSightTime()) {
      //必须使用最近的一条线
      if (mpObserver->SideLine((SideLineType)i).Dist() < min) {
        sample_line = i;
        min = mpObserver->SideLine((SideLineType)i).Dist();
      }
      num++;
    }
  }

  //看不到
  if (num == 0) {
    return false;
  }

  //计算公式见USTC_Material 第七章

  // lineRelativeAngle = (line_dir < 0 ) ? (90 + line_dir ) : (line_dir – 90)
  angle = mpObserver->SideLine((SideLineType)sample_line).Dir();

  angle = angle < 0 ? 90 + angle : angle - 90;

  // neckGlobalAngle = lineGlobalAngle – lineRelativeAngle
  angle =
      (mpObserver->SideLine((SideLineType)sample_line)).GlobalPosition().Dir() -
      angle;

  //如果同时看到两条线就表示在场外 加上180
  //具体可参加源码MemPosition.c的Update_self_seen函数处理
  if (num >= 2) {
    angle = 180 + angle;
  }

  //保证角度在180 到 -180 之间
  if (angle > 180) {
    angle -= 360;
  } else if (angle < -180) {
    angle += 360;
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rcx
leaq 0x26e0(%rcx), %rax
movl 0x14(%rcx), %edx
movl 0x18(%rcx), %edi
addq $0x26fc, %rcx           # imm = 0x26FC
movsd 0x9ba7(%rip), %xmm0     # 0x5b700
xorl %r8d, %r8d
pushq $0x5
popq %rsi
xorl %r14d, %r14d
cmpq $0x4, %r8
je 0x51b92
cmpl %edi, (%rcx)
jne 0x51b89
cmpl %edx, -0x4(%rcx)
jne 0x51b89
movsd -0x1c(%rcx), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %esi
minsd %xmm0, %xmm1
incl %r14d
movapd %xmm1, %xmm0
incq %r8
addq $0x58, %rcx
jmp 0x51b62
testl %r14d, %r14d
je 0x51c14
movl %esi, %ecx
imulq $0x58, %rcx, %rcx
leaq (%rax,%rcx), %rdi
addq $0x40, %rdi
movsd -0x30(%rdi), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x9b72(%rip), %rcx      # 0x5b730
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rbx)
callq 0xcd30
subsd (%rbx), %xmm0
movsd 0x5490(%rip), %xmm1     # 0x57068
cmpl $0x2, %r14d
jl 0x51be2
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
ucomisd %xmm1, %xmm0
jbe 0x51bf6
movsd 0x54ac(%rip), %xmm1     # 0x570a0
jmp 0x51c0c
movsd 0x5482(%rip), %xmm1     # 0x57080
ucomisd %xmm0, %xmm1
jbe 0x51c14
movsd 0x548c(%rip), %xmm1     # 0x57098
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
testl %r14d, %r14d
setne %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: (anonymous namespace)::LimitToField(Vector)
Vector LimitToField(Vector pos) {
  if (pos.X() > ServerParam::instance().PITCH_LENGTH / 2) {
    pos.SetX(ServerParam::instance().PITCH_LENGTH / 2);
  } else if (pos.X() < -ServerParam::instance().PITCH_LENGTH / 2) {
    pos.SetX(-ServerParam::instance().PITCH_LENGTH / 2);
  }

  if (pos.Y() > ServerParam::instance().PITCH_WIDTH / 2) {
    pos.SetY(ServerParam::instance().PITCH_WIDTH / 2);
  } else if (pos.Y() < -ServerParam::instance().PITCH_WIDTH / 2) {
    pos.SetY(-ServerParam::instance().PITCH_WIDTH / 2);
  }

  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm1, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
callq 0x3db2c
leaq 0x6fc7(%rip), %rax      # 0x59ec8
movsd (%rax), %xmm0
movsd 0x493b(%rip), %xmm1     # 0x57848
movsd %xmm0, -0x8(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x10(%rbp)
callq 0x3db2c
movsd -0x18(%rbp), %xmm1
ucomisd -0x10(%rbp), %xmm1
ja 0x52f58
movsd -0x8(%rbp), %xmm0
mulsd 0x4127(%rip), %xmm0     # 0x57060
movsd %xmm0, -0x8(%rbp)
ucomisd %xmm1, %xmm0
movsd %xmm1, -0x10(%rbp)
jbe 0x52f58
callq 0x3db2c
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
leaq 0x6f6c(%rip), %rax      # 0x59ed0
movsd (%rax), %xmm0
movsd 0x48d8(%rip), %xmm1     # 0x57848
movsd %xmm0, -0x8(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
callq 0x3db2c
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x52fb9
movsd -0x8(%rbp), %xmm1
mulsd 0x40c0(%rip), %xmm1     # 0x57060
movsd %xmm1, -0x8(%rbp)
ucomisd %xmm0, %xmm1
movapd %xmm0, %xmm1
jbe 0x52fb9
callq 0x3db2c
movsd -0x8(%rbp), %xmm1
movsd -0x10(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::GetSeenClosestTeammate()
Unum WorldStateUpdater::GetSeenClosestTeammate() {
  Unum num = 0;
  double min = 20000;
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (i != mSelfUnum) {
      if (mpObserver->Teammate(i).GetDist().time() ==
          mpObserver->CurrentTime()) {
        if (mpObserver->Teammate(i).Dist() < min) {
          min = mpObserver->Teammate(i).Dist();
          num = i;
        }
      }
    }
  }

  return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x14(%rdi), %ecx
movq (%rdi), %rdx
leaq 0x187c(%rdx), %rsi
movsd 0x873b(%rip), %xmm0     # 0x5b718
xorl %eax, %eax
movabsq $0x1, %rdi
cmpq $0xc, %rdi
je 0x53026
cmpq %rdi, %rcx
jne 0x53000
incq %rdi
addq $0xa8, %rsi
jmp 0x52fe9
movl (%rsi), %r8d
cmpl 0x10(%rdx), %r8d
jne 0x52ff4
movl 0xc(%rdx), %r8d
cmpl %r8d, -0x4(%rsi)
jne 0x52ff4
movsd -0xc(%rsi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x52ff4
movl %edi, %eax
movapd %xmm1, %xmm0
jmp 0x52ff4
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::GetSeenClosestOpponent()
Unum WorldStateUpdater::GetSeenClosestOpponent() {
  Unum num = 0;
  double min = 20000;
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (mpObserver->Opponent(i).GetDist().time() == mpObserver->CurrentTime()) {
      if (mpObserver->Opponent(i).Dist() < min) {
        min = mpObserver->Opponent(i).Dist();
        num = i;
      }
    }
  }

  return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movl 0xc(%rcx), %edx
movl 0x10(%rcx), %esi
movsd 0x86db(%rip), %xmm0     # 0x5b718
xorl %edi, %edi
movl $0x1, %r8d
xorl %eax, %eax
cmpq $0x738, %rdi            # imm = 0x738
je 0x53084
cmpl %esi, 0x1fb4(%rcx,%rdi)
jne 0x53078
cmpl %edx, 0x1fb0(%rcx,%rdi)
jne 0x53078
movsd 0x1fa8(%rcx,%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x53078
movl %r8d, %eax
movapd %xmm1, %xmm0
addq $0xa8, %rdi
incl %r8d
jmp 0x53047
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::ComputePlayerMaxDist(PlayerState const&)
double WorldStateUpdater::ComputePlayerMaxDist(const PlayerState &state) {
  //计算最大的速度
  double max_speed = PlayerParam::instance()
                         .HeteroPlayer(state.GetPlayerType())
                         .effectiveSpeedMax();

  return max_speed * state.GetPosDelay();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x38d94
movslq 0x114(%rbx), %rcx
movq 0x5c38(%rax), %rax
cvtsi2sdl 0x18(%rbx), %xmm0
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
mulsd 0x3098(%rax,%rcx), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EstimatePlayers()
void WorldStateUpdater::EstimatePlayers() {
  //看到速度的下一周期预测队员将按照前一周期的速度继续运行
  for (Unum i = 1; i <= TEAMSIZE; i++) {
    if (i != mSelfUnum) {

      if (Teammate(i).GetVelDelay() <= 1) {
        Teammate(i).UpdateVel(
            Teammate(i).GetVel() / Teammate(i).GetPlayerDecay(),
            Teammate(i).GetVelDelay(), Teammate(i).GetVelConf());
      }
      ComputeNextCycle(Teammate(i),
                       PlayerParam::instance()
                           .HeteroPlayer(Teammate(i).GetPlayerType())
                           .playerDecay());
    }

    if (Opponent(i).GetVelDelay() <= 1) {
      Opponent(i).UpdateVel(Opponent(i).GetVel() / Opponent(i).GetPlayerDecay(),
                            Opponent(i).GetVelDelay(),
                            Opponent(i).GetVelConf());
    }
    ComputeNextCycle(Opponent(i), PlayerParam::instance()
                                      .HeteroPlayer(Opponent(i).GetPlayerType())
                                      .playerDecay());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
pushq $0x1
popq %r13
xorl %r14d, %r14d
xorl %r12d, %r12d
cmpq $0x1028, %r14           # imm = 0x1028
je 0x54b48
leaq 0x1(%r12), %rcx
movl 0x14(%rbx), %eax
movq %rcx, -0x40(%rbp)
cmpq %rax, %rcx
je 0x54a88
movq 0x8(%rbx), %rax
cmpl $0x1, 0xe8(%rax,%r14)
jg 0x54a49
leaq (%rax,%r14), %r15
addq $0xa8, %r15
leaq (%rax,%r14), %r12
addq $0xd8, %r12
movq %r15, %rdi
callq 0xd344
movsd (%rax), %xmm0
movq %r12, %rdi
callq 0x218ee
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movq 0x8(%rbx), %rax
movl 0xe8(%rax,%r14), %edx
movsd 0xf0(%rax,%r14), %xmm0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0xdde8
movq 0x8(%rbx), %rax
leaq -0x1(%r13), %r12
leaq (%rax,%r14), %r15
addq $0xa8, %r15
callq 0x38d94
movq 0x8(%rbx), %rcx
movslq 0x1bc(%rcx,%r14), %rcx
movq 0x5c38(%rax), %rax
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3020(%rax,%rcx), %xmm0
movq %r15, %rsi
callq 0x54b58
movq %r13, -0x48(%rbp)
movq 0x8(%rbx), %rax
imulq $0x178, %r12, %r13      # imm = 0x178
cmpl $0x1, 0x1110(%rax,%r13)
jg 0x54af5
leaq (%rax,%r13), %r15
addq $0x10d0, %r15           # imm = 0x10D0
leaq 0x30(%r15), %r12
movq %r15, %rdi
callq 0xd344
movsd (%rax), %xmm0
movq %r12, %rdi
callq 0x218ee
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movq 0x8(%rbx), %rax
movl 0x1110(%rax,%r13), %edx
movsd 0x1118(%rax,%r13), %xmm0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0xdde8
movq 0x8(%rbx), %rax
leaq (%rax,%r13), %r15
addq $0x10d0, %r15           # imm = 0x10D0
callq 0x38d94
movq 0x8(%rbx), %rcx
movslq 0x11e4(%rcx,%r13), %rcx
movq 0x5c38(%rax), %rax
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3020(%rax,%rcx), %xmm0
movq %r15, %rsi
callq 0x54b58
movq -0x48(%rbp), %r13
incq %r13
movl $0x178, %eax            # imm = 0x178
addq %rax, %r14
movq -0x40(%rbp), %r12
jmp 0x549be
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EvaluatePlayer(PlayerState&)
void WorldStateUpdater::EvaluatePlayer(PlayerState &player) {
  if (!mpObserver->IsNewSight()) {
    return;
  }

  if (player.GetPosDelay() != 0 && player.IsAlive() &&
      SelfState().GetPosDelay() == 0) {
    const Unum player_unum = player.GetUnum();

    if (player.GetGuessedTimes() >= 5) {
      EvaluateForgetPlayer(player);
    } else {
      if (ShouldSee(player.GetPos())) {
        player.UpdateGuessedTimes(player.GetGuessedTimes() + 1);

        const Vector *expected_pos = 0;

        if (player.IsGoalie()) {
          if (player_unum > 0) {
            expected_pos = &ServerParam::instance().ourGoal();
          } else {
            expected_pos = &ServerParam::instance().oppGoal();
          }
        }

        const Vector pos = GetNearSidePos(player.GetPos(), expected_pos);

        player.UpdatePos(pos, player.GetPosDelay(),
                         player.GetPosConf()); // delay和conf在前面更新过

        Logger::instance().GetTextLogger("guess")
            << mpWorldState->CurrentTime() << ": guess player " << player_unum
            << " out of view" << std::endl;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq (%rdi), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x54d27
movq %rsi, %r14
cmpl $0x0, 0x18(%rsi)
je 0x54d27
cmpb $0x1, 0x112(%r14)
jne 0x54d27
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
cmpl $0x0, -0xb8(%rcx,%rax)
jne 0x54d27
movl 0x11c(%r14), %r12d
movl %r12d, -0x24(%rbp)
cmpl $0x5, 0x70(%r14)
jl 0x54c5a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5525e
jmp 0x54d27
leaq 0x8(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x54eea
testb %al, %al
je 0x54d27
incl 0x70(%r14)
cmpb $0x1, 0x175(%r14)
jne 0x54c95
callq 0x3db2c
movq %rax, %rdx
testl %r12d, %r12d
jle 0x54c99
addq $0x38b0, %rdx           # imm = 0x38B0
jmp 0x54ca0
xorl %edx, %edx
jmp 0x54ca0
addq $0x38c0, %rdx           # imm = 0x38C0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x55004
leaq -0x38(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movl 0x18(%r14), %edx
movsd 0x20(%r14), %xmm0
movq %r14, %rdi
callq 0xde1c
callq 0x2ca2e
leaq 0x6baf(%rip), %rsi      # 0x5b885
movq %rax, %rdi
callq 0x2cc3e
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0x6bc5(%rip), %rsi      # 0x5b8ba
movq %rax, %rdi
callq 0x55e68
leaq -0x24(%rbp), %rsi
movq %rax, %rdi
callq 0x1a512
leaq 0x6b87(%rip), %rsi      # 0x5b897
movq %rax, %rdi
callq 0x1a4ae
movq 0x22291(%rip), %rsi     # 0x76fb0
movq %rax, %rdi
callq 0x10f5c
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EvaluateBall()
void WorldStateUpdater::EvaluateBall() {
  // if drop ball just forget
  //
  if (mpWorldState->IsBallDropped() && Ball().GetPosDelay() != 0) {
    EvaluateForgetBall(true);
    return;
  }

  if (!mpObserver->IsNewSight()) {
    return;
  }

  if (Ball().GetPosDelay() != 0 && SelfState().GetPosDelay() == 0) {
    if (Ball().GetGuessedTimes() >= 100) {
      EvaluateForgetBall(false);
    } else {
      if (ShouldSee(Ball().GetPos())) {
        Ball().UpdateGuessedTimes(Ball().GetGuessedTimes() + 1);

        const Vector pos = GetNearSidePos(Ball().GetPos());

        Ball().UpdatePos(pos, Ball().GetPosDelay(), Ball().GetPosConf());

        Logger::instance().GetTextLogger("guess")
            << mpWorldState->CurrentTime() << ": guess ball out of view"
            << std::endl;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
cmpb $0x1, 0x2c(%rsi)
jne 0x54d61
cmpl $0x0, 0x48(%rsi)
je 0x54d61
pushq $0x1
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x54e30
movq (%rbx), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x54d88
cmpl $0x0, 0x48(%rsi)
je 0x54d88
movslq 0x14(%rbx), %rax
imulq $0x178, %rax, %rax      # imm = 0x178
cmpl $0x0, -0xb8(%rsi,%rax)
je 0x54d8f
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x64, 0xa0(%rsi)
jl 0x54d9f
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x54d56
addq $0x38, %rsi
movq %rbx, %rdi
callq 0x54eea
testb %al, %al
je 0x54d88
movq 0x8(%rbx), %rsi
incl 0xa0(%rsi)
addq $0x38, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x55004
leaq -0x18(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movq 0x8(%rbx), %rax
leaq 0x30(%rax), %rdi
movl 0x48(%rax), %edx
movsd 0x50(%rax), %xmm0
callq 0xde1c
callq 0x2ca2e
leaq 0x6a90(%rip), %rsi      # 0x5b885
movq %rax, %rdi
callq 0x2cc3e
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0x6a77(%rip), %rsi      # 0x5b88b
movq %rax, %rdi
callq 0x55e02
movq 0x2218d(%rip), %rsi     # 0x76fb0
movq %rax, %rdi
callq 0x10f5c
jmp 0x54d88
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EvaluateForgetBall(bool)
void WorldStateUpdater::EvaluateForgetBall(bool use_memory) {
  if (!use_memory) {
    Ball().UpdatePos(Vector(0, 0), Ball().GetPosDelay(), 0); // as WE2008
    Ball().UpdateVel(Vector(0, 0), Ball().GetPosDelay(), 0); // as WE2008
  }

  Ball().UpdateGuessedTimes(100);

  Logger::instance().GetTextLogger("forget")
      << mpWorldState->CurrentTime() << ": forget ball " << use_memory
      << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movb %sil, -0x11(%rbp)
testl %esi, %esi
jne 0x54e85
movq 0x8(%rbx), %rdi
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r14
movaps %xmm0, (%r14)
movl 0x48(%rdi), %edx
addq $0x30, %rdi
xorps %xmm0, %xmm0
movq %r14, %rsi
callq 0xde1c
movq 0x8(%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movl 0x48(%rdi), %edx
addq $0x30, %rdi
leaq -0x30(%rbp), %rsi
xorps %xmm0, %xmm0
callq 0xdde8
movq 0x8(%rbx), %rax
movl $0x64, 0xa0(%rax)
callq 0x2ca2e
leaq 0x6a05(%rip), %rsi      # 0x5b8a4
movq %rax, %rdi
callq 0x2cc3e
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0x69ed(%rip), %rsi      # 0x5b8ab
movq %rax, %rdi
callq 0x10f8a
leaq -0x11(%rbp), %rsi
movq %rax, %rdi
callq 0x55e34
movq 0x220d7(%rip), %rsi     # 0x76fb0
movq %rax, %rdi
callq 0x10f5c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::ShouldSee(Vector const&)
bool WorldStateUpdater::ShouldSee(const Vector &pos) {
  if (!mpObserver->IsNewSight()) {
    return false;
  }

  const ViewWidth view_width = GetSelf().GetViewWidth();
  const AngleDeg view_angle = sight::ViewAngle(view_width);
  const AngleDeg left = GetSelf().GetNeckGlobalDir() - view_angle * 0.5;
  const AngleDeg right = left + view_angle;
  const Vector self_pos = SelfState().GetPos();
  const Vector rel_pos = (pos - self_pos);
  const double dist = rel_pos.Mod();

  return dist < ServerParam::instance().visibleDistance() - 0.1 ||
         IsAngleDegInBetween(left, rel_pos.Dir(), right);
}

// Assembly:
movq (%rdi), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x54f3e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
movl 0x118(%rdi), %eax
decl %eax
cmpl $0x2, %eax
ja 0x54f41
movl %eax, %eax
leaq 0x68a1(%rip), %rcx      # 0x5b7d8
movsd (%rcx,%rax,8), %xmm0
jmp 0x54f49
xorl %eax, %eax
retq
movsd 0x213f(%rip), %xmm0     # 0x57088
movsd %xmm0, -0x18(%rbp)
callq 0x4bef2
movsd 0x2105(%rip), %xmm1     # 0x57060
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
addsd %xmm2, %xmm1
movsd %xmm1, -0x20(%rbp)
movslq 0x14(%r14), %rax
movq 0x8(%r14), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
subsd -0xc8(%rax,%rcx), %xmm0
subsd -0xc0(%rax,%rcx), %xmm1
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x3db2c
movsd 0x3178(%rax), %xmm0
addsd 0x35c4(%rip), %xmm0     # 0x58598
ucomisd -0x18(%rbp), %xmm0
movb $0x1, %al
ja 0x54ffb
leaq -0x38(%rbp), %rdi
callq 0xcd30
leaq -0x40(%rbp), %rsi
movsd %xmm0, (%rsi)
leaq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x4199f
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::EvaluateForgetPlayer(PlayerState&)
void WorldStateUpdater::EvaluateForgetPlayer(PlayerState &player) {
  // i think it will cause trouble with UpdateUnknownPlayer ,it need test.
  player.SetIsAlive(false);
  player.UpdatePos(Vector(0, 0), player.GetPosDelay(), 0);
  player.UpdateVel(Vector(0, 0), player.GetVelDelay(), 0);
  player.UpdateBodyDir(0, player.GetBodyDirDelay(), 0);
  player.UpdateNeckDir(0, player.GetNeckDirDelay(), 0);
  player.UpdateGuessedTimes(100);

  Logger::instance().GetTextLogger("forget")
      << mpWorldState->CurrentTime() << ": forget player " << player.GetUnum()
      << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x381ec
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r15
movaps %xmm0, (%r15)
movl 0x18(%rbx), %edx
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xde1c
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movl 0x40(%rbx), %edx
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdde8
movl 0xb8(%rbx), %esi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %rbx, %rdi
callq 0x382a6
movl 0xa0(%rbx), %esi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %rbx, %rdi
callq 0x382f8
movl $0x64, 0x70(%rbx)
callq 0x2ca2e
leaq 0x65ba(%rip), %rsi      # 0x5b8a4
movq %rax, %rdi
callq 0x2cc3e
movq 0x8(%r14), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0x65c1(%rip), %rsi      # 0x5b8ca
movq %rax, %rdi
callq 0x55e9a
movl 0x11c(%rbx), %ecx
movl %ecx, (%r15)
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x1a512
movq 0x21c83(%rip), %rsi     # 0x76fb0
movq %rax, %rdi
callq 0x10f5c
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::GetClosestOpponent()
Unum WorldStateUpdater::GetClosestOpponent() {
  double min_dist = 200000;
  int min_index = -1;
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (GetOpponent(i).IsAlive()) {
      if ((GetOpponent(i).GetPos() - SelfState().GetPos()).Mod() < min_dist) {
        min_dist = (GetOpponent(i).GetPos() - SelfState().GetPos()).Mod();
        min_index = i;
      }
    }
  }
  return min_index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
movslq 0x14(%rdi), %rax
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rcx,%rax), %rdx
addq $-0xc8, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movsd 0x6351(%rip), %xmm0     # 0x5b6c8
movl $0x1, %esi
xorl %edi, %edi
cmpq $0x1028, %rdi           # imm = 0x1028
je 0x553d3
cmpb $0x1, 0x11e2(%rcx,%rdi)
jne 0x553c8
movsd 0x10d8(%rcx,%rdi), %xmm1
movsd 0x10e0(%rcx,%rdi), %xmm2
subsd (%rdx), %xmm1
subsd 0x8(%rdx), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x553c8
movapd %xmm1, %xmm0
movl %esi, %eax
addq $0x178, %rdi            # imm = 0x178
incl %esi
jmp 0x5537e
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::GetClosestPlayerToBall()
Unum WorldStateUpdater::GetClosestPlayerToBall() {
  double min_dist = 20000;
  int min_index = 0;
  for (int i = 1; i <= TEAMSIZE; i++) {
    if (GetTeammate(i).IsAlive()) {
      if ((GetTeammate(i).GetPos() - Ball().GetPos()).Mod() < min_dist) {
        min_dist = (GetTeammate(i).GetPos() - Ball().GetPos()).Mod();
        min_index = i;
      }
    }
    if (GetOpponent(i).IsAlive()) {
      if ((GetOpponent(i).GetPos() - Ball().GetPos()).Mod() < min_dist) {
        min_dist = (GetOpponent(i).GetPos() - Ball().GetPos()).Mod();
        min_index = -i;
      }
    }
  }

  return min_index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
xorl %eax, %eax
movsd 0x6330(%rip), %xmm0     # 0x5b718
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $-0x1028, %rsi          # imm = 0xEFD8
movl $0x1, %edi
testq %rsi, %rsi
je 0x55496
cmpb $0x1, 0x11e2(%rcx,%rsi)
jne 0x55444
movsd 0x10d8(%rcx,%rsi), %xmm1
movsd 0x10e0(%rcx,%rsi), %xmm2
subsd 0x38(%rcx), %xmm1
subsd 0x40(%rcx), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x55444
movapd %xmm1, %xmm0
movl %edi, %eax
cmpb $0x1, 0x220a(%rcx,%rsi)
jne 0x55486
movsd 0x2100(%rcx,%rsi), %xmm1
movsd 0x2108(%rcx,%rsi), %xmm2
subsd 0x38(%rcx), %xmm1
subsd 0x40(%rcx), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x55486
movapd %xmm1, %xmm0
movl %edx, %eax
decl %edx
addq $0x178, %rsi            # imm = 0x178
incl %edi
jmp 0x553f9
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::ComputeShouldSeeOrNot(Vector)
bool WorldStateUpdater::ComputeShouldSeeOrNot(Vector pos) {
  double view_angle = 0;
  switch (GetSelf().GetViewWidth()) {
  case VW_Narrow:
    view_angle = 60;
    break;
  case VW_Normal:
    view_angle = 120;
    break;
  case VW_Wide:
    view_angle = 180;
    break;
  default:
    view_angle = 120;
    break;
  }

  //获得位置相对自己的夹角
  Vector dist_vec = pos - GetSelf().GetPos();
  double angle = GetNormalizeAngleDeg(dist_vec.Dir());
  angle = ::fabs(::GetNormalizeAngleDeg(angle - GetSelf().GetNeckGlobalDir()));
  double anglebuf = ASin((1 * 0.6 + 0.05 * dist_vec.Mod()) / dist_vec.Mod());
  angle += anglebuf; // different from ComputePlayerMaySeeOrNot

  //完全视角内可见
  double distbuf = 0.05 * ServerParam::instance().visibleDistance();
  if (dist_vec.Mod() <= ServerParam::instance().visibleDistance() - distbuf) {
    return true;
  }

  //角度在视角内
  if (angle > view_angle / 2) {
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addq %rcx, %rax
addq $-0xd0, %rax
movl 0x118(%rax), %ecx
decl %ecx
cmpl $0x2, %ecx
ja 0x554df
movl %ecx, %ecx
leaq 0x6318(%rip), %rdx      # 0x5b7f0
movsd (%rdx,%rcx,8), %xmm2
jmp 0x554e7
movsd 0x4929(%rip), %xmm2     # 0x59e10
movaps %xmm2, -0x50(%rbp)
subsd 0x8(%rax), %xmm0
subsd 0x10(%rax), %xmm1
leaq -0x80(%rbp), %rbx
movsd %xmm0, (%rbx)
movsd %xmm1, 0x8(%rbx)
movq %rbx, %rdi
callq 0xcd30
movabsq $-0x3f99800000000000, %r12 # imm = 0xC066800000000000
leaq -0x30(%rbp), %r15
movq %r12, (%r15)
movq %r15, %rdi
callq 0xd305
movsd %xmm0, -0x28(%rbp)
movslq 0x14(%r14), %rax
movq 0x8(%r14), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
callq 0x4bef2
movsd -0x28(%rbp), %xmm1
subsd %xmm0, %xmm1
movq %r12, (%r15)
leaq -0x30(%rbp), %r14
movapd %xmm1, %xmm0
movq %r14, %rdi
callq 0xd305
movapd %xmm0, -0x70(%rbp)
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd 0x2d0f(%rip), %xmm2     # 0x58298
movsd %xmm2, -0x28(%rbp)
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
addsd 0x23f2(%rip), %xmm1     # 0x57990
divsd %xmm0, %xmm1
movsd %xmm1, (%r14)
leaq -0x30(%rbp), %rdi
callq 0x1cba1
movsd %xmm0, -0x38(%rbp)
callq 0x3db2c
movsd -0x28(%rbp), %xmm0
mulsd 0x3178(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movapd %xmm0, -0x60(%rbp)
callq 0x3db2c
movsd 0x3178(%rax), %xmm0
subsd -0x28(%rbp), %xmm0
movapd -0x60(%rbp), %xmm2
cmplepd %xmm0, %xmm2
movapd -0x70(%rbp), %xmm0
andpd 0x19fd(%rip), %xmm0     # 0x57010
addsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
movapd -0x50(%rbp), %xmm0
cmpnltpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
andb $0x1, %al
addq $0x60, %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/PlayerParam.h
// Function: PlayerParam::GetEpsInSight(double)
double GetEpsInSight(double dist) {
    Assert(dist >= 0);
    int low = 0;
    int middle = 0;
    int high = SIGHTSIZE - 1;

    while (low <= high) {
      middle = (low + high) / 2;

      if (middle + 1 >= SIGHTSIZE) {
        return mSightChange[SIGHTSIZE - 1][2];
      }

      if (dist >= mSightChange[middle][0] &&
          dist <= mSightChange[middle + 1][0]) {
        if (fabs(dist - mSightChange[middle][0]) <
            fabs(dist - mSightChange[middle + 1][0])) {
          return mSightChange[middle][2];
        } else {
          return mSightChange[middle + 1][2];
        }
      }

      if (middle == 0) {
        return mSightChange[middle][2];
      }

      if (dist < mSightChange[middle][0]) {
        high = middle;
      } else {
        low = middle + 1;
      }
    }

    PRINT_ERROR("can not find this dist " << dist);
    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x3208(%rdi), %rsi
pushq $0x3d
popq %r8
xorl %r10d, %r10d
pushq $0x2
popq %r9
cmpl %r8d, %r10d
jg 0x5579f
leal (%r8,%r10), %ecx
movl %ecx, %eax
cltd
idivl %r9d
cmpl $0x7a, %ecx
jge 0x5580c
leal 0x1(%rax), %r11d
movslq %eax, %rdx
imulq $0x18, %rdx, %rbx
leaq (%rsi,%rbx), %rdx
movsd (%rsi,%rbx), %xmm3
ucomisd %xmm3, %xmm0
jb 0x55783
movslq %r11d, %rbx
imulq $0x18, %rbx, %rbx
movsd (%rsi,%rbx), %xmm1
ucomisd %xmm0, %xmm1
jae 0x55816
incl %ecx
cmpl $0x2, %ecx
jbe 0x55838
ucomisd %xmm0, %xmm3
cmoval %r10d, %r11d
cmoval %eax, %r8d
movl %r11d, %r10d
jmp 0x5573b
movq 0x2184a(%rip), %rdi     # 0x76ff0
leaq 0x612e(%rip), %rsi      # 0x5b8db
movapd %xmm0, -0x20(%rbp)
callq 0x94b0
leaq 0x59b4(%rip), %rsi      # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x169, %esi            # imm = 0x169
callq 0x9890
leaq 0x3c45(%rip), %rsi      # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x6107(%rip), %rsi      # 0x5b8f0
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movapd -0x20(%rbp), %xmm0
callq 0x97e0
movq %rax, %rdi
callq 0x99e8
xorpd %xmm0, %xmm0
jmp 0x5583d
movsd 0x37d0(%rdi), %xmm0
jmp 0x5583d
movapd %xmm0, %xmm2
subsd %xmm3, %xmm2
movapd 0x17ea(%rip), %xmm3     # 0x57010
andpd %xmm3, %xmm2
subsd %xmm1, %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm2, %xmm0
jbe 0x55844
movsd 0x10(%rdx), %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
addq %rbx, %rsi
movsd 0x10(%rsi), %xmm0
jmp 0x5583d
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/PlayerParam.h
// Function: PlayerParam::ConvertSightDist(double)
double ConvertSightDist(double dist) {
    Assert(dist >= 0);
    int low = 0;
    int middle = 0;
    int high = SIGHTSIZE;

    while (low <= high) {
      middle = (low + high) / 2;

      if (middle >= SIGHTSIZE || middle < 0) {
        break;
      }

      if (fabs(dist - mSightChange[middle][0]) < 0.01) {
        return mSightChange[middle][1];
      }

      if (dist < mSightChange[middle][0]) {
        high = middle;
      } else {
        low = middle + 1;
      }
    }

    PRINT_ERROR("can not find this dist " << dist);
    return dist;
  }

// Assembly:
addq $0x3208, %rdi           # imm = 0x3208
pushq $0x3e
popq %rcx
xorl %r8d, %r8d
pushq $0x2
popq %rsi
movapd 0x17aa(%rip), %xmm4     # 0x57010
movsd 0x1eaa(%rip), %xmm1     # 0x57718
cmpl %ecx, %r8d
jg 0x558ba
leal (%rcx,%r8), %eax
cltd
idivl %esi
leal (%rcx,%r8), %edx
addl $-0x7c, %edx
cmpl $-0x7d, %edx
jb 0x558ba
movl %eax, %edx
imulq $0x18, %rdx, %rdx
movsd (%rdi,%rdx), %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
andpd %xmm4, %xmm3
ucomisd %xmm3, %xmm1
ja 0x55934
ucomisd %xmm0, %xmm2
leal 0x1(%rax), %edx
cmoval %r8d, %edx
cmoval %eax, %ecx
movl %edx, %r8d
jmp 0x5586e
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x21727(%rip), %rdi     # 0x76ff0
leaq 0x600b(%rip), %rsi      # 0x5b8db
movsd %xmm0, -0x8(%rbp)
callq 0x94b0
leaq 0x5891(%rip), %rsi      # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x143, %esi            # imm = 0x143
callq 0x9890
leaq 0x3b22(%rip), %rsi      # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x5fe4(%rip), %rsi      # 0x5b8f0
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movsd -0x8(%rbp), %xmm0
callq 0x97e0
movq %rax, %rdi
callq 0x99e8
movsd -0x8(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
addq %rdx, %rdi
movsd 0x8(%rdi), %xmm0
retq
nop