// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/DecisionTree.cpp
// Function: DecisionTree::Search(Agent&, int)
ActiveBehavior DecisionTree::Search(Agent &agent, int step) {
  if (step == 1) {
    if (agent.GetSelf().IsIdling()) {
      return ActiveBehavior(agent, BT_None);
    }

    std::list<ActiveBehavior> active_behavior_list;

    if (agent.GetSelf().IsGoalie()) {
      MutexPlan<BehaviorPenaltyPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorSetplayPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorAttackPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorGoaliePlanner>(agent, active_behavior_list);
    } else {
      MutexPlan<BehaviorPenaltyPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorSetplayPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorAttackPlanner>(agent, active_behavior_list) ||
          MutexPlan<BehaviorDefensePlanner>(agent, active_behavior_list);
    }

    if (!active_behavior_list.empty()) {
      return GetBestActiveBehavior(agent, active_behavior_list);
    } else {
      return ActiveBehavior(agent, BT_None);
    }
  } else {
    return ActiveBehavior(agent, BT_None);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x1, %ecx
jne 0x223c9
movq %rsi, %r15
movq %r14, %rdi
callq 0xe75a
cmpl $0x0, 0xc8(%rax)
jg 0x223c9
cmpl $0x0, 0x124(%rax)
jg 0x223c9
leaq -0x38(%rbp), %r12
movq %r12, 0x8(%r12)
movq %r12, (%r12)
movq $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0xe75a
cmpb $0x1, 0x175(%rax)
jne 0x2242d
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2258a
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x225dc
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2262e
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x22680
jmp 0x22475
xorl %eax, %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movl %eax, 0x18(%rbx)
movl %eax, 0x58(%rbx)
movq %rax, 0x60(%rbx)
movl %eax, 0x68(%rbx)
movq %rax, 0x70(%rbx)
movl %eax, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movl %eax, 0x88(%rbx)
movq %rax, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movb $0x0, 0x50(%rbx)
movl %eax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2258a
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x225dc
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2262e
testb %al, %al
jne 0x22475
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x226d2
movq -0x38(%rbp), %r15
cmpq %r12, %r15
je 0x224aa
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0xf3b0
leaq -0x38(%rbp), %rdi
callq 0x12934
movq -0x38(%rbp), %r15
leaq 0x10(%r15), %rsi
movl $0xa8, %edx
movq %rbx, %rdi
callq 0x93e0
jmp 0x224fe
xorl %eax, %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movl %eax, 0x18(%rbx)
movl %eax, 0x58(%rbx)
movq %rax, 0x60(%rbx)
movl %eax, 0x68(%rbx)
movq %rax, 0x70(%rbx)
movl %eax, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movl %eax, 0x88(%rbx)
movq %rax, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movb $0x0, 0x50(%rbx)
movl %eax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
cmpq %r12, %r15
je 0x2241d
movq (%r15), %r14
movl $0xb8, %esi
movq %r15, %rdi
callq 0x94e0
movq %r14, %r15
cmpq %r12, %r14
jne 0x22507
jmp 0x2241d
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r12, %rdi
je 0x22545
movq (%rdi), %r14
movl $0xb8, %esi
callq 0x94e0
movq %r14, %rdi
cmpq %r12, %r14
jne 0x22530
movq %rbx, %rdi
callq 0x98b0
nop