// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rdi
movl 0x11c(%rax), %esi
callq 0x14a28
movl %eax, %r12d
movq 0x28(%r14), %rdi
movl %eax, %esi
callq 0x14a5a
testl %r12d, %r12d
sete %cl
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x1490d
movq 0x20(%r14), %rcx
cmpl 0x11c(%rcx), %eax
jne 0x1490d
movq 0x8(%r14), %rax
leaq -0x40(%rbp), %r15
movl $0xc, -0xa0(%r15)
movq %rax, -0x98(%r15)
andq $0x0, -0x90(%r15)
andl $0x0, -0x88(%r15)
andl $0x0, -0x48(%r15)
andq $0x0, -0x40(%r15)
andl $0x0, -0x38(%r15)
andq $0x0, -0x30(%r15)
andl $0x0, -0x28(%r15)
andq $0x0, -0x20(%r15)
andl $0x0, -0x18(%r15)
andq $0x0, -0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, -0x80(%r15)
movups %xmm0, -0x70(%r15)
movups %xmm0, -0x60(%r15)
movb $0x0, -0x50(%r15)
andl $0x0, -0x8(%r15)
movq 0x18(%r14), %rax
movq 0x10(%r14), %rcx
decl %r12d
movslq %r12d, %rdx
imulq $0x178, %rdx, %r13      # imm = 0x178
movsd 0x8(%rax), %xmm0
movsd 0x10(%rax), %xmm1
subsd 0x10d8(%rcx,%r13), %xmm0
subsd 0x10e0(%rcx,%r13), %xmm1
leaq -0x38(%rbp), %r12
movsd %xmm0, (%r12)
movsd %xmm1, 0x8(%r12)
movq %r12, %rdi
callq 0xcd30
movsd %xmm0, (%r12)
movq 0x20(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movsd (%rax), %xmm0
movsd %xmm0, (%r15)
movq 0x20(%r14), %r12
callq 0x3db2c
movsd 0x33c0(%rax), %xmm0
movq %r12, %rdi
callq 0x3a8ce
movsd %xmm0, -0x68(%r15)
movq 0x10(%r14), %r12
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
callq 0xd15b
addsd 0x10d8(%r12,%r13), %xmm0
addsd 0x10e0(%r12,%r13), %xmm1
leaq -0xb8(%rbp), %r15
movsd %xmm0, (%r15)
movsd %xmm1, 0x8(%r15)
callq 0x1efde
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1f058
movsd %xmm0, -0x18(%r15)
movq 0x8(%r14), %rdi
callq 0x10dfe
movq %rax, %rdi
callq 0x20a4c
cmpl $0x1, 0x8(%rax)
jne 0x148fe
callq 0x1efde
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x1f058
movsd %xmm0, -0xd0(%rbp)
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x10530
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop