// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/BehaviorAttack.cpp
// Function: BehaviorAttackPlanner::Plan(std::__cxx11::list<ActiveBehavior, std::allocator<ActiveBehavior>>&)
void BehaviorAttackPlanner::Plan(std::list<ActiveBehavior> &behavior_list) {
  if (mSelfState.IsBallCatchable() && mStrategy.IsLastOppControl() &&
      (!(mAgent.IsLastActiveBehaviorInActOf(BT_Pass) ||
         mAgent.IsLastActiveBehaviorInActOf(BT_Dribble))))
    return;

  BehaviorInterceptPlanner(mAgent).Plan(mActiveBehaviorList);
  BehaviorShootPlanner(mAgent).Plan(mActiveBehaviorList);
  BehaviorPassPlanner(mAgent).Plan(mActiveBehaviorList);
  BehaviorDribblePlanner(mAgent).Plan(mActiveBehaviorList);
  BehaviorPositionPlanner(mAgent).Plan(mActiveBehaviorList);
  BehaviorHoldPlanner(mAgent).Plan(mActiveBehaviorList);

  if (!mActiveBehaviorList.empty()) {
    mActiveBehaviorList.sort(std::greater<ActiveBehavior>());
    behavior_list.push_back(mActiveBehaviorList.front());

    if (mActiveBehaviorList.size() > 1) { //允许非最优行为提交视觉请求
      double plus = 1.0;
      ActiveBehaviorPtr it = mActiveBehaviorList.begin();
      for (++it; it != mActiveBehaviorList.end(); ++it) {
        it->SubmitVisualRequest(plus);
        plus *= 2.0;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x288(%rbp)
movq 0x20(%rax), %rdi
callq 0x184c0
testb $0x1, %al
jne 0x180cd
jmp 0x1811a
movq -0x288(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x18500
testb $0x1, %al
jne 0x180e3
jmp 0x1811a
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x7, %esi
callq 0x18520
testb $0x1, %al
jne 0x1811a
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x5, %esi
callq 0x18520
testb $0x1, %al
jne 0x1811a
jmp 0x1845a
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x20cf0
movq -0x288(%rbp), %rsi
movq -0x290(%rbp), %rdi
addq $0x48, %rsi
callq 0x20d80
jmp 0x1814e
leaq -0x70(%rbp), %rdi
callq 0x20d30
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x27700
movq -0x288(%rbp), %rsi
movq -0x298(%rbp), %rdi
addq $0x48, %rsi
callq 0x27790
jmp 0x1818e
leaq -0xe0(%rbp), %rdi
callq 0x27740
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x140(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x22600
movq -0x288(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
addq $0x48, %rsi
callq 0x22690
jmp 0x181d1
leaq -0x140(%rbp), %rdi
callq 0x22640
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x1ca40
movq -0x288(%rbp), %rsi
movq -0x2a8(%rbp), %rdi
addq $0x48, %rsi
callq 0x1cad0
jmp 0x18214
leaq -0x1a0(%rbp), %rdi
callq 0x1ca80
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x200(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x257e0
movq -0x288(%rbp), %rsi
movq -0x2b0(%rbp), %rdi
addq $0x48, %rsi
callq 0x25820
jmp 0x18257
leaq -0x200(%rbp), %rdi
callq 0x25790
movq -0x288(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x260(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x20110
movq -0x288(%rbp), %rsi
movq -0x2b8(%rbp), %rdi
addq $0x48, %rsi
callq 0x201a0
jmp 0x1829a
leaq -0x260(%rbp), %rdi
callq 0x20150
movq -0x288(%rbp), %rdi
addq $0x48, %rdi
callq 0x18580
testb $0x1, %al
jne 0x1845a
movq -0x288(%rbp), %rdi
addq $0x48, %rdi
callq 0x185a0
movq -0x288(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x2c0(%rbp)
addq $0x48, %rdi
callq 0x189e0
movq -0x2c0(%rbp), %rdi
movq %rax, %rsi
callq 0x189a0
movq -0x288(%rbp), %rdi
addq $0x48, %rdi
callq 0x18a10
cmpq $0x1, %rax
jbe 0x18458
movq -0x288(%rbp), %rdi
movsd 0xa8cef(%rip), %xmm0    # 0xc1010
movsd %xmm0, -0x270(%rbp)
addq $0x48, %rdi
callq 0x18a40
movq %rax, -0x278(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x18a70
movq -0x288(%rbp), %rdi
addq $0x48, %rdi
callq 0x18ac0
movq %rax, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x18a90
testb $0x1, %al
jne 0x18378
jmp 0x18456
leaq -0x278(%rbp), %rdi
callq 0x18af0
movq %rax, %rdi
movsd -0x270(%rbp), %xmm0
callq 0x1a130
movsd 0xa9114(%rip), %xmm0    # 0xc14b0
mulsd -0x270(%rbp), %xmm0
movsd %xmm0, -0x270(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x18a70
jmp 0x18345
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x20d30
jmp 0x18463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x27740
jmp 0x18463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x22640
jmp 0x18463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x1ca80
jmp 0x18463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x25790
jmp 0x18463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x20150
jmp 0x18463
jmp 0x18458
jmp 0x1845a
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0xaa60
nopl (%rax)