LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::Condition::OptimizeConditionTree()
void Trainer::Condition::OptimizeConditionTree() {
  for (std::vector<Trainer::Condition>::iterator it = mSubCondition.begin();
       it != mSubCondition.end();) {
    if (it->mType == ET_Null && it->mSubCondition.empty()) //删除其空子条件
    {
      it = mSubCondition.erase(it);
    } else {
      it->OptimizeConditionTree();
      it++;
    }
  }
  if (mType == ET_Null) {
    if (mSubCondition.size() == 1) //子条件仅有1个时，提升
    {
      Trainer::Condition &sc = mSubCondition[0];
      mType = sc.mType;
      mArg1 = sc.mArg1;
      mArg2 = sc.mArg2;
      mSubCondition = sc.mSubCondition;
    } else {
      PRINT_ERROR("error condition relationship");
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq 0x18(%rdi), %r15
cmpq 0x20(%r14), %r15
je 0x45237
cmpl $0x0, (%r15)
jne 0x45219
movq 0x18(%r15), %rax
cmpq 0x20(%r15), %rax
je 0x45227
movq %r15, %rdi
callq 0x451ee
addq $0x58, %r15
jmp 0x45203
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45efe
movq %rax, %r15
jmp 0x45203
cmpl $0x0, (%r14)
je 0x45248
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
subq %rsi, %r15
cmpq $0x58, %r15
jne 0x45285
movl (%rsi), %eax
movl %eax, (%r14)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%r14)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%r14)
addq $0x18, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x45f08
movq 0x31d64(%rip), %rdi     # 0x76ff0
leaq 0x15b27(%rip), %rsi     # 0x5adba
callq 0x94b0
leaq 0x15ed3(%rip), %rsi     # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x283, %esi            # imm = 0x283
callq 0x9890
leaq 0x14164(%rip), %rsi     # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x15cfc(%rip), %rsi     # 0x5afc6
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x99e8
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::ReadConverseConf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Trainer::ReadConverseConf(const std::string &str) {
  stringstream sin;
  sin.str(str);
  int i = 1;
  for (; i <= TEAMSIZE && sin >> mTm2Opp[i]; mOpp2Tm[mTm2Opp[i]] = i, ++i)
    ;

  if (i == TEAMSIZE + 1) {
    mConverse = true;
    cout << "Conversely train!!" << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x9360
leaq -0x198(%rbp), %rdi
movq %r14, %rsi
callq 0x9750
leaq 0x38(%rbx), %r15
pushq $0x1
popq %r12
xorl %r13d, %r13d
leaq -0x1b0(%rbp), %r14
cmpq $0x2c, %r13
je 0x4535e
leaq (%r15,%r13), %rsi
movq %r14, %rdi
callq 0x92f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4537d
movslq 0x38(%rbx,%r13), %rax
movl %r12d, 0x64(%rbx,%rax,4)
addq $0x4, %r13
incl %r12d
jmp 0x4532b
movb $0x1, 0x33(%rbx)
movq 0x31c57(%rip), %rdi     # 0x76fc0
leaq 0x15e75(%rip), %rsi     # 0x5b1e5
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
leaq -0x1b0(%rbp), %rdi
callq 0x9390
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4539f
jmp 0x4539f
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x9390
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::FindValidPoint(bool)
Vector Trainer::FindValidPoint(bool isLeft) {
  Vector tmp;
  tmp.SetX(isLeft ? ServerParam::instance().PITCH_LENGTH / 2 - 0.1
                  : -ServerParam::instance().PITCH_LENGTH / 2 + 0.1);
  do {
    for (double y = -6.5; y < 6.5; y += 0.1) {
      tmp.SetY(y);
      if (mpAgent->GetWorldState()
              .GetPlayer(mpAgent->Info()
                             .GetPositionInfo()
                             .GetClosePlayerToPoint(tmp)
                             .front())
              .GetPos()
              .Dist(tmp) > 1.0) {
        return tmp;
      }
    }
    tmp.SetX(tmp.X() + 0.5);
  } while (1);
  Assert(0);
  return Vector(0.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %rbx
andq $0x0, -0x30(%rbp)
callq 0x3db2c
leaq 0x143e4(%rip), %rax     # 0x59ec8
movsd (%rax), %xmm0
mulsd 0x11d58(%rip), %xmm0    # 0x57848
movsd 0x12a98(%rip), %xmm1    # 0x58590
testl %r14d, %r14d
jne 0x45b07
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x45b0f
addsd 0x12a89(%rip), %xmm0    # 0x58598
movsd 0x15111(%rip), %xmm1    # 0x5ac28
leaq -0x68(%rbp), %r14
leaq -0x38(%rbp), %r15
leaq -0x3c(%rbp), %r12
movsd %xmm0, -0x38(%rbp)
movapd %xmm1, %xmm2
movsd 0x150fc(%rip), %xmm0    # 0x5ac30
ucomisd %xmm2, %xmm0
jbe 0x45bfe
movsd %xmm2, -0x48(%rbp)
movsd %xmm2, -0x30(%rbp)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r13
movq 0x20(%rax), %rdi
callq 0x244e8
andl $0x0, -0x3c(%rbp)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x3c024
movq -0x68(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x45b8c
decl %eax
imulq $0x178, %rax, %rax      # imm = 0x178
addq %r13, %rax
addq $0xa8, %rax
jmp 0x45ba0
notl %eax
cltq
imulq $0x178, %rax, %rax      # imm = 0x178
addq %r13, %rax
addq $0x10d0, %rax           # imm = 0x10D0
movsd 0x8(%rax), %xmm0
movsd 0x10(%rax), %xmm1
subsd -0x38(%rbp), %xmm0
subsd -0x30(%rbp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
movq %r14, %rdi
callq 0x13008
movsd -0x50(%rbp), %xmm0
ucomisd 0x1146a(%rip), %xmm0    # 0x57048
ja 0x45c10
movsd 0x129a8(%rip), %xmm0    # 0x58590
movsd -0x48(%rbp), %xmm2
addsd %xmm0, %xmm2
movsd 0x1502f(%rip), %xmm1    # 0x5ac28
jmp 0x45b2c
movsd -0x38(%rbp), %xmm0
addsd 0x11c3d(%rip), %xmm0    # 0x57848
jmp 0x45b23
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
addq $0x48, %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/Parser.h
// Function: Parser::IsEarOnOk()
bool IsEarOnOk() {
    bool ret;
    mOkMutex.Lock();
    ret = mEarOnOk;
    mOkMutex.UnLock();
    return ret;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x4206e
movb 0x50(%rbx), %bl
movq %r14, %rdi
callq 0x4208a
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/UDPSocket.cpp
// Function: UDPSocket::Receive(char*)
int UDPSocket::Receive(char *msg) {
#ifdef WIN32
  int servlen;
#else
  socklen_t servlen;
#endif

  sockaddr_in serv_addr;
  servlen = sizeof(serv_addr);
  int n =
      recvfrom(mSockfd, msg, MAX_MESSAGE, 0, (sockaddr *)&serv_addr, &servlen);
  if (n > 0) {
    msg[n] = '\0'; // rccparser will crash if msg has no end
    mAddress.sin_port = serv_addr.sin_port;
  }

  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x14(%rbp), %r9
movl $0x10, (%r9)
movl 0x14(%rdi), %edi
leaq -0x24(%rbp), %r8
movl $0x2000, %edx           # imm = 0x2000
xorl %ecx, %ecx
callq 0x93b0
testl %eax, %eax
jle 0x473de
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movb $0x0, (%r14,%rcx)
movzwl -0x22(%rbp), %ecx
movw %cx, 0x6(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/UDPSocket.cpp
// Function: UDPSocket::Send(char const*)
int UDPSocket::Send(const char *msg) {
  if (mIsInitialOK == true) {
    int n = std::strlen(msg);
    n = sendto(mSockfd, msg, n + 1, 0, (sockaddr *)&mAddress, sizeof(mAddress));
    return n;
  }

  std::cout << msg << std::endl;
  return std::strlen(msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpb $0x1, (%rdi)
jne 0x47422
movq %rdi, %r14
movq %rbx, %rdi
callq 0x9210
movl 0x14(%r14), %edi
incl %eax
movslq %eax, %rdx
addq $0x4, %r14
pushq $0x10
popq %r9
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x9090
jmp 0x47441
movq 0x2fb97(%rip), %rdi     # 0x76fc0
movq %rbx, %rsi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
movq %rbx, %rdi
callq 0x9210
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: GetRealTimeParser()
timeval GetRealTimeParser() {
  if (PlayerParam::instance().DynamicDebugMode() == true) {
    return DynamicDebug::instance().GetTimeParser();
  }

  timeval time_val = GetRealTime();
  DynamicDebug::instance().AddTimeParser(time_val);
  return time_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x38d94
cmpb $0x1, 0x5c40(%rax)
jne 0x47493
callq 0x1d7c4
movq %rax, %rdi
callq 0x1e674
jmp 0x474ba
callq 0x47448
leaq -0x18(%rbp), %rbx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
callq 0x1d7c4
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1db80
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: GetRealTimeDecision()
timeval GetRealTimeDecision() {
  if (PlayerParam::instance().DynamicDebugMode() == true) {
    return DynamicDebug::instance().GetTimeDecision();
  }

  timeval time_val = GetRealTime();
  DynamicDebug::instance().AddTimeDecision(time_val);
  return time_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x38d94
cmpb $0x1, 0x5c40(%rax)
jne 0x474e7
callq 0x1d7c4
movq %rax, %rdi
callq 0x1e6a2
jmp 0x4750e
callq 0x47448
leaq -0x18(%rbp), %rbx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
callq 0x1d7c4
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1dbc2
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: GetRealTimeCommandSend()
timeval GetRealTimeCommandSend() {
  if (PlayerParam::instance().DynamicDebugMode() == true) {
    return DynamicDebug::instance().GetTimeCommandSend();
  }

  timeval time_val = GetRealTime();
  DynamicDebug::instance().AddTimeCommandSend(time_val);
  return time_val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x38d94
cmpb $0x1, 0x5c40(%rax)
jne 0x4753b
callq 0x1d7c4
movq %rax, %rdi
callq 0x1e6d0
jmp 0x47562
callq 0x47448
leaq -0x18(%rbp), %rbx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
callq 0x1d7c4
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1dc06
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: RealTime::operator+(int) const
RealTime RealTime::operator+(int msec) const {
  int usec = GetUsec() + msec * 1000;
  if (usec >= ONE_MILLION) {
    return RealTime(GetSec() + usec / ONE_MILLION, usec % ONE_MILLION);
  } else {
    return RealTime(GetSec(), usec);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
imull $0x3e8, %esi, %eax      # imm = 0x3E8
addl 0x8(%rdi), %eax
movslq %eax, %rdx
movq (%rdi), %rcx
cmpl $0xf4240, %edx          # imm = 0xF4240
jl 0x475c5
movl $0xf4240, %esi          # imm = 0xF4240
movq %rdx, %rax
xorl %edx, %edx
divq %rsi
addq %rax, %rcx
movq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: RealTime::operator-(int) const
RealTime RealTime::operator-(int msec) const {
  int usec = GetUsec() - msec * 1000;
  if (usec < 0) {
    usec = -usec;
    return RealTime(GetSec() - usec / ONE_MILLION - 1,
                    ONE_MILLION - usec % ONE_MILLION);
  } else {
    return RealTime(GetSec(), usec);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
imull $0xfffffc18, %esi, %eax # imm = 0xFFFFFC18
addl 0x8(%rdi), %eax
js 0x475de
movq (%rdi), %rcx
jmp 0x475f5
negl %eax
movl $0xf4240, %esi          # imm = 0xF4240
xorl %edx, %edx
divl %esi
notl %eax
movslq %eax, %rcx
addq (%rdi), %rcx
subl %edx, %esi
movl %esi, %eax
movl %eax, %edx
movq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: RealTime::operator<(RealTime const&) const
bool RealTime::operator<(const RealTime &t) const {
  if (GetSec() < t.GetSec())
    return true;
  if (GetSec() == t.GetSec() && GetUsec() < t.GetUsec())
    return true;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rcx
movb $0x1, %al
cmpq %rcx, (%rdi)
jl 0x47660
jne 0x4765e
movq 0x8(%rdi), %rcx
cmpq 0x8(%rsi), %rcx
jl 0x47660
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: Time::operator-(Time const&) const
int Time::operator-(const Time &a) const {
  if (mT == a.T()) {
    return mS - a.S();
  } else {
    return mT - a.T() + mS; //实际可能差更多,不准
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
subl (%rsi), %eax
jne 0x4771e
movl 0x4(%rdi), %eax
subl 0x4(%rsi), %eax
jmp 0x47721
addl 0x4(%rdi), %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: ServerPlayModeMap::Bind(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ServerPlayMode)
void ServerPlayModeMap::Bind(const std::string &str, ServerPlayMode spm) {
  Assert(mString2Enum.count(str) == 0);
  Assert(mEnum2String.count(spm) == 0);

  mString2Enum[str] = spm;
  mEnum2String[spm] = str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x24(%rbp), %r12
movl %edx, (%r12)
callq 0x485f8
movl %ebx, (%rax)
addq $0x30, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x48662
movq %rax, %rdi
movq %r14, %rsi
callq 0x92b0
addq $0x10, %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/Utilities.cpp
// Function: ServerPlayModeMap::GetServerPlayMode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ServerPlayMode ServerPlayModeMap::GetServerPlayMode(const std::string &str) {
  // special case: server 发过来的是 goal_[lr]_[[:digit:]]
  if (strncmp(str.c_str(), "goal_l", strlen("goal_l")) == 0) {
    return mString2Enum["goal_l"];
  } else if (strncmp(str.c_str(), "goal_r", strlen("goal_r")) == 0) {
    return mString2Enum["goal_r"];
  } else if (mString2Enum.count(str)) {
    return mString2Enum[str];
  } else {
    Assert(!"server playmode error");
    return SPM_Null;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
leaq 0x12271(%rip), %rsi     # 0x5a748
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x9260
testl %eax, %eax
je 0x4851b
leaq 0x12268(%rip), %rsi     # 0x5a755
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x9260
testl %eax, %eax
je 0x4853d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4871e
testq %rax, %rax
je 0x48575
movq %rbx, %rdi
movq %r14, %rsi
callq 0x485f8
movl (%rax), %ebx
jmp 0x48568
leaq 0x12226(%rip), %rsi     # 0x5a748
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x10e4a
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x486b4
jmp 0x4855d
leaq 0x12211(%rip), %rsi     # 0x5a755
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x10e4a
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x486b4
movl (%rax), %ebx
leaq -0x40(%rbp), %rdi
callq 0x9240
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x48568
jmp 0x4857d
jmp 0x4858b
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x9240
jmp 0x4858e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Utilities.cpp
// Function: ServerPlayModeMap::GetPlayModeString(ServerPlayMode)
const char *ServerPlayModeMap::GetPlayModeString(ServerPlayMode spm) {
  if (mEnum2String.count(spm)) {
    return mEnum2String[spm].c_str();
  } else {
    return "";
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0xc(%rbp), %rax
movl %esi, (%rax)
addq $0x30, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x48742
testq %rax, %rax
je 0x485ca
leaq -0xc(%rbp), %rsi
movq %rbx, %rdi
callq 0x48662
movq (%rax), %rax
jmp 0x485d1
leaq 0x1018f(%rip), %rax     # 0x58760
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::VisualSystem()
VisualSystem::VisualSystem() {
  mCanForceChangeViewWidth = false;
  mIsSearching = false;
  mIsCritical = false;
  mForbidden = false;
  mForceToSeeObject.bzero();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2db7c(%rip), %rax     # 0x76cd8
movq %rax, (%rdi)
addq $0x30, %rdi
callq 0x4c00a
andl $0x0, 0x610(%rbx)
andq $0x0, 0x618(%rbx)
leaq 0x610(%rbx), %rax
movq %rax, 0x620(%rbx)
movq %rax, 0x628(%rbx)
andq $0x0, 0x630(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x650(%rbx)
andq $0x0, 0x670(%rbx)
movups %xmm0, 0x660(%rbx)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x678(%rbx)
leaq 0x680(%rbx), %rdi
movl $0xb48, %edx            # imm = 0xB48
xorl %esi, %esi
callq 0x92c0
xorps %xmm0, %xmm0
movups %xmm0, 0x5f0(%rbx)
andq $0x0, 0x5ff(%rbx)
andl $0x0, 0x638(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::Initial(Agent*)
void VisualSystem::Initial(Agent *agent) {
  mpAgent = agent;
  mpWorldState = &(agent->World());
  mpInfoState = &(agent->Info());
  mpBallState = &(agent->World().Ball());
  mpSelfState = &(agent->Self());

  mVisualRequest.GetOfBall().mpObject = mpBallState;
  mVisualRequest.GetOfBall().mUnum = 0;

  for (Unum i = 1; i <= TEAMSIZE; ++i) {
    mVisualRequest.GetOfTeammate(i).mpObject = &(mpWorldState->GetTeammate(i));
    mVisualRequest.GetOfOpponent(i).mpObject = &(mpWorldState->GetOpponent(i));
    mVisualRequest.GetOfTeammate(i).mUnum = i;
    mVisualRequest.GetOfOpponent(i).mUnum = -i;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x20(%rsi), %rcx
movq %rcx, 0x28(%rdi)
addq $0x30, %rax
movq %rax, 0x18(%rdi)
movq %rsi, %rdi
callq 0x10d5e
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movq %rax, 0x60(%rbx)
andl $0x0, 0x68(%rbx)
movl $0x10d0, %eax           # imm = 0x10D0
addq 0x10(%rbx), %rax
pushq $-0x1
popq %rcx
movq $-0x2c0, %rdx           # imm = 0xFD40
pushq $0x1
popq %rsi
testq %rdx, %rdx
je 0x49337
leaq -0x1028(%rax), %rdi
movq %rdi, 0x360(%rbx,%rdx)
movq %rax, 0x620(%rbx,%rdx)
movl %esi, 0x368(%rbx,%rdx)
movl %ecx, 0x628(%rbx,%rdx)
decl %ecx
addq $0x40, %rdx
incl %esi
addq $0x178, %rax            # imm = 0x178
jmp 0x492fd
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::ResetVisualRequest()
void VisualSystem::ResetVisualRequest() {
  mCanTurn = false;
  mSenseBallCycle = 0;

  if (mpAgent->IsNewSight()) { //有新视觉才重置，否则维持上周期的结果
    mCanForceChangeViewWidth = false;
    mIsSearching = false;
    mIsCritical = false;
    mForbidden = false;

    for (Unum i = -TEAMSIZE; i <= TEAMSIZE; ++i) {
      mVisualRequest[i].Clear();
    }

    mHighPriorityPlayerSet.clear();
    mForceToSeeObject.bzero();
  }

  if (mpSelfState->GetPosConf() < FLOAT_EPS) {
    mIsCritical = true;
    mCanForceChangeViewWidth = false;
  }
  if (mpBallState->GetPosConf() < FLOAT_EPS) {
    RaiseForgotObject(0);
  }

  ViewModeDecision();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x63c(%rdi)
andl $0x0, 0x11c8(%rdi)
movq 0x8(%rdi), %rax
cmpb $0x1, 0x28(%rax)
jne 0x493c3
andl $0x0, 0x638(%rbx)
leaq 0x30(%rbx), %rax
pushq $-0xb
popq %rcx
pushq $0x16
popq %rdx
movabsq $0x4059000000000000, %rsi # imm = 0x4059000000000000
cmpl $-0x1, %edx
je 0x493a5
movl %ecx, %edi
movl %edx, %r8d
testl %ecx, %ecx
cmovnsq %rdi, %r8
shlq $0x6, %r8
movb $0x0, 0x10(%rax,%r8)
movq %rsi, 0x18(%rax,%r8)
andq $0x0, 0x28(%rax,%r8)
incl %ecx
decl %edx
jmp 0x4937a
leaq 0x608(%rbx), %rdi
callq 0x4c150
xorps %xmm0, %xmm0
movups %xmm0, 0x5f0(%rbx)
andq $0x0, 0x5ff(%rbx)
movq 0x20(%rbx), %rax
movsd 0xdc71(%rip), %xmm0     # 0x57040
ucomisd 0x20(%rax), %xmm0
jbe 0x493df
movw $0x1, 0x638(%rbx)
movq 0x18(%rbx), %rax
ucomisd 0x20(%rax), %xmm0
jbe 0x493f8
movb $0x1, %al
movb %al, 0x63a(%rbx)
movb %al, 0x5f0(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x49456
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::RaiseForgotObject(int)
void VisualSystem::RaiseForgotObject(ObjectIndex unum) {
  mIsSearching = true;

  if (unum == 0) {
    mForceToSeeObject.GetOfBall() = true;
  } else {
    mHighPriorityPlayerSet.insert(GetVisualRequest(unum));
  }
}

// Assembly:
movb $0x1, 0x63a(%rdi)
testl %esi, %esi
je 0x4944e
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x608(%rdi), %rax
movl %esi, %ecx
pushq $0xb
popq %rdx
subl %esi, %edx
testl %esi, %esi
cmovnsq %rcx, %rdx
shlq $0x6, %rdx
leaq (%rdi,%rdx), %rcx
addq $0x30, %rcx
leaq -0x8(%rbp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x4c31a
addq $0x10, %rsp
popq %rbp
retq
movb $0x1, 0x5f0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::ViewModeDecision()
void VisualSystem::ViewModeDecision() {
  ChangeViewWidth(mpSelfState->GetViewWidth());

  if (mpAgent->IsNewSight() == false) {
    ChangeViewWidth(mpSelfState->GetViewWidth());
    return;
  }

  if (mpWorldState->GetPlayMode() != PM_Before_Kick_Off) {
    double balldis = mpInfoState->GetPositionInfo().GetBallDistToTeammate(
        mpSelfState->GetUnum());
    if (balldis > 60.0) {
      ChangeViewWidth(VW_Wide);
    } else if (balldis > 40.0) {
      ChangeViewWidth(VW_Normal);
    } else {
      ChangeViewWidth(VW_Narrow);
    }
  } else {
    ChangeViewWidth(VW_Narrow);
  }
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rcx
movl 0x118(%rcx), %ecx
movl %ecx, 0x640(%rdi)
cmpb $0x1, 0x28(%rax)
jne 0x494d0
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpl $0x16, 0x1c(%rax)
jne 0x49487
pushq $0x1
jmp 0x494b2
movq 0x28(%rbx), %rdi
callq 0x244e8
movq 0x20(%rbx), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
callq 0x3ba7a
movsd (%rax), %xmm0
ucomisd 0x10962(%rip), %xmm0    # 0x59e10
jbe 0x494b5
pushq $0x3
popq %rax
jmp 0x494c4
xorl %eax, %eax
ucomisd 0xfa89(%rip), %xmm0     # 0x58f48
seta %al
incl %eax
movl %eax, 0x640(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::Decision()
void VisualSystem::Decision() {
  if (mpAgent->GetActionEffector().IsTurnNeck())
    return; //其他地方已经产生了转脖子动作
  if (mForbidden)
    return;

  if (!DealWithSetPlayMode()) {
    DoDecision();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xd670
cmpb $0x0, 0xe93(%rax)
jne 0x49502
cmpb $0x0, 0x63b(%rbx)
jne 0x49502
movq %rbx, %rdi
callq 0x49518
testb %al, %al
je 0x49509
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x496b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::DoDecision()
void VisualSystem::DoDecision() {
  if (!mpAgent->IsNewSight()) {
    if (mCanForceChangeViewWidth) {
      mViewWidth = VW_Narrow; //重置为窄视角
    } else {
      mViewWidth = mpSelfState->GetViewWidth();
    }
  }

  DoInfoGather();          //提请求
  EvaluateVisualRequest(); //评价

  if (!ForceSearchBall()) {
    DealVisualRequest(); //处理请求
    DoVisualExecute();   //视觉执行
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpb $0x0, 0x28(%rax)
jne 0x496e1
cmpb $0x0, 0x639(%rbx)
je 0x496d1
pushq $0x1
popq %rax
jmp 0x496db
movq 0x20(%rbx), %rax
movl 0x118(%rax), %eax
movl %eax, 0x640(%rbx)
movq %rbx, %rdi
callq 0x49e5c
movq %rbx, %rdi
callq 0x49bc4
movq %rbx, %rdi
callq 0x4bc08
testb %al, %al
je 0x49704
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x4971a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b678
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::SetVisualRing()
void VisualSystem::SetVisualRing() {
  mVisualRing.Clear();

  for (int i = -TEAMSIZE; i <= TEAMSIZE; ++i) {
    const VisualRequest &visual_request = mVisualRequest[i];

    if (!visual_request.mValid)
      continue;

    for (double dir = -5.0; dir <= 5.0; dir += 1.0) {
      mVisualRing.Score(visual_request.mPrePos.Dir() - mPreBodyDir + dir) +=
          visual_request.mScore / 11.0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x680(%rdi), %r14
movl $0xb48, %edx            # imm = 0xB48
movq %r14, %rdi
xorl %esi, %esi
callq 0x92c0
leaq 0x30(%rbx), %rax
movq %rax, -0x30(%rbp)
pushq $-0xb
popq %r13
leaq -0x48(%rbp), %r15
cmpl $0xc, %r13d
je 0x499bb
movl %r13d, %eax
pushq $0xb
popq %rcx
movl %ecx, %r12d
subl %r13d, %r12d
testl %r13d, %r13d
cmovnsq %rax, %r12
shlq $0x6, %r12
movq -0x30(%rbp), %rax
cmpb $0x1, 0x10(%rax,%r12)
jne 0x499b3
addq -0x30(%rbp), %r12
movsd 0xe97d(%rip), %xmm1     # 0x582c8
movsd 0xe045(%rip), %xmm0     # 0x57998
ucomisd %xmm1, %xmm0
jb 0x499b3
movsd 0x28(%r12), %xmm0
divsd 0x11c70(%rip), %xmm0    # 0x5b5d8
movsd %xmm0, -0x40(%rbp)
movq %r12, %rdi
movsd %xmm1, -0x38(%rbp)
callq 0xcd30
subsd 0x648(%rbx), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4beb4
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
addsd 0xd697(%rip), %xmm1     # 0x57048
jmp 0x4994b
incl %r13d
jmp 0x49912
addq $0x28, %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/VisualSystem.cpp
// Function: VisualSystem::RaiseBall(double)
void VisualSystem::RaiseBall(double eva) {
  const Strategy &strategy = mpAgent->GetStrategy();

  if (mpWorldState->GetPlayMode() < PM_Our_Mode &&
      mpWorldState->GetPlayMode() > PM_Play_On) {
    eva = Min(2.0, eva);
  }

  if (eva < FLOAT_EPS) {
    if (strategy.IsBallFree() && mpWorldState->GetPlayMode() == PM_Play_On) {
      if (mpBallState->GetVelDelay() <=
          mpWorldState->CurrentTime() -
              strategy.GetLastBallFreeTime()) { //球free后曾看到过球速
        //在球即将不再free时要看球,其他可以不看,但上限是3个周期,其间可以收集些别的信息
        eva =
            Max(Min(strategy.IsMyControl() ? double(strategy.GetMyInterCycle())
                                           : strategy.GetBallFreeCycleLeft(),
                    3.0),
                1.0);
      } else { //球free后还未看到过球速
        eva = 1.0;
        SetForceSeeBall();
      }
    } else if (strategy.IsTmControl()) {
      double ball_dis = (mPreBallPos - mPreSelfPos).Mod();
      eva = ball_dis / 20.0 + 1.0;
      eva = Max(eva, 3.0);
    } else {
      double ball_dis = (mPreBallPos - mPreSelfPos).Mod();
      eva = ball_dis / 20.0;
      eva = Max(eva, 2.0);
    }
  }

  mVisualRequest.GetOfBall().mFreq = Min(mVisualRequest.GetOfBall().mFreq, eva);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, -0x20(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xdd50
movsd -0x20(%rbp), %xmm1
movq %rax, %r14
movq 0x10(%rbx), %rdi
movl 0x1c(%rdi), %eax
movsd 0xd458(%rip), %xmm0     # 0x57758
ucomisd %xmm1, %xmm0
ja 0x4a312
leal -0x15(%rax), %ecx
cmpl $-0x14, %ecx
ja 0x4a3ee
movsd 0xcd26(%rip), %xmm0     # 0x57040
ucomisd %xmm1, %xmm0
movapd %xmm1, %xmm0
jbe 0x4a3ee
cmpl $0x1, %eax
jne 0x4a366
cmpb $0x0, 0x41(%r14)
je 0x4a366
movq 0x18(%rbx), %rax
movl 0x40(%rax), %r15d
addq $0x10, %rdi
movq %r14, %rsi
addq $0x54, %rsi
callq 0x4770c
cmpl %eax, %r15d
jle 0x4a3b7
movq %rbx, %rdi
callq 0x4a404
movsd 0xcce7(%rip), %xmm0     # 0x57048
jmp 0x4a3ee
cmpl $0x0, 0x48(%r14)
movsd 0x650(%rbx), %xmm0
movsd 0x658(%rbx), %xmm1
subsd 0x660(%rbx), %xmm0
subsd 0x668(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm1
divsd 0xebb5(%rip), %xmm1     # 0x58f58
jle 0x4a3e2
addsd 0xcc9b(%rip), %xmm1     # 0x57048
movsd 0xd83b(%rip), %xmm0     # 0x57bf0
jmp 0x4a3ea
movq %r14, %rdi
callq 0x3fb02
movzbl %al, %eax
shll $0x5, %eax
cvtsi2sdl 0x44(%r14,%rax), %xmm0
movsd 0xd81c(%rip), %xmm1     # 0x57bf0
minsd %xmm0, %xmm1
movsd 0xcc68(%rip), %xmm0     # 0x57048
jmp 0x4a3ea
movsd 0xd36e(%rip), %xmm0     # 0x57758
maxsd %xmm1, %xmm0
minsd 0x48(%rbx), %xmm0
movsd %xmm0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::DoInfoGatherForGoalie()
void VisualSystem::DoInfoGatherForGoalie() {
  const Strategy &strategy = mpAgent->GetStrategy();

  RaiseBall();
  for (Unum i = 1; i <= TEAMSIZE; i++) {
    if (i != mpSelfState->GetUnum()) {
      RaisePlayer(i, 50);
    }
    RaisePlayer(-i, 50);
  }

  //特殊视觉请求
  if (mpInfoState->GetPositionInfo().GetBallDistToTeammate(
          mpSelfState->GetUnum()) < 26.0) {
    SetForceSeeBall();
    if (strategy.IsOppControl()) {
      RaisePlayer(strategy.GetController(), 2.0);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xdd50
movq %rax, %r14
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x4a2ce
pushq $0x1
popq %r15
pushq $-0x1
popq %r12
cmpl $-0xc, %r12d
je 0x4a876
movq 0x20(%rbx), %rax
cmpl 0x11c(%rax), %r15d
je 0x4a85b
movq %rbx, %rdi
movl %r15d, %esi
movsd 0xd5ea(%rip), %xmm0     # 0x57e40
callq 0x4a0b4
movq %rbx, %rdi
movl %r12d, %esi
movsd 0xd5d7(%rip), %xmm0     # 0x57e40
callq 0x4a0b4
incl %r15d
decl %r12d
jmp 0x4a835
movq 0x28(%rbx), %rdi
callq 0x244e8
movq 0x20(%rbx), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
callq 0x3ba7a
movsd 0x10d47(%rip), %xmm0    # 0x5b5e0
ucomisd (%rax), %xmm0
jbe 0x4a8af
movq %rbx, %rdi
callq 0x4a404
movl 0x48(%r14), %esi
testl %esi, %esi
js 0x4a8b8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsd 0xce98(%rip), %xmm0     # 0x57758
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4a0b4
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::DoVisualExecute()
void VisualSystem::DoVisualExecute() {
  mBestVisualAction.mDir = GetNormalizeAngleDeg(mBestVisualAction.mDir);

  AngleDeg finalnec = GetNormalizeAngleDeg(
      mBestVisualAction.mDir -
      mPreBodyDir); //最后要看的方向与当前（或者说执行过本周期动作后，如turn）身体正对方向的夹角，即最后的neckrelangle。

  if (fabs(finalnec) > ServerParam::instance().maxNeckAngle()) {
    if (mCanTurn) {
      if (finalnec < 0.0) {
        mpAgent->Turn(finalnec - ServerParam::instance().minNeckAngle());
        mpAgent->TurnNeck(ServerParam::instance().minNeckMoment());
      } else {
        mpAgent->Turn(finalnec - ServerParam::instance().maxNeckAngle());
        mpAgent->TurnNeck(ServerParam::instance().maxNeckMoment());
      }
    } else {
      if (finalnec < 0.0) {
        mpAgent->TurnNeck(ServerParam::instance().minNeckMoment());
      } else {
        mpAgent->TurnNeck(ServerParam::instance().maxNeckMoment());
      }
    }
  } else {
    finalnec -= mpSelfState->GetNeckDir();
    mpAgent->TurnNeck(finalnec);
  }

  if (mViewWidth != mpSelfState->GetViewWidth()) {
    mpAgent->ChangeView(mViewWidth);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movsd 0x670(%rdi), %xmm0
movabsq $-0x3f99800000000000, %r15 # imm = 0xC066800000000000
leaq -0x38(%rbp), %r14
movq %r15, (%r14)
movq %r14, %rdi
callq 0xd305
movsd %xmm0, 0x670(%rbx)
subsd 0x648(%rbx), %xmm0
movq %r15, (%r14)
leaq -0x38(%rbp), %rdi
callq 0xd305
movapd 0xb943(%rip), %xmm1     # 0x57010
movapd %xmm0, -0x30(%rbp)
andpd %xmm0, %xmm1
movapd %xmm1, -0x50(%rbp)
callq 0x3db2c
movapd -0x50(%rbp), %xmm0
ucomisd 0x3160(%rax), %xmm0
jbe 0x4b733
movb 0x63c(%rbx), %r15b
movq 0x8(%rbx), %r14
callq 0x3db2c
cmpb $0x1, %r15b
jne 0x4b754
xorpd %xmm1, %xmm1
movapd -0x30(%rbp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x4b769
movsd 0x3168(%rax), %xmm1
subsd %xmm1, %xmm0
movq %r14, %rdi
callq 0xccb0
movq 0x8(%rbx), %r14
callq 0x3db2c
jmp 0x4b75f
movl $0x98, %edi
addq 0x20(%rbx), %rdi
callq 0xd40e
movapd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
movq 0x8(%rbx), %rdi
movapd %xmm1, %xmm0
jmp 0x4b791
xorpd %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x4b786
movsd 0x3158(%rax), %xmm0
jmp 0x4b78e
movsd 0x3160(%rax), %xmm1
subsd %xmm1, %xmm0
movq %r14, %rdi
callq 0xccb0
movq 0x8(%rbx), %r14
callq 0x3db2c
movsd 0x3150(%rax), %xmm0
movq %r14, %rdi
callq 0x4be72
movl 0x640(%rbx), %esi
movq 0x20(%rbx), %rax
cmpl 0x118(%rax), %esi
je 0x4b7b1
movq 0x8(%rbx), %rdi
callq 0x4be96
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::GetBestVisualActionWithViewWidth(ViewWidth, bool)
VisualSystem::VisualAction
VisualSystem::GetBestVisualActionWithViewWidth(ViewWidth view_width,
                                               bool force) {
  if (force || GetSenseBallCycle() >= NewSightComeCycle(view_width)) {
    AngleDeg max_turn_ang = mCanTurn ? mpSelfState->GetMaxTurnAngle() : 0.0;
    AngleDeg half_view_angle = sight::ViewAngle(view_width) * 0.5;
    AngleDeg neck_left_most =
        ServerParam::instance().minNeckAngle() -
        max_turn_ang; //脖子可以到达的极限角度（相对于当前身体正前方而言）
    AngleDeg neck_right_most =
        ServerParam::instance().maxNeckAngle() + max_turn_ang;
    AngleDeg left_most = neck_left_most - half_view_angle;
    AngleDeg right_most = neck_right_most + half_view_angle;

    VisualAction best_visual_action = mVisualRing.GetBestVisualAction(
        left_most, right_most, half_view_angle * 2.0);

    best_visual_action.mScore /= NewSightWaitCycle(view_width);

    Assert(!IsInvalid(best_visual_action.mScore));

    return best_visual_action;
  } else {
    return VisualAction();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movq %rdi, %r14
testl %edx, %edx
jne 0x4ba02
movq %r14, %rdi
callq 0x4bac0
xorl %ecx, %ecx
cmpl $0x2, %ebx
sete %cl
incl %ecx
cmpl $0x3, %ebx
cmovel %ebx, %ecx
movq 0x20(%r14), %rdx
subl 0x18(%rdx), %ecx
cmpl $0x2, %ecx
pushq $0x1
popq %rdx
cmovgel %ecx, %edx
cmpl %edx, %eax
jge 0x4ba02
xorps %xmm0, %xmm0
movsd 0xb673(%rip), %xmm1     # 0x57070
jmp 0x4bab6
xorps %xmm0, %xmm0
cmpb $0x1, 0x63c(%r14)
jne 0x4ba1b
movq 0x20(%r14), %rax
movsd 0x158(%rax), %xmm0
leal -0x1(%rbx), %eax
cmpl $0x2, %eax
movsd %xmm0, -0x20(%rbp)
ja 0x4ba38
movl %eax, %eax
leaq 0xfc2f(%rip), %rcx      # 0x5b660
movsd (%rcx,%rax,8), %xmm0
jmp 0x4ba40
movsd 0xc1a8(%rip), %xmm0     # 0x57be8
movsd %xmm0, -0x18(%rbp)
callq 0x3db2c
movsd 0x3168(%rax), %xmm0
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x3db2c
movsd -0x20(%rbp), %xmm1
addsd 0x3160(%rax), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x28(%rbp), %xmm0
subsd %xmm2, %xmm0
addsd %xmm2, %xmm1
leaq 0x680(%r14), %rdi
addsd %xmm2, %xmm2
callq 0x4b7bc
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x18(%rbp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x4bf5a
movsd -0x18(%rbp), %xmm1
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::GetSenseBallCycle()
int VisualSystem::GetSenseBallCycle() {
  if (mSenseBallCycle == 0) { //用拦截模型来算什么时候可以感知到球
    if (mVisualRequest[0].mValid) {
      if (mVisualRequest[0].PreDistance() <
          ServerParam::instance().visibleDistance()) {
        mSenseBallCycle = 1;
      } else {
        PlayerInterceptInfo int_info;
        VirtualSelf virtual_self(*mpSelfState);

        virtual_self.UpdateIsGoalie(
            false); //否则会用可扑范围代替感知范围计算截球

        int_info.mRes = IR_None;
        int_info.mpPlayer = &virtual_self;

        InterceptInfo::CalcTightInterception(*mpBallState, &int_info);

        mSenseBallCycle = int_info.mMinCycle;
        mSenseBallCycle = Max(mSenseBallCycle, 1);
      }
    } else {
      mSenseBallCycle = 1000;
    }
  }

  return mSenseBallCycle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl 0x11c8(%rdi), %eax
testl %eax, %eax
jne 0x4bbe2
movq %rdi, %rbx
cmpb $0x1, 0x40(%rdi)
jne 0x4bb2c
movsd 0x30(%rbx), %xmm0
movsd 0x38(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x3db2c
movsd 0x3178(%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x4bb40
movl $0x1, 0x11c8(%rbx)
pushq $0x1
popq %rax
jmp 0x4bbe2
movl $0x3e8, 0x11c8(%rbx)    # imm = 0x3E8
movl $0x3e8, %eax            # imm = 0x3E8
jmp 0x4bbe2
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq -0xb0(%rbp), %r15
movq %rax, (%r15)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x58(%r15)
movl $0x3e8, 0x74(%r15)      # imm = 0x3E8
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x78(%r15)
movq %rax, 0x80(%r15)
movl $0x1, 0x88(%r15)
movq 0x20(%rbx), %rsi
leaq -0x228(%rbp), %r14
movq %r14, %rdi
callq 0x4bf86
andl $0x0, 0x8c(%r15)
movb $0x0, 0x175(%r14)
movq %r14, 0x60(%r15)
movq 0x18(%rbx), %rdi
pushq $0x1
popq %r14
movq %r15, %rsi
movl %r14d, %edx
callq 0x24962
movl -0x3c(%rbp), %eax
cmpl $0x2, %eax
cmovgel %eax, %r14d
movl %r14d, 0x11c8(%rbx)
leaq -0x228(%rbp), %rdi
callq 0xd716
movl 0x11c8(%rbx), %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0xd716
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::ForceSearchBall()
bool VisualSystem::ForceSearchBall() {
  if (!mpSelfState->IsIdling() && !mVisualRequest[0].mValid) { // force to scan
    mpAgent->GetActionEffector().ResetForScan();

    if (NewSightComeCycle(VW_Wide) == 1) {
      mpAgent->ChangeView(VW_Wide);
    } else if (NewSightComeCycle(VW_Normal) == 1) {
      mpAgent->ChangeView(VW_Normal);
    } else {
      mpAgent->ChangeView(VW_Narrow);
    }

    mpAgent->Turn(sight::ViewAngle(VW_Narrow) - 5.0);

    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rcx
xorl %eax, %eax
cmpl $0x0, 0xc8(%rcx)
jg 0x4bc80
cmpl $0x0, 0x124(%rcx)
jg 0x4bc80
movq %rdi, %rbx
cmpb $0x0, 0x40(%rdi)
je 0x4bc33
xorl %eax, %eax
jmp 0x4bc80
movq 0x8(%rbx), %rdi
callq 0xd670
movq %rax, %rdi
callq 0xc706
movq 0x20(%rbx), %rax
movl 0x18(%rax), %eax
cmpl $0x2, %eax
jl 0x4bc58
movq 0x8(%rbx), %rdi
pushq $0x3
jmp 0x4bc67
movq 0x8(%rbx), %rdi
cmpl $0x1, %eax
jne 0x4bc65
pushq $0x2
jmp 0x4bc67
pushq $0x1
popq %rsi
callq 0x4be96
movq 0x8(%rbx), %rdi
movsd 0xf98f(%rip), %xmm0     # 0x5b608
callq 0xccb0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::SetForceSeePlayer(int)
void VisualSystem::SetForceSeePlayer(Unum i) {
  if (i != 0) {
    mForceToSeeObject[i] = true;
    mHighPriorityPlayerSet.insert(GetVisualRequest(i));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, -0xc(%rbp)
testl %esi, %esi
je 0x4bd31
movq %rdi, %rbx
movl %esi, %eax
pushq $0xb
popq %rcx
subl %esi, %ecx
movq %rax, %rdx
shlq $0x6, %rdx
movq %rcx, %r8
shlq $0x6, %r8
testl %esi, %esi
cmovsq %rcx, %rax
leaq 0x608(%rdi), %rdi
movb $0x1, 0x5f0(%rbx,%rax)
leaq 0x30(%rbx,%rdx), %rax
leaq 0x30(%rbx,%r8), %rcx
cmovnsq %rax, %rcx
leaq -0x18(%rbp), %rsi
movq %rcx, (%rsi)
callq 0x4c31a
callq 0x2ca2e
leaq 0xf943(%rip), %rsi      # 0x5b632
movq %rax, %rdi
callq 0x2cc3e
movq 0x10(%rbx), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0xf938(%rip), %rsi      # 0x5b646
movq %rax, %rdi
callq 0x4bfd8
leaq -0xc(%rbp), %rsi
movq %rax, %rdi
callq 0x1a512
movq 0x2b287(%rip), %rsi     # 0x76fb0
movq %rax, %rdi
callq 0x10f5c
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.h
// Function: VisualSystem::VisualRequest::UpdateEvaluation()
void UpdateEvaluation() {
      mFreq = Max(1.0, mFreq);
      mConf = Max(1.0 - (mCycleDelay / mFreq), 0.0);
      mScore = 1.0 - mConf;
      mScore = Max(mScore, 0.001);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x18(%rdi), %xmm0
movsd 0xb2ff(%rip), %xmm1     # 0x57048
maxsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rdi)
cvtsi2sdl 0x14(%rdi), %xmm2
divsd %xmm0, %xmm2
movapd %xmm1, %xmm0
subsd %xmm2, %xmm0
xorpd %xmm2, %xmm2
maxsd %xmm0, %xmm2
movsd %xmm2, 0x20(%rdi)
subsd %xmm2, %xmm1
movsd 0xc37c(%rip), %xmm0     # 0x580f8
maxsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::UpdatePredictInfo()
inline void VisualSystem::UpdatePredictInfo() {
  mPreBodyDir = mpAgent->GetSelfBodyDirWithQueuedActions();
  mPreSelfPos = mpAgent->GetSelfPosWithQueuedActions();

  const Unum kickale_player =
      mpAgent->GetInfoState().GetPositionInfo().GetPlayerWithBall();
  if (kickale_player != 0 && kickale_player != mpSelfState->GetUnum()) {
    mPreBallPos = mpBallState->GetPos();
  } else {
    mPreBallPos = mpAgent->GetBallPosWithQueuedActions();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x4bee0
movsd %xmm0, 0x648(%rbx)
movq 0x8(%rbx), %rdi
callq 0x4c0c8
movsd %xmm0, 0x660(%rbx)
movsd %xmm1, 0x668(%rbx)
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x244e8
movq %rax, %rdi
callq 0x4c0da
testl %eax, %eax
je 0x4bde0
movq 0x20(%rbx), %rcx
cmpl 0x11c(%rcx), %eax
jne 0x4bdfb
movq 0x8(%rbx), %rdi
callq 0x4c10a
movsd %xmm0, 0x650(%rbx)
movsd %xmm1, 0x658(%rbx)
jmp 0x4be0a
movq 0x18(%rbx), %rax
movups 0x8(%rax), %xmm0
movups %xmm0, 0x650(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/PositionInfo.h
// Function: PositionInfo::GetClosestOpponentDistToBall()
double GetClosestOpponentDistToBall() {
    return GetClosestOpponentToBall() == 0
               ? HUGE_VALUE
               : mpWorldState->GetOpponent(GetClosestOpponentToBall())
                     .GetPos()
                     .Dist(mpWorldState->GetBall().GetPos());
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x12338
testl %eax, %eax
je 0x4be58
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x12338
decl %eax
cltq
imulq $0x178, %rax, %rax      # imm = 0x178
leaq (%r14,%rax), %rdi
addq $0x10d8, %rdi           # imm = 0x10D8
movq 0x10(%rbx), %rsi
addq $0x38, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2198a
movsd 0xb8e8(%rip), %xmm0     # 0x57748
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldModel.cpp
// Function: WorldModel::WorldModel()
WorldModel::WorldModel() {
  mpHistoryState[0] = new HistoryState;
  mpWorldState[0] = new WorldState(mpHistoryState[0]); //队友的世界状态

  mpHistoryState[1] = new HistoryState;
  mpWorldState[1] =
      new WorldState(mpHistoryState[1]); //供反算时用的，对手的世界状态
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2a944(%rip), %rax     # 0x76d48
movq %rax, (%rdi)
movl $0x14b98, %edi          # imm = 0x14B98
callq 0x94d0
movq %rax, %r14
movq %rax, %rdi
callq 0x4c598
movq %r14, 0x18(%rbx)
movl $0x2128, %edi           # imm = 0x2128
callq 0x94d0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4c6f4
movq %r15, 0x8(%rbx)
movl $0x14b98, %edi          # imm = 0x14B98
callq 0x94d0
movq %rax, %r14
movq %rax, %rdi
callq 0x4c598
movq %r14, 0x20(%rbx)
movl $0x2128, %edi           # imm = 0x2128
callq 0x94d0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4c6f4
movq %r15, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4c480
jmp 0x4c48d
movq %rax, %rbx
movl $0x2128, %esi           # imm = 0x2128
movq %r15, %rdi
jmp 0x4c498
movq %rax, %rbx
movl $0x14b98, %esi          # imm = 0x14B98
movq %r14, %rdi
callq 0x94f0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldModel.cpp
// Function: WorldModel::~WorldModel()
WorldModel::~WorldModel() {
  delete mpWorldState[0];
  delete mpHistoryState[0];

  delete mpWorldState[1];
  delete mpHistoryState[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2a891(%rip), %rax     # 0x76d48
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4c4c9
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x4c4da
movq %r14, %rdi
callq 0x4c6be
movl $0x14b98, %esi          # imm = 0x14B98
movq %r14, %rdi
callq 0x94f0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4c4f6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x4c507
movq %rbx, %rdi
callq 0x4c6be
movl $0x14b98, %esi          # imm = 0x14B98
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x94f0
// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldModel.cpp
// Function: WorldModel::Update(Observer*)
void WorldModel::Update(Observer *observer) {
  //存储一下当前的世界
  mpHistoryState[0]->UpdateHistory(*mpWorldState[0]);
  mpHistoryState[1]->UpdateHistory(*mpWorldState[1]);

  mpWorldState[0]->UpdateFromObserver(observer); //自己方决策使用的世界状态
  mpWorldState[1]->GetReverseFrom(
      mpWorldState[0]); //可供反算对手时使用的世界状态
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movq 0x18(%rdi), %rdi
callq 0x5563e
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0x5563e
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4c8ba
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4c916