// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/VisualSystem.cpp
// Function: VisualSystem::RaisePlayer(int, double)
void VisualSystem::RaisePlayer(ObjectIndex unum, double eva) {
  if (unum == 0 || !mpWorldState->GetPlayer(unum).IsAlive() ||
      unum == mpSelfState->GetUnum()) {
    return;
  }

  if (eva < FLOAT_EPS) {
    double dis = mpInfoState->GetPositionInfo().GetPlayerDistToPlayer(
        mpSelfState->GetUnum(), unum);
    if (dis < 3.0) {
      eva = 6.0;
    } else if (dis < 6.0) {
      eva = 5.0;
    } else if (dis < 20.0) {
      eva = 10.0;
    } else if (dis < 40.0) {
      eva = 26.0;
    } else {
      eva = 50.0;
    }
  }

  VisualRequest *vr = GetVisualRequest(unum);
  vr->mFreq = Min(vr->mFreq, eva);

  if (mpWorldState->GetPlayer(unum).GetPosConf() < FLOAT_EPS) {
    if (eva <= 2) {
      RaiseForgotObject(unum);
    }
  }

  PlayMode pm = mpWorldState->GetPlayMode();
  if (((/*pm == PM_Our_Penalty_Setup ||*/ pm == PM_Our_Penalty_Ready ||
        pm == PM_Our_Penalty_Taken) &&
       mpWorldState->GetPlayer(unum).IsGoalie()) ||
      (-unum == mpInfoState->GetPositionInfo().GetTeammateOffsideLineOpp() &&
       mpAgent->GetFormation().GetMyRole().mLineType == LT_Forward &&
       eva <= mpWorldState->GetPlayer(unum).GetPosDelay())) {
    RaiseForgotObject(unum);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testl %esi, %esi
je 0x4a2aa
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%rdi), %rax
leal -0x1(%rbx), %ecx
imulq $0x178, %rcx, %r15      # imm = 0x178
movl %esi, %ecx
notl %ecx
imulq $0x178, %rcx, %r12      # imm = 0x178
testl %esi, %esi
leaq 0xa8(%rax,%r15), %rcx
leaq 0x10d0(%rax,%r12), %rax
cmovgq %rcx, %rax
cmpb $0x1, 0x112(%rax)
jne 0x4a2aa
movq 0x20(%r14), %rax
cmpl %ebx, 0x11c(%rax)
je 0x4a2aa
movsd 0xcf1c(%rip), %xmm2     # 0x57040
ucomisd %xmm0, %xmm2
jbe 0x4a1c7
movq 0x28(%r14), %rdi
callq 0x244e8
movq 0x20(%r14), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
movl %ebx, %edx
callq 0x3ba96
movsd (%rax), %xmm0
movsd 0xda99(%rip), %xmm1     # 0x57bf0
ucomisd %xmm0, %xmm1
jbe 0x4a16f
movsd 0xfd0b(%rip), %xmm0     # 0x59e70
movsd 0xced3(%rip), %xmm2     # 0x57040
jmp 0x4a1c7
movsd 0xfcf9(%rip), %xmm1     # 0x59e70
ucomisd %xmm0, %xmm1
movsd 0xcebd(%rip), %xmm2     # 0x57040
jbe 0x4a18f
movsd 0xd80b(%rip), %xmm0     # 0x57998
jmp 0x4a1c7
movsd 0xedc1(%rip), %xmm1     # 0x58f58
ucomisd %xmm0, %xmm1
jbe 0x4a1a7
movsd 0xd583(%rip), %xmm0     # 0x57728
jmp 0x4a1c7
movsd 0xed99(%rip), %xmm1     # 0x58f48
ucomisd %xmm0, %xmm1
jbe 0x4a1bf
movsd 0x11423(%rip), %xmm0    # 0x5b5e0
jmp 0x4a1c7
movsd 0xdc79(%rip), %xmm0     # 0x57e40
pushq $0xb
popq %rax
subl %ebx, %eax
testl %ebx, %ebx
movl %ebx, %ecx
cmovnsq %rcx, %rax
shlq $0x6, %rax
testl %ebx, %ebx
movapd %xmm0, %xmm1
minsd 0x48(%r14,%rax), %xmm1
movsd %xmm1, 0x48(%r14,%rax)
movq 0x10(%r14), %rax
leaq 0xa8(%rax,%r15), %rdx
leaq 0x10d0(%rax,%r12), %rcx
cmovgq %rdx, %rcx
movsd 0xd54c(%rip), %xmm1     # 0x57758
ucomisd %xmm0, %xmm1
movsd %xmm0, -0x28(%rbp)
jb 0x4a22c
ucomisd 0x20(%rcx), %xmm2
jbe 0x4a22c
movq %r14, %rdi
movl %ebx, %esi
callq 0x49406
movq 0x10(%r14), %rax
movl 0x1c(%rax), %ecx
addl $-0xf, %ecx
cmpl $0x1, %ecx
ja 0x4a256
testl %ebx, %ebx
leaq 0xa8(%rax,%r15), %rcx
leaq 0x10d0(%rax,%r12), %rax
cmovgq %rcx, %rax
cmpb $0x0, 0x175(%rax)
jne 0x4a2b7
movq 0x28(%r14), %rdi
callq 0x244e8
movl 0x1798(%rax), %eax
addl %ebx, %eax
jne 0x4a2aa
movq 0x8(%r14), %rdi
callq 0x10dfe
movq %rax, %rdi
callq 0x20a4c
movsd -0x28(%rbp), %xmm1
cmpl $0x3, 0x8(%rax)
jne 0x4a2aa
testl %ebx, %ebx
movq 0x10(%r14), %rax
leaq 0xa8(%rax,%r15), %rcx
leaq 0x10d0(%rax,%r12), %rax
cmovgq %rcx, %rax
cvtsi2sdl 0x18(%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0x4a2b7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x49406
nop