// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::DealWithSpecialObjects()
void VisualSystem::DealWithSpecialObjects() {
  static const double buffer = 0.25;
  static const int object_count = TEAMSIZE * 2 + 1;

  static const double high_priority_multi = object_count * 0.5;
  static const double force_to_see_player_multi =
      object_count * high_priority_multi;
  static const double force_to_see_ball_multi =
      object_count * force_to_see_player_multi;

  if (!mHighPriorityPlayerSet.empty()) {
    for (std::set<VisualRequest *>::iterator it =
             mHighPriorityPlayerSet.begin();
         it != mHighPriorityPlayerSet.end(); ++it) {
      if (!(*it)->mValid)
        continue;
      (*it)->mScore = (*it)->Multi() * (mForceToSeeObject[(*it)->mUnum]
                                            ? force_to_see_player_multi
                                            : high_priority_multi);

      if ((*it)->mpObject->GetPosConf() > 0.9 &&
          (*it)->PreDistance() <
              ServerParam::instance().visibleDistance() - buffer) {
        SetCritical(true);
      }
    }
  }

  if (mForceToSeeObject[0] && mVisualRequest[0].mValid) {
    if (mpBallState->GetPosConf() > 0.9 &&
        mVisualRequest[0].PreDistance() <
            ServerParam::instance().visibleDistance() - buffer) {
      if (mpBallState->GetPosDelay() == 0) {
        mVisualRequest[0].mScore = FLOAT_EPS; // just sense it
      }

      SetCritical(true);
    } else {
      mVisualRequest[0].mScore =
          mVisualRequest[0].Multi() * force_to_see_ball_multi;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x630(%rdi)
je 0x56c4c
movq 0x620(%rbx), %r14
leaq 0x610(%rbx), %r15
cmpq %r15, %r14
je 0x56c4c
movq 0x20(%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x56c38
movsd 0x28(%rax), %xmm0
movslq 0x38(%rax), %rcx
movl $0xb, %edx
subl %ecx, %edx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
addsd 0x12497(%rip), %xmm0    # 0x69058
cmpb $0x0, 0x5f0(%rbx,%rdx)
movsd 0x16a0f(%rip), %xmm1    # 0x6d5e0
jne 0x56bdb
movsd 0x16a0d(%rip), %xmm1    # 0x6d5e8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rax)
movq 0x30(%rax), %rcx
movsd 0x20(%rcx), %xmm0
ucomisd 0x15f1b(%rip), %xmm0    # 0x6cb10
jbe 0x56c38
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x49360
movsd 0x3178(%rax), %xmm0
addsd 0x150fe(%rip), %xmm0    # 0x6bd28
ucomisd -0x20(%rbp), %xmm0
jbe 0x56c38
movb $0x1, 0x638(%rbx)
movq %r14, %rdi
callq 0x9570
movq %rax, %r14
cmpq %r15, %rax
jne 0x56b94
cmpb $0x1, 0x5f0(%rbx)
jne 0x56cec
cmpb $0x1, 0x40(%rbx)
jne 0x56cec
movq 0x18(%rbx), %rax
movsd 0x20(%rax), %xmm0
ucomisd 0x15e9c(%rip), %xmm0    # 0x6cb10
jbe 0x56cd2
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
addsd 0x1507e(%rip), %xmm0    # 0x6bd28
ucomisd -0x20(%rbp), %xmm0
jbe 0x56cd2
movq 0x18(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jne 0x56cc9
movabsq $0x3ed92a737110e454, %rax # imm = 0x3ED92A737110E454
movq %rax, 0x58(%rbx)
movb $0x1, 0x638(%rbx)
jmp 0x56cec
movsd 0x58(%rbx), %xmm0
addsd 0x12379(%rip), %xmm0    # 0x69058
mulsd 0x16909(%rip), %xmm0    # 0x6d5f0
movsd %xmm0, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop