LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6754a
movl $0x10d0, %eax           # imm = 0x10D0
addq %rax, %r14
addq %rax, %rbx
movl $0xb, %r15d
movq $-0x1028, %r12          # imm = 0xEFD8
movl $0x178, %r13d           # imm = 0x178
leaq (%rbx,%r12), %rsi
movq %r14, %rdi
callq 0x456fc
leaq (%r14,%r12), %rdi
movq %rbx, %rsi
callq 0x456fc
addq %r13, %r14
addq %r13, %rbx
decq %r15
jne 0x5a679
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5c5d2
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 0x2ea94(%rip), %rdi     # 0x8b070
callq 0x27932
callq 0x43dce
movl 0x31a0(%rax), %ecx
movq 0x8(%rbx), %rax
movl %ecx, 0x2110(%rax)
movq (%rbx), %rcx
movl 0x30(%rcx), %edx
movl %edx, 0x2114(%rax)
movl 0x34(%rcx), %edx
movl %edx, 0x2118(%rax)
movl 0x38(%rcx), %ecx
movl %ecx, 0x211c(%rax)
movq 0x8(%rax), %rcx
movl 0x14b90(%rcx), %edx
movl %edx, %esi
addl $0x9, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %rsi # imm = 0x66666667
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rsi
addl %edi, %esi
addl %esi, %esi
leal (%rsi,%rsi,4), %esi
negl %esi
addl %esi, %edx
addl $0x9, %edx
movslq %edx, %rdx
imulq $0x2128, %rdx, %rdx     # imm = 0x2128
movl 0x10(%rcx,%rdx), %ecx
cmpl 0x10(%rax), %ecx
sete 0x2120(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x659b6
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x660a8
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x66434
// File: /workspace/github_cpp_makefile_star2_O3/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 0x546de
movl %eax, 0x28(%rbx)
callq 0x43dce
movl 0x28(%rbx), %ecx
movsd 0xb87e(%rip), %xmm0     # 0x69058
testl %ecx, %ecx
jle 0x5d7f6
movsd 0x3200(%rax), %xmm1
movsd 0xb86a(%rip), %xmm0     # 0x69058
mulsd %xmm1, %xmm0
decl %ecx
jne 0x5d7ee
movsd %xmm0, 0x20(%rbx)
callq 0x43dce
movl 0x28(%rbx), %ecx
testl %ecx, %ecx
movsd 0xb84b(%rip), %xmm1     # 0x69058
jle 0x5d827
movsd 0x31f8(%rax), %xmm0
movsd 0xb839(%rip), %xmm1     # 0x69058
mulsd %xmm0, %xmm1
decl %ecx
jne 0x5d81f
movsd %xmm1, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %r14d
movl $0x1870, %r15d          # imm = 0x1870
movl 0x14(%rbx), %eax
cmpq %rax, %r14
je 0x5df7f
movq (%rbx), %rsi
movl 0x1c(%rsi,%r15), %eax
cmpl 0x18(%rsi), %eax
jne 0x5df7f
movl 0x14(%rsi), %eax
cmpl %eax, 0x18(%rsi,%r15)
jne 0x5df7f
addq %r15, %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl $0x1, %ecx
callq 0x621c4
incq %r14
addq $0xa8, %r15
cmpq $0xc, %r14
jne 0x5df4d
movl $0x1, %r14d
movl $0x1fa8, %r15d          # imm = 0x1FA8
movq (%rbx), %rsi
movl 0x1c(%rsi,%r15), %eax
cmpl 0x18(%rsi), %eax
jne 0x5dfc2
movl 0x14(%rsi), %eax
cmpl %eax, 0x18(%rsi,%r15)
jne 0x5dfc2
addq %r15, %rsi
movq %rbx, %rdi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x621c4
incl %r14d
addq $0xa8, %r15
cmpq $0x26e0, %r15           # imm = 0x26E0
jne 0x5df9b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x60754
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rdx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rdx,%rax), %r14
addq $-0x178, %r14           # imm = 0xFE88
leaq (%rdx,%rax), %rdi
addq $-0xd0, %rdi
movl $0xd8, %ecx
addq %rcx, %r14
movq 0x8(%rdx), %rdx
movl %esi, %r8d
subl $0xa, %r8d
cmovbl %esi, %r8d
movl 0x14b90(%rdx), %esi
negl %r8d
addl %r8d, %esi
addl $0xa, %esi
movslq %esi, %rsi
imulq $0x66666667, %rsi, %r8  # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x22, %r8
addl %r9d, %r8d
addl %r8d, %r8d
leal (%r8,%r8,4), %r8d
subl %r8d, %esi
movslq %esi, %rsi
imulq $0x2128, %rsi, %rsi     # imm = 0x2128
addq %rdx, %rsi
addq %rax, %rsi
addq $-0x178, %rsi           # imm = 0xFE88
addq %rcx, %rsi
movsd 0x895f(%rip), %xmm0     # 0x69058
xorl %edx, %edx
callq 0xf53c
movl 0x28(%rbx), %r15d
testl %r15d, %r15d
jle 0x6071e
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x5d778
decl %r15d
jne 0x60709
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
movsd 0x8918(%rip), %xmm0     # 0x69058
movq %r14, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf53c
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %r14d
movl $0xa8, %r15d
xorl %r12d, %r12d
movq %r12, %r13
incq %r12
movl 0x14(%rbx), %eax
cmpq %rax, %r12
je 0x60ff2
leaq -0x1(%r14), %r13
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x66716
movq 0x8(%rbx), %rax
imulq $0x178, %r13, %rcx      # imm = 0x178
leaq (%rax,%rcx), %rsi
addq $0x10d0, %rsi           # imm = 0x10D0
movq %rbx, %rdi
callq 0x66716
incq %r14
movl $0x178, %eax            # imm = 0x178
addq %rax, %r15
cmpq $0xb, %r12
jne 0x60fd1
movl $0x1, %r12d
movl $0x1ba, %r13d           # imm = 0x1BA
xorl %ecx, %ecx
movq %rcx, %r15
incq %rcx
movl 0x14(%rbx), %eax
movq 0x8(%rbx), %r14
cmpq %rax, %rcx
je 0x610b6
leaq -0x1(%r12), %r15
cmpb $0x1, (%r14,%r13)
jne 0x610b6
movl -0xfa(%r14,%r13), %edx
cmpl $0x65, %edx
jl 0x610b6
leaq (%r14,%r13), %rdi
addq $-0x112, %rdi           # imm = 0xFEEE
movq %rdi, -0x30(%rbp)
leaq -0x10a(%r14,%r13), %rsi
movb $0x0, 0x10a(%rsi)
xorps %xmm0, %xmm0
movq %rcx, -0x38(%rbp)
callq 0xf572
addq %r13, %r14
addq $-0xe2, %r14
movl 0x10(%r14), %edx
xorps %xmm0, %xmm0
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0xf53c
movq -0x38(%rbp), %rcx
xorl %eax, %eax
movq %rax, 0x78(%r14)
movq %rax, 0x90(%r14)
movq 0x8(%rbx), %r14
imulq $0x178, %r15, %rax      # imm = 0x178
cmpb $0x1, 0x11e2(%r14,%rax)
jne 0x6111b
addq %rax, %r14
addq $0x10d0, %r14           # imm = 0x10D0
movl 0x18(%r14), %edx
cmpl $0x65, %edx
jl 0x6111b
leaq 0x8(%r14), %rsi
movb $0x0, 0x112(%r14)
xorps %xmm0, %xmm0
movq %r14, %rdi
movq %rcx, %r15
callq 0xf572
leaq 0x30(%r14), %rsi
movl 0x40(%r14), %edx
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0xf53c
movq %r15, %rcx
xorl %eax, %eax
movq %rax, 0xa8(%r14)
movq %rax, 0xc0(%r14)
incq %r12
addq $0x178, %r13            # imm = 0x178
cmpq $0xb, %rcx
jne 0x6102f
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x668a6
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x619fc
movapd %xmm0, %xmm1
movsd 0x7666(%rip), %xmm0     # 0x69058
mulsd %xmm1, %xmm0
decl %esi
jne 0x619f2
jmp 0x61a04
movsd 0x7654(%rip), %xmm0     # 0x69058
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %esi
movl 0x18(%rcx), %edi
addq $0x26fc, %rcx           # imm = 0x26FC
movl $0x5, %edx
xorl %r8d, %r8d
movsd 0xb891(%rip), %xmm0     # 0x6d720
xorl %r14d, %r14d
cmpl %edi, (%rcx)
jne 0x61eb3
cmpl %esi, -0x4(%rcx)
jne 0x61eb3
movsd -0x1c(%rcx), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r8d, %edx
minsd %xmm0, %xmm1
incl %r14d
movapd %xmm1, %xmm0
incq %r8
addq $0x58, %rcx
cmpq $0x4, %r8
jne 0x61e92
testl %r14d, %r14d
je 0x61f42
movl %edx, %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 0xb864(%rip), %rcx      # 0x6d750
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rbx)
callq 0xe702
subsd (%rbx), %xmm0
movsd 0x7142(%rip), %xmm1     # 0x69048
cmpl $0x2, %r14d
jl 0x61f10
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
ucomisd %xmm1, %xmm0
jbe 0x61f24
movsd 0x7146(%rip), %xmm1     # 0x69068
jmp 0x61f3a
movsd 0x7134(%rip), %xmm1     # 0x69060
ucomisd %xmm0, %xmm1
jbe 0x61f42
movsd 0x7136(%rip), %xmm1     # 0x69070
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_O3/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 0x49360
leaq 0x7eef(%rip), %rax      # 0x6bee8
movsd (%rax), %xmm0
movsd 0x5873(%rip), %xmm1     # 0x69878
movsd %xmm0, -0x8(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x10(%rbp)
callq 0x49360
movsd -0x18(%rbp), %xmm1
ucomisd -0x10(%rbp), %xmm1
ja 0x64050
movsd -0x8(%rbp), %xmm0
mulsd 0x5057(%rip), %xmm0     # 0x69088
movsd %xmm0, -0x8(%rbp)
ucomisd %xmm1, %xmm0
movsd %xmm1, -0x10(%rbp)
jbe 0x64050
callq 0x49360
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x49360
leaq 0x7e94(%rip), %rax      # 0x6bef0
movsd (%rax), %xmm0
movsd 0x5810(%rip), %xmm1     # 0x69878
movsd %xmm0, -0x8(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
callq 0x49360
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x640b1
movsd -0x8(%rbp), %xmm1
mulsd 0x4ff0(%rip), %xmm1     # 0x69088
movsd %xmm1, -0x8(%rbp)
ucomisd %xmm0, %xmm1
movapd %xmm0, %xmm1
jbe 0x640b1
callq 0x49360
movsd -0x8(%rbp), %xmm1
movsd -0x10(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
xorl %eax, %eax
movsd 0x9661(%rip), %xmm0     # 0x6d738
movl $0x1, %edi
cmpq %rdi, %rcx
jne 0x640f3
incq %rdi
addq $0xa8, %rsi
cmpq $0xc, %rdi
jne 0x640dc
jmp 0x64119
movl (%rsi), %r8d
cmpl 0x10(%rdx), %r8d
jne 0x640e1
movl 0xc(%rdx), %r8d
cmpl %r8d, -0x4(%rsi)
jne 0x640e1
movsd -0xc(%rsi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x640e1
movl %edi, %eax
movapd %xmm1, %xmm0
jmp 0x640e1
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
xorl %edi, %edi
movsd 0x9605(%rip), %xmm0     # 0x6d738
movl $0x1, %r8d
xorl %eax, %eax
cmpl %esi, 0x1fb4(%rcx,%rdi)
jne 0x64163
cmpl %edx, 0x1fb0(%rcx,%rdi)
jne 0x64163
movsd 0x1fa8(%rcx,%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x64163
movl %r8d, %eax
movapd %xmm1, %xmm0
incl %r8d
addq $0xa8, %rdi
cmpq $0x738, %rdi            # imm = 0x738
jne 0x6413b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43dce
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_O3/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 $0x10, %rsp
movq (%rdi), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x66760
movq %rsi, %r15
cmpl $0x0, 0x18(%rsi)
je 0x66760
cmpb $0x1, 0x112(%r15)
jne 0x66760
movq %rdi, %r14
movslq 0x14(%rdi), %rax
movq 0x8(%rdi), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
cmpl $0x0, -0xb8(%rcx,%rax)
je 0x6676d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x5, 0x70(%r15)
jl 0x6678b
movq %r14, %rdi
movq %r15, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x66ff8
leaq 0x8(%r15), %r12
movl 0x11c(%r15), %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x66afa
testb %al, %al
je 0x66760
incl 0x70(%r15)
cmpb $0x1, 0x175(%r15)
jne 0x667c8
callq 0x49360
movq %rax, %rdx
testl %ebx, %ebx
jle 0x667cc
addq $0x38b0, %rdx           # imm = 0x38B0
jmp 0x667d3
xorl %edx, %edx
jmp 0x667d3
addq $0x38c0, %rdx           # imm = 0x38C0
movq %r14, %rdi
movq %r12, %rsi
callq 0x66cd6
leaq -0x30(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movl 0x18(%r15), %edx
movsd 0x20(%r15), %xmm0
movq %r15, %rdi
callq 0xf572
callq 0x34c60
leaq 0x709c(%rip), %rsi      # 0x6d8a5
movq %rax, %rdi
callq 0x34e74
movq %rax, %r15
movq 0x8(%r14), %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x6683c
addq $0x10, %r14
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r14, %rsi
callq 0xe974
leaq 0x7097(%rip), %rsi      # 0x6d8da
movq %r15, %rdi
callq 0x67d8e
movq %rax, %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x6686d
movq %r14, %rdi
addq $0x210, %rdi            # imm = 0x210
movl %ebx, %esi
callq 0x9880
leaq 0x7043(%rip), %rsi      # 0x6d8b7
movq %r14, %rdi
callq 0x1ee52
movq %rax, %rbx
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x66760
addq $0x210, %rbx            # imm = 0x210
movq %rbx, %rdi
callq 0x9240
jmp 0x66760
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
cmpb $0x1, 0x2c(%rsi)
jne 0x668d9
cmpl $0x0, 0x48(%rsi)
je 0x668d9
movq %rbx, %rdi
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x669da
movq (%rbx), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x66900
cmpl $0x0, 0x48(%rsi)
je 0x66900
movslq 0x14(%rbx), %rax
imulq $0x178, %rax, %rax      # imm = 0x178
cmpl $0x0, -0xb8(%rsi,%rax)
je 0x66909
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x64, 0xa0(%rsi)
jl 0x66919
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x668cc
addq $0x38, %rsi
movq %rbx, %rdi
callq 0x66afa
testb %al, %al
je 0x66900
movq 0x8(%rbx), %rsi
incl 0xa0(%rsi)
addq $0x38, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x66cd6
leaq -0x20(%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 0xf572
callq 0x34c60
leaq 0x6f36(%rip), %rsi      # 0x6d8a5
movq %rax, %rdi
callq 0x34e74
movq %rax, %r14
movq 0x8(%rbx), %rbx
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x669a2
addq $0x10, %rbx
movq %r14, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %rbx, %rsi
callq 0xe974
leaq 0x6f02(%rip), %rsi      # 0x6d8ab
movq %r14, %rdi
callq 0x67d44
movq %rax, %rbx
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x66900
addq $0x210, %rbx            # imm = 0x210
movq %rbx, %rdi
callq 0x9240
jmp 0x66900
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
jne 0x66a2f
movq 0x8(%r14), %rdi
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r15
movaps %xmm0, (%r15)
movl 0x48(%rdi), %edx
addq $0x30, %rdi
xorps %xmm0, %xmm0
movq %r15, %rsi
callq 0xf572
movq 0x8(%r14), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movl 0x48(%rdi), %edx
addq $0x30, %rdi
leaq -0x30(%rbp), %rsi
xorps %xmm0, %xmm0
callq 0xf53c
movq 0x8(%r14), %rax
movl $0x64, 0xa0(%rax)
callq 0x34c60
leaq 0x6e7b(%rip), %rsi      # 0x6d8c4
movq %rax, %rdi
callq 0x34e74
movq %rax, %r15
movq 0x8(%r14), %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x66a7c
addq $0x10, %r14
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r14, %rsi
callq 0xe974
leaq 0x6e48(%rip), %rsi      # 0x6d8cb
movq %r15, %rdi
callq 0x13582
movq %rax, %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x66aab
leaq 0x210(%r14), %rdi
movzbl %bl, %esi
callq 0x9820
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x66aee
movq %r14, %rbx
addq $0x210, %rbx            # imm = 0x210
movq 0x210(%r14), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/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:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq (%rdi), %rax
cmpb $0x1, 0x3382(%rax)
jne 0x66b4e
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 0x66b55
movl %eax, %eax
leaq 0x6cb1(%rip), %rcx      # 0x6d7f8
movsd (%rcx,%rax,8), %xmm0
jmp 0x66b5d
xorl %eax, %eax
jmp 0x66ccd
movsd 0x2553(%rip), %xmm0     # 0x690b0
movsd %xmm0, -0x18(%rbp)
callq 0x59a22
movsd %xmm0, -0x20(%rbp)
movslq 0x14(%r14), %rax
movq 0x8(%r14), %rcx
movsd (%rbx), %xmm1
movsd 0x8(%rbx), %xmm0
imulq $0x178, %rax, %rax      # imm = 0x178
subsd -0xc8(%rax,%rcx), %xmm1
subsd -0xc0(%rax,%rcx), %xmm0
movapd %xmm0, -0x50(%rbp)
mulsd %xmm0, %xmm0
movapd %xmm1, -0x40(%rbp)
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x49360
movsd 0x3178(%rax), %xmm0
addsd 0x39fb(%rip), %xmm0     # 0x6a5c8
movb $0x1, %al
ucomisd -0x28(%rbp), %xmm0
ja 0x66ccd
movsd 0x24a6(%rip), %xmm0     # 0x69088
movsd -0x18(%rbp), %xmm3
mulsd %xmm3, %xmm0
movsd -0x20(%rbp), %xmm4
addsd %xmm0, %xmm4
movapd 0x2414(%rip), %xmm5     # 0x69010
movapd -0x40(%rbp), %xmm1
movapd %xmm1, %xmm0
andpd %xmm5, %xmm0
movsd 0x242f(%rip), %xmm2     # 0x69040
ucomisd %xmm0, %xmm2
movapd -0x50(%rbp), %xmm6
jbe 0x66c2a
andpd %xmm6, %xmm5
xorpd %xmm0, %xmm0
ucomisd %xmm5, %xmm2
ja 0x66c52
movapd %xmm6, %xmm0
movsd %xmm4, -0x20(%rbp)
callq 0x90d0
movsd -0x20(%rbp), %xmm4
movsd -0x18(%rbp), %xmm3
mulsd 0x23fe(%rip), %xmm0     # 0x69048
divsd 0x23fe(%rip), %xmm0     # 0x69050
addsd %xmm4, %xmm3
movsd 0x2412(%rip), %xmm1     # 0x69070
ucomisd %xmm0, %xmm4
jbe 0x66c70
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm4
ja 0x66c64
jmp 0x66c8c
addsd %xmm4, %xmm1
ucomisd %xmm1, %xmm0
jb 0x66c8c
movsd 0x23e6(%rip), %xmm2     # 0x69068
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jae 0x66c82
ucomisd %xmm3, %xmm4
jbe 0x66ca6
movsd 0x23d6(%rip), %xmm1     # 0x69070
addsd %xmm1, %xmm3
ucomisd %xmm3, %xmm4
ja 0x66c9a
jmp 0x66cc6
addsd 0x23c2(%rip), %xmm4     # 0x69070
ucomisd %xmm4, %xmm3
jb 0x66cc6
movsd 0x23ac(%rip), %xmm1     # 0x69068
addsd %xmm1, %xmm3
ucomisd %xmm4, %xmm3
jae 0x66cbc
ucomisd %xmm0, %xmm3
setae %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x112(%rsi)
addq $0x8, %rsi
movl 0x18(%rbx), %edx
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf572
leaq 0x30(%rbx), %rsi
movl 0x40(%rbx), %edx
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf53c
xorl %r12d, %r12d
movq %r12, 0xa8(%rbx)
movq %r12, 0xc0(%rbx)
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r15
movaps %xmm0, (%r15)
movl 0x18(%rbx), %edx
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf572
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movl 0x40(%rbx), %edx
leaq -0x30(%rbp), %rsi
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf53c
movq %r12, 0xc0(%rbx)
movq %r12, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movl $0x64, 0x70(%rbx)
callq 0x34c60
leaq 0x681b(%rip), %rsi      # 0x6d8c4
movq %rax, %rdi
callq 0x34e74
movq %rax, %r15
movq 0x8(%r14), %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x670dc
addq $0x10, %r14
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r14, %rsi
callq 0xe974
leaq 0x6807(%rip), %rsi      # 0x6d8ea
movq %r15, %rdi
callq 0x67dd8
movq %rax, %r14
movl 0x11c(%rbx), %ebx
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x67110
leaq 0x210(%r14), %rdi
movl %ebx, %esi
callq 0x9880
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x67153
movq %r14, %rbx
addq $0x210, %rbx            # imm = 0x210
movq 0x210(%r14), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movsd 0x6556(%rip), %xmm0     # 0x6d6e8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %esi
xorl %edi, %edi
cmpb $0x1, 0x11e2(%rcx,%rdi)
jne 0x671df
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 0x671df
movapd %xmm1, %xmm0
movl %esi, %eax
incl %esi
addq $0x178, %rdi            # imm = 0x178
cmpq $0x1028, %rdi           # imm = 0x1028
jne 0x6719e
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movsd 0x6534(%rip), %xmm0     # 0x6d738
xorl %eax, %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %esi
movq $-0x1028, %rdi          # imm = 0xEFD8
cmpb $0x1, 0x11e2(%rcx,%rdi)
jne 0x67259
movsd 0x10d8(%rcx,%rdi), %xmm1
movsd 0x10e0(%rcx,%rdi), %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 0x67259
movapd %xmm1, %xmm0
movl %esi, %eax
cmpb $0x1, 0x220a(%rcx,%rdi)
jne 0x6729b
movsd 0x2100(%rcx,%rdi), %xmm1
movsd 0x2108(%rcx,%rdi), %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 0x6729b
movapd %xmm1, %xmm0
movl %edx, %eax
decl %edx
incl %esi
addq $0x178, %rdi            # imm = 0x178
jne 0x67217
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
xorl %ecx, %ecx
movl $0x3d, %edx
leal (%rdx,%rcx), %r9d
cmpl $0x7a, %r9d
jge 0x6770e
movl %r9d, %esi
shrl $0x1f, %esi
addl %r9d, %esi
sarl %esi
leal 0x1(%rsi), %r10d
movslq %esi, %r8
leaq (%r8,%r8,2), %r8
leaq (%rax,%r8,8), %r8
movsd (%r8), %xmm3
ucomisd %xmm3, %xmm0
jb 0x67647
movslq %r10d, %r11
leaq (%r11,%r11,2), %r11
movsd (%rax,%r11,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x67718
incl %r9d
cmpl $0x2, %r9d
jbe 0x6773a
ucomisd %xmm0, %xmm3
ja 0x6765f
movl %r10d, %ecx
movl %edx, %esi
movl %esi, %edx
cmpl %esi, %ecx
jle 0x675fd
movq 0x1c984(%rip), %rbx     # 0x83ff0
leaq 0x6288(%rip), %rsi      # 0x6d8fb
movl $0x14, %edx
movq %rbx, %rdi
movapd %xmm0, -0x20(%rbp)
callq 0x9560
leaq 0x5b06(%rip), %rsi      # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x169, %esi            # imm = 0x169
callq 0x9880
movq %rax, %rbx
leaq 0x3da7(%rip), %rsi      # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x624c(%rip), %rsi      # 0x6d910
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movapd -0x20(%rbp), %xmm0
callq 0x97d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
xorpd %xmm0, %xmm0
jmp 0x67740
movsd 0x37d0(%rdi), %xmm0
jmp 0x67740
movapd %xmm0, %xmm2
subsd %xmm3, %xmm2
movapd 0x18e8(%rip), %xmm3     # 0x69010
andpd %xmm3, %xmm2
subsd %xmm1, %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm2, %xmm0
jbe 0x67747
movsd 0x10(%r8), %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq (%rax,%r11,8), %rax
movsd 0x10(%rax), %xmm0
jmp 0x67740
// File: /workspace/github_cpp_makefile_star2_O3/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
xorl %eax, %eax
movl $0x3e, %ecx
movapd 0x1854(%rip), %xmm4     # 0x69010
movsd 0x1f7c(%rip), %xmm1     # 0x69740
leal (%rcx,%rax), %edx
addl $-0x7c, %edx
cmpl $-0x7d, %edx
jb 0x6780e
leal (%rcx,%rax), %esi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
movl %edx, %esi
leaq (%rsi,%rsi,2), %rsi
movsd (%rdi,%rsi,8), %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
andpd %xmm4, %xmm3
ucomisd %xmm3, %xmm1
ja 0x678c3
ucomisd %xmm0, %xmm2
ja 0x67808
incl %edx
movl %edx, %eax
jmp 0x6780a
movl %edx, %ecx
cmpl %ecx, %eax
jle 0x677c4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x1c7d5(%rip), %rbx     # 0x83ff0
leaq 0x60d9(%rip), %rsi      # 0x6d8fb
movl $0x14, %edx
movq %rbx, %rdi
movsd %xmm0, -0x10(%rbp)
callq 0x9560
leaq 0x5957(%rip), %rsi      # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x143, %esi            # imm = 0x143
callq 0x9880
movq %rax, %rbx
leaq 0x3bf8(%rip), %rsi      # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x609d(%rip), %rsi      # 0x6d910
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x97d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movsd -0x10(%rbp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq (%rdi,%rsi,8), %rax
movsd 0x8(%rax), %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::GetSelfVelFromSightDelay(int)
Vector WorldStateUpdater::GetSelfVelFromSightDelay(int sight_delay) {
  Assert(sight_delay >= 0 && sight_delay <= HistoryState::HISTORY_SIZE);

  if (sight_delay == 0) {
    return GetSelf().GetVel();
  } else {
    sight_delay = Min(sight_delay, int(HistoryState::HISTORY_SIZE));
    const PlayerState &player =
        mpWorldState->GetHistory(sight_delay)->GetTeammate(mSelfUnum);
    return player.GetVel()
        .Rotate(-player.GetNeckGlobalDir())
        .Rotate(GetNeckGlobalDirFromSightDelay(sight_delay));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x67a77
cmpl $0xa, %esi
movl $0xa, %ecx
cmovll %esi, %ecx
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movslq %ecx, %r15
imulq $0x66666667, %r15, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %r15d
movl 0x14b90(%rax), %ecx
subl %r15d, %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq $0x2128, %rcx, %rcx     # imm = 0x2128
addq %rax, %rcx
movslq 0x14(%rbx), %rax
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $-0xd0, %rdi
leaq (%rax,%rcx), %r14
addq $-0xa0, %r14
callq 0x59a22
xorps 0x16a2(%rip), %xmm0     # 0x69020
leaq -0x38(%rbp), %rsi
movlps %xmm0, (%rsi)
movq %r14, %rdi
callq 0x3268c
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movl 0x14b90(%rax), %ecx
subl %r15d, %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movslq %ecx, %rcx
imulq $0x2128, %rcx, %r15     # imm = 0x2128
addq %rax, %r15
movslq 0x14(%rbx), %r12
callq 0x49360
movq %rax, %r14
callq 0x49360
imulq $0x178, %r12, %rcx      # imm = 0x178
movsd -0x38(%rcx,%r15), %xmm1
maxsd 0x3168(%r14), %xmm1
movsd 0x3160(%rax), %xmm0
minsd %xmm1, %xmm0
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
addsd -0x20(%rcx,%rax), %xmm0
mulsd 0x1629(%rip), %xmm0     # 0x69050
divsd 0x1619(%rip), %xmm0     # 0x69048
leaq -0x48(%rbp), %rbx
leaq -0x40(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x92d0
movsd (%rbx), %xmm1
movsd (%r14), %xmm2
movsd -0x28(%rbp), %xmm3
movapd %xmm3, %xmm0
mulsd %xmm1, %xmm3
movsd -0x30(%rbp), %xmm4
mulsd %xmm4, %xmm1
mulsd %xmm2, %xmm0
subsd %xmm1, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm3, %xmm1
jmp 0x67a98
movslq 0x14(%rbx), %rax
movq 0x8(%rbx), %rcx
imulq $0x178, %rax, %rax      # imm = 0x178
movsd -0xa0(%rax,%rcx), %xmm0
movsd -0x98(%rax,%rcx), %xmm1
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/PlayerParam.h
// Function: PlayerParam::ConvertMarkDist(double)
double ConvertMarkDist(double dist) {
    Assert(dist >= 0);
    int low = 0;
    int middle = 0;
    int high = MARKSIZE;

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

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

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

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

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

// Assembly:
addq $0x37d8, %rdi           # imm = 0x37D8
xorl %eax, %eax
movl $0x184, %ecx            # imm = 0x184
movapd 0x1554(%rip), %xmm4     # 0x69010
movsd 0x1c7c(%rip), %xmm1     # 0x69740
leal (%rcx,%rax), %edx
addl $0xfffffcf8, %edx       # imm = 0xFFFFFCF8
cmpl $0xfffffcf7, %edx       # imm = 0xFFFFFCF7
jb 0x67b14
leal (%rcx,%rax), %esi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
movl %edx, %esi
leaq (%rsi,%rsi,2), %rsi
movsd (%rdi,%rsi,8), %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
andpd %xmm4, %xmm3
ucomisd %xmm3, %xmm1
ja 0x67bc9
ucomisd %xmm0, %xmm2
ja 0x67b0e
incl %edx
movl %edx, %eax
jmp 0x67b10
movl %edx, %ecx
cmpl %ecx, %eax
jle 0x67ac4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x1c4cf(%rip), %rbx     # 0x83ff0
leaq 0x5dd3(%rip), %rsi      # 0x6d8fb
movl $0x14, %edx
movq %rbx, %rdi
movsd %xmm0, -0x10(%rbp)
callq 0x9560
leaq 0x5651(%rip), %rsi      # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x186, %esi            # imm = 0x186
callq 0x9880
movq %rax, %rbx
leaq 0x38f2(%rip), %rsi      # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x5d97(%rip), %rsi      # 0x6d910
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x97d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movsd -0x10(%rbp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq (%rdi,%rsi,8), %rax
movsd 0x8(%rax), %xmm0
retq
nop