// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/BehaviorPass.cpp
// Function: BehaviorPassExecuter::Execute(ActiveBehavior const&)
bool BehaviorPassExecuter::Execute(const ActiveBehavior &pass) {
  Logger::instance().LogPass(false, mBallState.GetPos(), pass.mTarget, "@Pass",
                             true);
  if (pass.mDetailType == BDT_Pass_Direct)
    return Kicker::instance().KickBall(mAgent, pass.mTarget, pass.mKickSpeed,
                                       KM_Quick);
  if (pass.mDetailType == BDT_Pass_Clear) {
    //		Logger::instance().GetTextLogger("Clear")<<
    //mWorldState.CurrentTime().S() + "Clear";
    if (Tackler::instance().CanTackleToDir(mAgent, pass.mAngle) &&
        Tackler::instance().GetBallVelAfterTackle(mAgent, pass.mAngle).Mod() >
            Kicker::instance().GetMaxSpeed(mAgent, pass.mTarget, 1) - 0.08)
      return Tackler::instance().TackleToDir(mAgent, pass.mAngle);
    else
      return Kicker::instance().KickBall(mAgent, pass.mTarget,
                                         ServerParam::instance().ballSpeedMax(),
                                         KM_Quick, 0);
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x5add0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
addq $0x28, %rcx
xorl %esi, %esi
leaq 0x9f7c4(%rip), %r8      # 0xc1bf1
movl $0x1, %r9d
callq 0x5ba00
movq -0x18(%rbp), %rax
cmpl $0x3, 0x98(%rax)
jne 0x22482
callq 0x4ff20
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm0
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x541f0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x225d2
movq -0x18(%rbp), %rax
cmpl $0x4, 0x98(%rax)
jne 0x225ce
callq 0x8b3f0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
callq 0x8c210
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0x224c1
jmp 0x22545
callq 0x8b3f0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movsd 0x20(%rax), %xmm0
callq 0x8ba70
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x104e0
movsd %xmm0, -0x50(%rbp)
callq 0x4ff20
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
movl $0x1, -0x2c(%rbp)
leaq -0x2c(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x51150
movaps %xmm0, %xmm1
movsd -0x50(%rbp), %xmm0
movsd 0x9f661(%rip), %xmm2    # 0xc1b98
subsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
seta %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x2254e
jmp 0x22574
callq 0x8b3f0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
xorl %ecx, %ecx
callq 0x8c2d0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x225d2
callq 0x4ff20
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x68(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x58(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x23d60
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movsd (%rax), %xmm0
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x541f0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x225d2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)