// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/BehaviorSetplay.cpp
// Function: BehaviorSetplayExecuter::Execute(ActiveBehavior const&)
bool BehaviorSetplayExecuter::Execute(const ActiveBehavior &setplay) {
  if (mWorldState.GetPlayMode() == PM_Before_Kick_Off) {
    if (setplay.mDetailType == BDT_Setplay_Move) {
      return mAgent.Move(setplay.mTarget);
    } else if (setplay.mDetailType == BDT_Setplay_Scan) {
      VisualSystem::instance().ForbidDecision(mAgent);
      return mAgent.Turn(50.0);
    } else {
      PRINT_ERROR("Setplay Detail Type Error");
      return false;
    }
  } else {
    if (setplay.mDetailType == BDT_Setplay_Scan) {
      return true; //交给视觉决策
    } else if (setplay.mDetailType == BDT_Setplay_GetBall) {
      return Dasher::instance().GetBall(mAgent);
    }
    if (setplay.mDetailType == BDT_Setplay_Move) {
      return mAgent.Move(setplay.mTarget);
    } else {
      PRINT_ERROR("Setplay Detail Type Error");
      return false;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rax), %rdi
callq 0x10ed0
cmpl $0x16, %eax
jne 0x267b4
movq -0x18(%rbp), %rax
cmpl $0xf, 0x98(%rax)
jne 0x2670c
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
callq 0x27200
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x268a6
movq -0x18(%rbp), %rax
cmpl $0x10, 0x98(%rax)
jne 0x2674d
callq 0xa47b0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x27250
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movsd 0x9b6ca(%rip), %xmm0    # 0xc1e08
callq 0x10430
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x268a6
jmp 0x2674f
movq 0xd789a(%rip), %rdi     # 0xfdff0
leaq 0x9b6ea(%rip), %rsi     # 0xc1e47
callq 0xa5a0
movq %rax, %rdi
leaq 0x9eae5(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x45, %esi
callq 0xaa40
movq %rax, %rdi
leaq 0x9cdd7(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x9b6cb(%rip), %rsi     # 0xc1e62
callq 0xa5a0
movq %rax, %rdi
movq 0xd780a(%rip), %rsi     # 0xfdfb0
callq 0xa630
movb $0x0, -0x1(%rbp)
jmp 0x268a6
movq -0x18(%rbp), %rax
cmpl $0x10, 0x98(%rax)
jne 0x267ca
movb $0x1, -0x1(%rbp)
jmp 0x268a6
movq -0x18(%rbp), %rax
cmpl $0x11, 0x98(%rax)
jne 0x26803
callq 0x2ec90
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x31990
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x268a6
jmp 0x26805
movq -0x18(%rbp), %rax
cmpl $0xf, 0x98(%rax)
jne 0x26844
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x27200
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x268a6
jmp 0x26846
movq 0xd77a3(%rip), %rdi     # 0xfdff0
leaq 0x9b5f3(%rip), %rsi     # 0xc1e47
callq 0xa5a0
movq %rax, %rdi
leaq 0x9e9ee(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x51, %esi
callq 0xaa40
movq %rax, %rdi
leaq 0x9cce0(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x9b5d4(%rip), %rsi     # 0xc1e62
callq 0xa5a0
movq %rax, %rdi
movq 0xd7713(%rip), %rsi     # 0xfdfb0
callq 0xa630
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)