// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/BehaviorMark.cpp
// Function: BehaviorMarkPlanner::Plan(std::__cxx11::list<ActiveBehavior, std::allocator<ActiveBehavior>>&)
void BehaviorMarkPlanner::Plan(std::list<ActiveBehavior> &behavior_list) {
  Unum closest_opp =
      mPositionInfo.GetClosestOpponentToTeammate(mSelfState.GetUnum());
  Unum closest_tm = mPositionInfo.GetClosestTeammateToOpponent(closest_opp);

  if (closest_opp && closest_tm && closest_tm == mSelfState.GetUnum()) {
    ActiveBehavior mark(mAgent, BT_Mark);

    Vector ballPos = mBallState.GetPos();
    AngleDeg b2o =
        (mBallState.GetPos() - mWorldState.GetOpponent(closest_opp).GetPos())
            .Dir();
    mark.mBuffer = mSelfState.GetKickableArea();
    mark.mPower = mSelfState.CorrectDashPowerForStamina(
        ServerParam::instance().maxDashPower());
    mark.mTarget = mWorldState.GetOpponent(closest_opp).GetPos() +
                   Polar2Vector(mark.mBuffer, b2o);
    mark.mEvaluation =
        Evaluation::instance().EvaluatePosition(mark.mTarget, false);
    if (mAgent.GetFormation().GetMyRole().mLineType == LT_Defender) {
      mark.mEvaluation =
          Evaluation::instance().EvaluatePosition(mark.mTarget, true);
    }

    behavior_list.push_back(mark);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq 0x28(%rax), %rcx
movq %rcx, -0x118(%rbp)
movq 0x20(%rax), %rdi
callq 0x1b470
movq -0x118(%rbp), %rdi
movl %eax, %esi
callq 0x22160
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq 0x28(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x221c0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x21f8c
cmpl $0x0, -0x18(%rbp)
je 0x21f8c
movq -0x110(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, -0x11c(%rbp)
movq 0x20(%rax), %rdi
callq 0x1b470
movl %eax, %ecx
movl -0x11c(%rbp), %eax
cmpl %ecx, %eax
jne 0x21f8c
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0xc0(%rbp), %rdi
movl $0xc, %edx
xorl %ecx, %ecx
callq 0x1b4d0
movq -0x110(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, -0xd0(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, -0x138(%rbp)
movq 0x10(%rax), %rdi
leaq -0x14(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0x110a0
movsd %xmm0, -0xe8(%rbp)
movsd %xmm1, -0xe0(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x10520
movq -0x110(%rbp), %rax
movsd %xmm0, -0xd8(%rbp)
movq 0x20(%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rcx
movq -0x110(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x20(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x130(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12b60
movq -0x130(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x7c940
movq -0x110(%rbp), %rax
movsd %xmm0, -0x88(%rbp)
movq 0x10(%rax), %rdi
leaq -0x14(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, -0x128(%rbp)
leaq -0xc0(%rbp), %rdi
addq $0xa0, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x112c0
movq -0x128(%rbp), %rdi
movsd %xmm0, -0x108(%rbp)
movsd %xmm1, -0x100(%rbp)
leaq -0x108(%rbp), %rsi
callq 0x11360
movsd %xmm0, -0xf8(%rbp)
movsd %xmm1, -0xf0(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x90(%rbp)
callq 0x38230
movq %rax, %rdi
leaq -0xc0(%rbp), %rsi
addq $0x28, %rsi
xorl %edx, %edx
callq 0x382c0
movq -0x110(%rbp), %rax
movsd %xmm0, -0xb0(%rbp)
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x1, 0x8(%rax)
jne 0x21f7c
callq 0x38230
movq %rax, %rdi
leaq -0xc0(%rbp), %rsi
addq $0x28, %rsi
movl $0x1, %edx
callq 0x382c0
movsd %xmm0, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x189a0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop