LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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(%rdi), %r15
je 0x52007
cmpl $0x0, (%r15)
jne 0x51fe3
movq 0x18(%r15), %rax
cmpq 0x20(%r15), %rax
je 0x51ff7
movq %r15, %rdi
callq 0x51fb8
addq $0x58, %r15
cmpq 0x20(%r14), %r15
jne 0x51fd3
jmp 0x52007
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53cce
movq %rax, %r15
jmp 0x51fef
cmpl $0x0, (%r14)
je 0x52018
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
subq %rsi, %r15
cmpq $0x58, %r15
jne 0x52055
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 0x52e02
movq 0x31f94(%rip), %rbx     # 0x83ff0
leaq 0x1ad77(%rip), %rsi     # 0x6cdda
movl $0x12, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x1b11b(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x283, %esi            # imm = 0x283
callq 0x9880
movq %rax, %rbx
leaq 0x193bc(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x1af37(%rip), %rsi     # 0x6cfe6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9330
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9350
leaq -0x198(%rbp), %rdi
movq %r14, %rsi
callq 0x9730
leaq 0x38(%rbx), %r15
movl $0x1, %r12d
xorl %r13d, %r13d
leaq -0x1b0(%rbp), %r14
leaq (%r15,%r13), %rsi
movq %r14, %rdi
callq 0x92e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x521b2
movslq 0x38(%rbx,%r13), %rax
movl %r12d, 0x64(%rbx,%rax,4)
incl %r12d
addq $0x4, %r13
cmpq $0x2c, %r13
jne 0x52137
movb $0x1, 0x33(%rbx)
movq 0x31e4d(%rip), %rbx     # 0x83fc0
leaq 0x1b08b(%rip), %rsi     # 0x6d205
movl $0x12, %edx
movq %rbx, %rdi
callq 0x9560
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq 0x31e1b(%rip), %rdi     # 0x83fc0
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq 0x31ddf(%rip), %rsi     # 0x83f98
leaq -0x1b0(%rbp), %rdi
callq 0x9370
leaq -0x130(%rbp), %rdi
callq 0x91c0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x521e7
jmp 0x521e7
movq %rax, %rbx
movq 0x31da7(%rip), %rsi     # 0x83f98
leaq -0x1b0(%rbp), %rdi
callq 0x9370
leaq -0x130(%rbp), %rdi
callq 0x91c0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
callq 0x49360
leaq 0x19449(%rip), %rax     # 0x6bee8
movsd (%rax), %xmm0
mulsd 0x16dcd(%rip), %xmm0    # 0x69878
movsd 0x17b0d(%rip), %xmm1    # 0x6a5c0
testl %r14d, %r14d
jne 0x52ac2
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x52aca
addsd 0x17afe(%rip), %xmm0    # 0x6a5c8
movsd 0x1a176(%rip), %xmm1    # 0x6cc48
leaq -0x68(%rbp), %r14
leaq -0x38(%rbp), %r15
leaq -0x3c(%rbp), %r12
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x48(%rbp)
movsd %xmm1, -0x30(%rbp)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r13
movq 0x20(%rax), %rdi
callq 0x2a4b4
movl $0x0, -0x3c(%rbp)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x477b6
movq -0x68(%rbp), %rdi
movl (%rdi), %eax
testl %eax, %eax
jle 0x52b34
decl %eax
imulq $0x178, %rax, %rax      # imm = 0x178
addq %r13, %rax
addq $0xa8, %rax
jmp 0x52b48
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 -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x94e0
movsd -0x50(%rbp), %xmm0
ucomisd 0x164ce(%rip), %xmm0    # 0x69058
ja 0x52bc9
movsd 0x17a2c(%rip), %xmm0    # 0x6a5c0
movsd -0x48(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd 0x1a0ab(%rip), %xmm0    # 0x6cc50
ucomisd %xmm1, %xmm0
ja 0x52ae3
movsd -0x38(%rbp), %xmm0
addsd 0x16cbc(%rip), %xmm0    # 0x69878
movsd 0x1a084(%rip), %xmm1    # 0x6cc48
jmp 0x52ade
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/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 0x54368
movq %rdi, %r14
movq %rbx, %rdi
callq 0x9200
movl 0x14(%r14), %edi
incl %eax
movslq %eax, %rdx
addq $0x4, %r14
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r8
movl $0x10, %r9d
callq 0x90a0
jmp 0x543dd
testq %rbx, %rbx
je 0x54389
movq %rbx, %rdi
callq 0x9200
movq 0x2fc44(%rip), %rdi     # 0x83fc0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x543a7
movq 0x2fc30(%rip), %rax     # 0x83fc0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x9860
movq 0x2fc12(%rip), %r14     # 0x83fc0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq %rbx, %rdi
callq 0x9200
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
callq 0x43dce
cmpb $0x1, 0x5c40(%rax)
jne 0x5442f
callq 0x22cde
movq %rax, %rdi
callq 0x23f16
jmp 0x5445e
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x97e0
movups (%rbx), %xmm0
leaq -0x18(%rbp), %rbx
movups %xmm0, (%rbx)
callq 0x22cde
movq %rax, %rdi
movq %rbx, %rsi
callq 0x231ce
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
callq 0x43dce
cmpb $0x1, 0x5c40(%rax)
jne 0x5448b
callq 0x22cde
movq %rax, %rdi
callq 0x23f44
jmp 0x544ba
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x97e0
movups (%rbx), %xmm0
leaq -0x18(%rbp), %rbx
movups %xmm0, (%rbx)
callq 0x22cde
movq %rax, %rdi
movq %rbx, %rsi
callq 0x23228
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
callq 0x43dce
cmpb $0x1, 0x5c40(%rax)
jne 0x544e7
callq 0x22cde
movq %rax, %rdi
callq 0x23f72
jmp 0x54516
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x97e0
movups (%rbx), %xmm0
leaq -0x18(%rbp), %rbx
movups %xmm0, (%rbx)
callq 0x22cde
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2328a
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %ecx # imm = 0xFFFFFC18
addl 0x8(%rdi), %ecx
js 0x545a6
movq (%rdi), %rax
jmp 0x545ca
movl %ecx, %eax
negl %eax
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
notl %eax
cltq
addq (%rdi), %rax
addl $0xf4240, %ecx          # imm = 0xF4240
addl %edx, %ecx
movl %ecx, %edx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x54632
jne 0x54630
movq 0x8(%rdi), %rcx
cmpq 0x8(%rsi), %rcx
jl 0x54632
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x546f0
movl 0x4(%rdi), %eax
subl 0x4(%rsi), %eax
jmp 0x546f3
addl 0x4(%rdi), %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x55b16
movl %ebx, (%rax)
addq $0x30, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x55b96
movq %rax, %rdi
movq %r14, %rsi
callq 0x92a0
addq $0x10, %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/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 0x16dc9(%rip), %rsi     # 0x6c768
movl $0x6, %edx
movq %r15, %rdi
callq 0x9230
testl %eax, %eax
je 0x559ef
leaq 0x16dbe(%rip), %rsi     # 0x6c775
movl $0x6, %edx
movq %r15, %rdi
callq 0x9230
testl %eax, %eax
je 0x55a1c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x56416
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x55a60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x55b16
movl (%rax), %ebx
jmp 0x55a62
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x16d6a(%rip), %rsi     # 0x6c768
leaq 0x16d69(%rip), %rdx     # 0x6c76e
leaq -0x38(%rbp), %rdi
callq 0x1362e
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x55bfe
jmp 0x55a47
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x16d4a(%rip), %rsi     # 0x6c775
leaq 0x16d49(%rip), %rdx     # 0x6c77b
leaq -0x38(%rbp), %rdi
callq 0x1362e
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x55bfe
movl (%rax), %ebx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x55a62
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x94e0
jmp 0x55a62
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55a73
jmp 0x55a8d
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x55a90
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x94e0
jmp 0x55a90
movq %rax, %rbx
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x10, %rsp
movl %esi, -0x4(%rbp)
movq 0x40(%rdi), %rdx
leaq 0x14ce2(%rip), %rax     # 0x6a790
testq %rdx, %rdx
je 0x55af0
movq %rdi, %rcx
addq $0x30, %rdi
addq $0x38, %rcx
movq %rcx, %r8
xorl %r9d, %r9d
cmpl %esi, 0x20(%rdx)
setl %r9b
cmovgeq %rdx, %r8
movq 0x10(%rdx,%r9,8), %rdx
testq %rdx, %rdx
jne 0x55ac1
cmpq %rcx, %r8
je 0x55af0
cmpl %esi, 0x20(%r8)
jg 0x55af0
leaq -0x4(%rbp), %rsi
callq 0x55b96
movq (%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2d803(%rip), %rax     # 0x83cc8
movq %rax, (%rdi)
movl $0x60, %eax
movabsq $0x412e848000000000, %rcx # imm = 0x412E848000000000
xorps %xmm0, %xmm0
movabsq $0x4059000000000000, %rdx # imm = 0x4059000000000000
movq %rcx, -0x30(%rbx,%rax)
movq %rcx, -0x28(%rbx,%rax)
movl $0x0, -0x1c(%rbx,%rax)
movups %xmm0, -0x10(%rbx,%rax)
movq $0x0, (%rbx,%rax)
movb $0x0, -0x20(%rbx,%rax)
movq %rdx, -0x18(%rbx,%rax)
addq $0x40, %rax
cmpq $0x620, %rax            # imm = 0x620
jne 0x564e4
leaq 0x610(%rbx), %rax
xorl %r14d, %r14d
movl %r14d, 0x610(%rbx)
movq %r14, 0x618(%rbx)
movq %rax, 0x620(%rbx)
movq %rax, 0x628(%rbx)
movq %r14, 0x630(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x650(%rbx)
movups %xmm0, 0x660(%rbx)
movq %r14, 0x670(%rbx)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x678(%rbx)
leaq 0x680(%rbx), %rdi
movl $0xb48, %edx            # imm = 0xB48
xorl %esi, %esi
callq 0x92b0
xorps %xmm0, %xmm0
movups %xmm0, 0x5f0(%rbx)
movq %r14, 0x5ff(%rbx)
movl %r14d, 0x638(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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)
movl $0x0, 0x11c8(%rdi)
movq 0x8(%rdi), %rax
cmpb $0x1, 0x28(%rax)
jne 0x56735
leaq 0x30(%rbx), %rax
movl $0x0, 0x638(%rbx)
leaq 0x5b0(%rbx), %rcx
movl $0xfffffff5, %edx       # imm = 0xFFFFFFF5
movabsq $0x4059000000000000, %rsi # imm = 0x4059000000000000
movl %edx, %edi
shlq $0x6, %rdi
addq %rax, %rdi
testl %edx, %edx
cmovsq %rcx, %rdi
movb $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
incl %edx
addq $-0x40, %rcx
cmpl $0xc, %edx
jne 0x566ea
leaq 0x608(%rbx), %rdi
callq 0x59d7c
xorps %xmm0, %xmm0
movups %xmm0, 0x5f0(%rbx)
movq $0x0, 0x5ff(%rbx)
movq 0x20(%rbx), %rax
movsd 0x128ff(%rip), %xmm0    # 0x69040
ucomisd 0x20(%rax), %xmm0
jbe 0x56751
movw $0x1, 0x638(%rbx)
movq 0x18(%rbx), %rax
ucomisd 0x20(%rax), %xmm0
jbe 0x5676a
movb $0x1, %al
movb %al, 0x63a(%rbx)
movb %al, 0x5f0(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x567ca
// File: /workspace/github_cpp_makefile_star2_O3/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 0x567c2
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x608(%rdi), %rax
movl %esi, %ecx
movl $0xb, %edx
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 0x59ed6
addq $0x10, %rsp
popq %rbp
retq
movb $0x1, 0x5f0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x56845
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movl $0x1, %eax
cmpl $0x16, 0x1c(%rcx)
je 0x56839
movq 0x28(%rbx), %rdi
callq 0x2a4b4
movq 0x20(%rbx), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
callq 0x4706a
movsd (%rax), %xmm0
movl $0x3, %eax
ucomisd 0x15608(%rip), %xmm0    # 0x6be30
ja 0x56839
xorl %eax, %eax
ucomisd 0x14754(%rip), %xmm0    # 0x6af88
seta %al
incl %eax
movl %eax, 0x640(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xee28
cmpb $0x0, 0xe93(%rax)
jne 0x56876
cmpb $0x0, 0x63b(%rbx)
jne 0x56876
movq %rbx, %rdi
callq 0x5688c
testb %al, %al
je 0x5687d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x56ac4
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x56af5
movl $0x1, %eax
cmpb $0x0, 0x639(%rbx)
jne 0x56aef
movq 0x20(%rbx), %rax
movl 0x118(%rax), %eax
movl %eax, 0x640(%rbx)
movq %rbx, %rdi
callq 0x5747c
movq %rbx, %rdi
callq 0x570de
movq %rbx, %rdi
callq 0x59754
testb %al, %al
je 0x56b18
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x56b62
movq %rbx, %rdi
callq 0x56cf8
movq %rbx, %rdi
callq 0x56e20
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x59006
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %rdi, %rbx
leaq 0x680(%rdi), %r14
movl $0xb48, %edx            # imm = 0xB48
movq %r14, %rdi
xorl %esi, %esi
callq 0x92b0
leaq 0x30(%rbx), %rax
movq %rax, -0x30(%rbp)
movl $0xfffffff5, %r13d      # imm = 0xFFFFFFF5
movl %r13d, %eax
movl $0xb, %r15d
subl %r13d, %r15d
testl %r13d, %r13d
cmovnsq %rax, %r15
shlq $0x6, %r15
movq -0x30(%rbp), %rax
cmpb $0x1, 0x10(%rax,%r15)
jne 0x56e04
addq -0x30(%rbp), %r15
movl $0xfffffffb, %r12d      # imm = 0xFFFFFFFB
movsd 0x1359f(%rip), %xmm3    # 0x6a308
movsd %xmm3, -0x40(%rbp)
movsd 0x28(%r15), %xmm0
divsd 0x1687c(%rip), %xmm0    # 0x6d5f8
movsd %xmm0, -0x38(%rbp)
movq %r15, %rdi
callq 0xe702
movsd -0x40(%rbp), %xmm3
xorpd %xmm1, %xmm1
subsd 0x648(%rbx), %xmm0
addsd %xmm3, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x56db8
movsd 0x122c4(%rip), %xmm2    # 0x69070
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x56dac
jmp 0x56dd8
movsd 0x122b0(%rip), %xmm1    # 0x69070
ucomisd %xmm1, %xmm0
movsd 0x1229c(%rip), %xmm2    # 0x69068
jb 0x56dd8
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jae 0x56dce
cvttsd2si %xmm0, %eax
cltq
movsd -0x38(%rbp), %xmm0
addsd (%r14,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
addsd 0x12261(%rip), %xmm3    # 0x69058
incl %r12d
cmpl $0x6, %r12d
jne 0x56d69
incl %r13d
cmpl $0xc, %r13d
jne 0x56d30
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/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
leaq 0x38(%rdi), %rsi
callq 0xf4b0
movsd -0x20(%rbp), %xmm1
movq %rax, %r14
movq 0x10(%rbx), %rdi
movl 0x1c(%rdi), %eax
movsd 0x11e42(%rip), %xmm0    # 0x69780
ucomisd %xmm1, %xmm0
ja 0x57950
leal -0x15(%rax), %ecx
cmpl $-0x14, %ecx
ja 0x57a32
movsd 0x116e8(%rip), %xmm0    # 0x69040
ucomisd %xmm1, %xmm0
movapd %xmm1, %xmm0
jbe 0x57a32
cmpl $0x1, %eax
jne 0x579a4
cmpb $0x0, 0x41(%r14)
je 0x579a4
movq 0x18(%rbx), %rax
movl 0x40(%rax), %r15d
addq $0x10, %rdi
movq %r14, %rsi
addq $0x54, %rsi
callq 0x546de
cmpl %eax, %r15d
jle 0x579f8
movq %rbx, %rdi
callq 0x57a48
movsd 0x116b9(%rip), %xmm0    # 0x69058
jmp 0x57a32
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
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
divsd 0x135b4(%rip), %xmm1    # 0x6af98
jle 0x57a26
addsd 0x1166a(%rip), %xmm1    # 0x69058
movsd 0x1222a(%rip), %xmm0    # 0x69c20
jmp 0x57a2e
movq %r14, %rdi
callq 0x4b51a
movzbl %al, %eax
shll $0x5, %eax
xorps %xmm0, %xmm0
cvtsi2sdl 0x44(%r14,%rax), %xmm0
movsd 0x12208(%rip), %xmm1    # 0x69c20
minsd %xmm0, %xmm1
movsd 0x11634(%rip), %xmm0    # 0x69058
jmp 0x57a2e
movsd 0x11d52(%rip), %xmm0    # 0x69780
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_O3/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
leaq 0x38(%rdi), %rsi
callq 0xf4b0
movq %rax, %r14
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x57908
movl $0x1, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rax
cmpl 0x11c(%rax), %r15d
je 0x57fab
movq %rbx, %rdi
movl %r15d, %esi
movsd 0x11eda(%rip), %xmm0    # 0x69e80
callq 0x576ea
movq %rbx, %rdi
movl %r12d, %esi
movsd 0x11ec7(%rip), %xmm0    # 0x69e80
callq 0x576ea
incl %r15d
decl %r12d
cmpl $-0xc, %r12d
jne 0x57f8b
movq 0x28(%rbx), %rdi
callq 0x2a4b4
movq 0x20(%rbx), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
callq 0x4706a
movsd 0x15613(%rip), %xmm0    # 0x6d600
ucomisd (%rax), %xmm0
jbe 0x58003
movq %rbx, %rdi
callq 0x57a48
movl 0x48(%r14), %esi
testl %esi, %esi
js 0x5800c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsd 0x1176c(%rip), %xmm0    # 0x69780
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x576ea
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14d
movq %rdi, %rbx
testl %edx, %edx
jne 0x59513
movq %rbx, %rdi
callq 0x595de
xorl %ecx, %ecx
cmpl $0x2, %r14d
sete %cl
incl %ecx
cmpl $0x3, %r14d
cmovel %r14d, %ecx
movq 0x20(%rbx), %rdx
subl 0x18(%rdx), %ecx
cmpl $0x2, %ecx
movl $0x1, %edx
cmovgel %ecx, %edx
cmpl %edx, %eax
jge 0x59513
xorpd %xmm0, %xmm0
movsd 0xfb8a(%rip), %xmm1     # 0x69098
jmp 0x595d5
xorps %xmm0, %xmm0
cmpb $0x1, 0x63c(%rbx)
jne 0x5952b
movq 0x20(%rbx), %rax
movsd 0x158(%rax), %xmm0
leal -0x1(%r14), %eax
cmpl $0x2, %eax
movsd %xmm0, -0x20(%rbp)
ja 0x59549
movl %eax, %eax
leaq 0x1413e(%rip), %rcx     # 0x6d680
movsd (%rcx,%rax,8), %xmm0
jmp 0x59551
movsd 0x106d7(%rip), %xmm0    # 0x69c28
movsd %xmm0, -0x18(%rbp)
callq 0x49360
movsd 0x3168(%rax), %xmm0
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x49360
movsd -0x20(%rbp), %xmm1
addsd 0x3160(%rax), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x28(%rbp), %xmm0
subsd %xmm2, %xmm0
addsd %xmm2, %xmm1
leaq 0x680(%rbx), %rdi
addsd %xmm2, %xmm2
callq 0x59210
xorl %eax, %eax
cmpl $0x2, %r14d
sete %al
incl %eax
cmpl $0x3, %r14d
cmovel %r14d, %eax
movq 0x20(%rbx), %rcx
movl 0x18(%rcx), %ecx
subl %ecx, %eax
cmpl $0x2, %eax
movl $0x1, %edx
cmovgel %eax, %edx
addl %ecx, %edx
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
divsd %xmm2, %xmm1
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5971c
movq %rdi, %rbx
cmpb $0x1, 0x40(%rdi)
jne 0x5964c
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 0x49360
movsd 0x3178(%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x59660
movl $0x1, 0x11c8(%rbx)
movl $0x1, %eax
jmp 0x5971c
movl $0x3e8, 0x11c8(%rbx)    # imm = 0x3E8
movl $0x3e8, %eax            # imm = 0x3E8
jmp 0x5971c
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq -0xb0(%rbp), %r14
movq %rax, (%r14)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x58(%r14)
movl $0x3e8, 0x74(%r14)      # imm = 0x3E8
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x78(%r14)
movq %rax, 0x80(%r14)
movl $0x1, 0x88(%r14)
movq 0x20(%rbx), %rsi
leaq -0x228(%rbp), %r15
movq %r15, %rdi
callq 0x59aaa
movb $0x0, 0x175(%r15)
movl $0x0, 0x8c(%r14)
movq %r15, 0x60(%r14)
movq 0x18(%rbx), %rdi
movl $0x1, %r15d
movq %r14, %rsi
movl $0x1, %edx
callq 0x2ac3e
movl -0x3c(%rbp), %eax
cmpl $0x2, %eax
cmovgel %eax, %r15d
movl %r15d, 0x11c8(%rbx)
leaq 0x28cd2(%rip), %rax     # 0x823d0
movq %rax, -0x228(%rbp)
movq -0x1c0(%rbp), %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x94e0
movl 0x11c8(%rbx), %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28c9c(%rip), %rax     # 0x823d0
movq %rax, -0x228(%rbp)
movq -0x1c0(%rbp), %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
movq 0x20(%rdi), %rcx
xorl %eax, %eax
cmpl $0x0, 0xc8(%rcx)
jg 0x597f4
cmpl $0x0, 0x124(%rcx)
jg 0x597f4
movq %rdi, %rbx
cmpb $0x0, 0x40(%rdi)
je 0x59784
xorl %eax, %eax
jmp 0x597f4
movq 0x8(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
callq 0xdf5a
movq 0x20(%rbx), %rax
movl 0x18(%rax), %r14d
cmpl $0x2, %r14d
jl 0x597b6
movq 0x8(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
movl $0x3, %esi
jmp 0x597d4
movq 0x8(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
cmpl $0x1, %r14d
jne 0x597cf
movl $0x2, %esi
jmp 0x597d4
movl $0x1, %esi
callq 0xc672
movq 0x8(%rbx), %rdi
callq 0xee28
movsd 0x13e3e(%rip), %xmm0    # 0x6d628
movq %rax, %rdi
callq 0xbb88
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
testl %esi, %esi
je 0x59912
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %eax
movl $0xb, %ecx
subl %esi, %ecx
movq %rax, %rdx
shlq $0x6, %rdx
movq %rcx, %rsi
shlq $0x6, %rsi
testl %ebx, %ebx
cmovsq %rcx, %rax
leaq 0x608(%rdi), %rdi
movb $0x1, 0x5f0(%r14,%rax)
leaq 0x30(%r14,%rdx), %rax
leaq 0x30(%r14,%rsi), %rcx
cmovnsq %rax, %rcx
leaq -0x20(%rbp), %rsi
movq %rcx, (%rsi)
callq 0x59ed6
callq 0x34c60
leaq 0x13dee(%rip), %rsi     # 0x6d652
movq %rax, %rdi
callq 0x34e74
movq %rax, %r15
movq 0x10(%r14), %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x59897
addq $0x10, %r14
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r14, %rsi
callq 0xe974
leaq 0x13dc8(%rip), %rsi     # 0x6d666
movq %r15, %rdi
callq 0x59c5e
movq %rax, %r14
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x598c5
leaq 0x210(%r14), %rdi
movl %ebx, %esi
callq 0x9880
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x59908
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 $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xee28
movq %rax, %rdi
callq 0xe1ac
movsd %xmm0, 0x648(%rbx)
movq 0x8(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
callq 0xe086
movsd %xmm0, 0x660(%rbx)
movsd %xmm1, 0x668(%rbx)
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x2a4b4
movq %rax, %rdi
callq 0x59d06
testl %eax, %eax
je 0x5997c
movq 0x20(%rbx), %rcx
cmpl 0x11c(%rcx), %eax
jne 0x5999f
movq 0x8(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
callq 0xe1f2
movsd %xmm0, 0x650(%rbx)
movsd %xmm1, 0x658(%rbx)
jmp 0x599ae
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_O3/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 0x14f02
testl %eax, %eax
je 0x59a14
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x14f02
decl %eax
cltq
imulq $0x178, %rax, %rax      # imm = 0x178
movq 0x10(%rbx), %rcx
movsd 0x10d8(%r14,%rax), %xmm0
subsd 0x38(%rcx), %xmm0
movsd 0x10e0(%r14,%rax), %xmm1
subsd 0x40(%rcx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
jmp 0x59a1c
movsd 0xfd34(%rip), %xmm0     # 0x69750
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29d94(%rip), %rax     # 0x83d38
movq %rax, (%rdi)
movl $0x14b98, %edi          # imm = 0x14B98
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
callq 0x5a184
movl $0x0, 0x14b90(%r14)
movq %r14, 0x18(%rbx)
movl $0x2128, %edi           # imm = 0x2128
callq 0x94c0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x5a2b0
movq %r15, 0x8(%rbx)
movl $0x14b98, %edi          # imm = 0x14B98
callq 0x94c0
movq %rax, %r14
movq %rax, %rdi
callq 0x5a184
movl $0x0, 0x14b90(%r14)
movq %r14, 0x20(%rbx)
movl $0x2128, %edi           # imm = 0x2128
callq 0x94c0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x5a2b0
movq %r15, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a036
jmp 0x5a043
movq %rax, %rbx
movl $0x2128, %esi           # imm = 0x2128
movq %r15, %rdi
jmp 0x5a04e
movq %rax, %rbx
movl $0x14b98, %esi          # imm = 0x14B98
movq %r14, %rdi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x29cc7(%rip), %rax     # 0x83d38
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x5a083
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x5a0aa
movl $0x12a68, %r15d         # imm = 0x12A68
movq $-0x2128, %r12          # imm = 0xDED8
leaq (%r14,%r15), %rdi
callq 0x5a1e4
addq %r12, %r15
cmpq %r12, %r15
jne 0x5a099
movl $0x14b98, %esi          # imm = 0x14B98
movq %r14, %rdi
callq 0x94e0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5a0c6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x5a0ed
movl $0x12a68, %r14d         # imm = 0x12A68
movq $-0x2128, %r15          # imm = 0xDED8
leaq (%rbx,%r14), %rdi
callq 0x5a1e4
addq %r15, %r14
cmpq %r15, %r14
jne 0x5a0dc
movl $0x14b98, %esi          # imm = 0x14B98
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x94e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x67508
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0x67508
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x5a588
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5a5e8
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldState::WorldState(HistoryState*)
WorldState::WorldState(HistoryState *history_state)
    : mpHistory(history_state), mCurrentTime(Time(-3, 0)),
      mPlayMode(PM_No_Mode), mPlayModeTime(Time(-3, 0)), mIsBallDropped(false),
      mTeammateGoalieUnum(0), mOpponentGoalieUnum(0), mTeammateScore(0),
      mOpponentScore(0), mIsCycleStopped(false) {
  //为各个球员分配号码
  for (Unum i = 1; i <= TEAMSIZE; i++) {
    mTeammate[i].UpdateUnum(i);
    mOpponent[i].UpdateUnum(-i);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x29a9d(%rip), %rax     # 0x83d68
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x10(%rdi)
movl $0x0, 0x1c(%rdi)
movq %rax, 0x24(%rdi)
movb $0x0, 0x2c(%rdi)
addq $0x30, %rdi
callq 0x3c67c
leaq 0xa8(%rbx), %rdi
callq 0x3c81e
leaq 0x10d0(%rbx), %r14
movq %r14, %rdi
callq 0x3c81e
leaq 0x20f8(%rbx), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2111(%rbx)
movups %xmm0, 0x2108(%rbx)
movq %rbx, -0x30(%rbp)
movups %xmm0, 0x20f8(%rbx)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq $-0xb, %r12
leaq -0x40(%rbp), %r15
leaq -0x1028(%r14), %rax
leal 0xc(%r12), %ecx
movl %ecx, -0xf0c(%r14)
movl %r13d, 0x11c(%r14)
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x680ea
movq %r14, -0x40(%rbp)
movq %rbx, %rdi
movq %r15, %rbx
movq %r15, %rsi
callq 0x680ea
decl %r13d
addq $0x178, %r14            # imm = 0x178
incq %r12
movq %rbx, %r15
jne 0x5a346
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x5a40b
movq %rax, %r14
jmp 0x5a43b
jmp 0x5a3b5
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5a3d7
movq -0x30(%rbp), %rax
movq 0x2108(%rax), %rsi
subq %rdi, %rsi
callq 0x94e0
movl $0x1fe8, %r15d          # imm = 0x1FE8
leaq 0x27fec(%rip), %r12     # 0x823d0
movq -0x30(%rbp), %rbx
movq %r12, -0x68(%rbx,%r15)
movq (%rbx,%r15), %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x94e0
addq $-0x178, %r15           # imm = 0xFE88
cmpq $0xfc0, %r15            # imm = 0xFC0
jne 0x5a3e8
movl $0xf58, %r15d           # imm = 0xF58
leaq 0x27fb8(%rip), %r12     # 0x823d0
movq %r12, (%rbx,%r15)
movq 0x68(%rbx,%r15), %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x94e0
addq $-0x178, %r15           # imm = 0xFE88
cmpq $-0xd0, %r15
jne 0x5a418
leaq 0x27f8e(%rip), %rax     # 0x823d0
movq %rax, 0x30(%rbx)
movq 0x98(%rbx), %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x94e0
movq %r14, %rdi
callq 0x98b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldState::GetHistory(int) const
WorldState *WorldState::GetHistory(int i) const {
  if (i == 0) {
    return const_cast<WorldState *>(this);
  } else if (i > HistoryState::HISTORY_SIZE) {
    return 0;
  }

  return mpHistory->GetHistory(i);
}

// Assembly:
movq %rdi, %rax
testl %esi, %esi
je 0x5a46e
cmpl $0xa, %esi
jle 0x5a46f
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rax), %rcx
movslq %esi, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rax
addl %edx, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl 0x14b90(%rcx), %edx
subl %esi, %eax
addl %edx, %eax
addl $0xa, %eax
cltq
imulq $0x66666667, %rax, %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, %eax
cltq
imulq $0x2128, %rax, %rax     # imm = 0x2128
addq %rcx, %rax
popq %rbp
retq
nop