// File: /workspace/github_cpp_makefile_star2_O1/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 0x59154
movl %esi, %ebx
movq %rdi, %r14
leal -0x1(%rbx), %r12d
testl %esi, %esi
movl %esi, %r15d
notl %r15d
movl %r15d, %eax
cmovgl %r12d, %eax
movl $0xa8, %ecx
movl $0x10d0, %edx           # imm = 0x10D0
cmovgq %rcx, %rdx
addq 0x10(%rdi), %rdx
cltq
imulq $0x178, %rax, %rax      # imm = 0x178
cmpb $0x1, 0x112(%rax,%rdx)
jne 0x59154
movq 0x20(%r14), %rax
cmpl %ebx, 0x11c(%rax)
je 0x59154
movsd 0x1209c(%rip), %xmm2    # 0x6b040
ucomisd %xmm0, %xmm2
jbe 0x59044
movq 0x28(%r14), %rdi
callq 0x2adf8
movq 0x20(%r14), %rcx
movl 0x11c(%rcx), %esi
movq %rax, %rdi
movl %ebx, %edx
callq 0x4848a
movsd (%rax), %xmm0
movsd 0x12c49(%rip), %xmm1    # 0x6bc20
ucomisd %xmm0, %xmm1
jbe 0x58fef
movsd 0x14edb(%rip), %xmm0    # 0x6dec0
movsd 0x12053(%rip), %xmm2    # 0x6b040
jmp 0x59044
movsd 0x14ec9(%rip), %xmm1    # 0x6dec0
ucomisd %xmm0, %xmm1
movsd 0x1203d(%rip), %xmm2    # 0x6b040
jbe 0x5900f
movsd 0x129bb(%rip), %xmm0    # 0x6b9c8
jmp 0x59044
movsd 0x13f91(%rip), %xmm1    # 0x6cfa8
ucomisd %xmm0, %xmm1
jbe 0x59027
movsd 0x1273b(%rip), %xmm0    # 0x6b760
jmp 0x59044
movsd 0x13f69(%rip), %xmm1    # 0x6cf98
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x165b1(%rip), %rcx     # 0x6f5f0
movsd (%rcx,%rax,8), %xmm0
testl %ebx, %ebx
movl $0xa8, %ecx
movl $0x10d0, %eax           # imm = 0x10D0
cmovgq %rcx, %rax
movl %r15d, %ecx
cmovgl %r12d, %ecx
movl $0xb, %edx
subl %ebx, %edx
testl %ebx, %ebx
movslq %ebx, %rsi
movslq %edx, %rdx
cmovnsq %rsi, %rdx
shlq $0x6, %rdx
movapd %xmm0, %xmm1
minsd 0x48(%r14,%rdx), %xmm1
movsd %xmm1, 0x48(%r14,%rdx)
movsd 0x126f4(%rip), %xmm1    # 0x6b780
ucomisd %xmm0, %xmm1
movsd %xmm0, -0x28(%rbp)
jb 0x590b7
addq 0x10(%r14), %rax
movslq %ecx, %rcx
imulq $0x178, %rcx, %rcx      # imm = 0x178
ucomisd 0x20(%rcx,%rax), %xmm2
jbe 0x590b7
movq %r14, %rdi
movl %ebx, %esi
callq 0x57fba
movq 0x10(%r14), %rax
movl 0x1c(%rax), %ecx
addl $-0xf, %ecx
cmpl $0x1, %ecx
ja 0x590f4
leaq 0x10d0(%rax), %rcx
addq $0xa8, %rax
testl %ebx, %ebx
movl %r15d, %edx
cmovgl %r12d, %edx
cmovleq %rcx, %rax
movslq %edx, %rcx
imulq $0x178, %rcx, %rcx      # imm = 0x178
cmpb $0x0, 0x175(%rax,%rcx)
jne 0x59161
movq 0x28(%r14), %rdi
callq 0x2adf8
movl 0x1798(%rax), %eax
addl %ebx, %eax
jne 0x59154
movq 0x8(%r14), %rdi
callq 0x1356e
movq %rax, %rdi
callq 0x26e20
movsd -0x28(%rbp), %xmm1
cmpl $0x3, 0x8(%rax)
jne 0x59154
testl %ebx, %ebx
cmovgl %r12d, %r15d
movl $0xa8, %eax
movl $0x10d0, %ecx           # imm = 0x10D0
cmovgq %rax, %rcx
addq 0x10(%r14), %rcx
movslq %r15d, %rax
imulq $0x178, %rax, %rax      # imm = 0x178
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rax,%rcx), %xmm0
ucomisd %xmm1, %xmm0
jae 0x59161
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 0x57fba
nop