// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/BehaviorPosition.cpp
// Function: BehaviorPositionPlanner::Plan(std::__cxx11::list<ActiveBehavior, std::allocator<ActiveBehavior>>&)
void BehaviorPositionPlanner::Plan(ActiveBehaviorList &behavior_list) {
  if (!behavior_list.empty())
    return;

  if (mSelfState.IsGoalie())
    return;
  if (mStrategy.IsOppControl())
    return;
  if (mWorldState.GetPlayMode() > PM_Opp_Mode)
    return;

  ActiveBehavior position(mAgent, BT_Position);
  Vector target;
  position.mBuffer = 1.0;
  target = mStrategy.GetTeammateSBSPPosition(mSelfState.GetUnum(),
                                             mBallState.GetPos());
  if (mPositionInfo.GetTeammateWithBall() &&
      mPositionInfo.GetClosestPlayerToTeammate(
          mPositionInfo.GetTeammateWithBall()) == mSelfState.GetUnum()) {
    if ((mWorldState
             .GetOpponent(mPositionInfo.GetClosestOpponentToTeammate(
                 mSelfState.GetUnum()))
             .GetPos() -
         mSelfState.GetPos())
            .Mod() >= 1.0)
      position.mTarget = target;
    else {
      position.mTarget.SetX(target.X() + 1.0);
      position.mTarget.SetY(target.Y());
    }

  } else
    position.mTarget = target;

  if (mWorldState.GetPlayMode() == PM_Our_Goalie_Free_Kick &&
      mAgent.GetFormation().GetMyRole().mLineType == LT_Forward) {
    if (mAgent.GetFormation().GetMyRole().mPositionType == PT_Left) {
      position.mTarget.SetY(26);
    }
    if (mAgent.GetFormation().GetMyRole().mPositionType == PT_Right) {
      position.mTarget.SetY(-26);
    }
  }

  Unum opp = mPositionInfo.GetClosestOpponentToPoint(position.mTarget);
  if (mWorldState.GetOpponent(opp).GetPos().Dist(position.mTarget) < 1.5) {
    int p =
        mWorldState.GetOpponent(mPositionInfo.GetClosestOpponentToPlayer(opp))
                    .GetPos()
                    .Y() > mWorldState.GetOpponent(opp).GetPos().X()
            ? -1
            : 1;
    position.mTarget.SetY(target.Y() + p * 2);
  }

  if (mPositionInfo.GetOpponentOffsideLine() > mBallState.GetPos().X()) {
    position.mTarget.SetX(
        Min(target.X(), (mPositionInfo.GetOpponentOffsideLine())));
  }
  if (position.mTarget.X() > mSelfState.GetPos().X() &&
      mAgent.GetFormation().GetMyRole().mLineType == LT_Forward) {
    position.mPower = mSelfState.CorrectDashPowerForStamina(
        ServerParam::instance().maxDashPower());
  } else if (position.mTarget.X() < mSelfState.GetPos().X() &&
             mAgent.GetFormation().GetMyRole().mLineType == LT_Defender) {
    position.mPower = mSelfState.CorrectDashPowerForStamina(
        ServerParam::instance().maxDashPower());
  } else
    position.mPower = mSelfState.CorrectDashPowerForStamina(
                          ServerParam::instance().maxDashPower()) /
                      2;
  position.mEvaluation =
      Evaluation::instance().EvaluatePosition(position.mTarget, false);

  behavior_list.push_back(position);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18580
testb $0x1, %al
jne 0x25850
jmp 0x25fbc
movq -0x138(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x1d780
testb $0x1, %al
jne 0x25866
jmp 0x2586b
jmp 0x25fbc
movq -0x138(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x26190
testb $0x1, %al
jne 0x25881
jmp 0x25886
jmp 0x25fbc
movq -0x138(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x10ed0
cmpl $0x24, %eax
jle 0x258a0
jmp 0x25fbc
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0xb8(%rbp), %rdi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x1b4d0
xorps %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xd8(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x11a10
movq -0x138(%rbp), %rax
movsd 0x9b713(%rip), %xmm0    # 0xc1010
movsd %xmm0, -0x18(%rbp)
movq 0x38(%rax), %rcx
movq %rcx, -0x148(%rbp)
movq 0x20(%rax), %rdi
callq 0x1b470
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x13c(%rbp)
movq 0x18(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x148(%rbp), %rdi
movl -0x13c(%rbp), %esi
movq %rax, %rdx
callq 0x8a810
movq -0x138(%rbp), %rax
movsd %xmm0, -0xe8(%rbp)
movsd %xmm1, -0xe0(%rbp)
movq -0xe8(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq -0xe0(%rbp), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x28(%rax), %rdi
callq 0x80c50
cmpl $0x0, %eax
je 0x25b1f
movq -0x138(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x28(%rax), %rdi
callq 0x80c50
movq -0x158(%rbp), %rdi
movl %eax, %esi
callq 0x261b0
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x14c(%rbp)
movq 0x20(%rax), %rdi
callq 0x1b470
movl %eax, %ecx
movl -0x14c(%rbp), %eax
cmpl %ecx, %eax
jne 0x25b1f
movq -0x138(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x168(%rbp)
movq 0x28(%rax), %rcx
movq %rcx, -0x170(%rbp)
movq 0x20(%rax), %rdi
callq 0x1b470
movq -0x170(%rbp), %rdi
movl %eax, %esi
callq 0x22160
movq -0x168(%rbp), %rdi
movl %eax, -0xfc(%rbp)
leaq -0xfc(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x160(%rbp)
movq 0x20(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq -0x160(%rbp), %rdi
movq %rax, %rsi
callq 0x110a0
movsd %xmm0, -0xf8(%rbp)
movsd %xmm1, -0xf0(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x104e0
movsd 0x9b589(%rip), %xmm1    # 0xc1010
ucomisd %xmm1, %xmm0
jb 0x25aab
movq -0xc8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x25b1d
leaq -0xb8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x180(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x176f0
movq -0x180(%rbp), %rdi
movsd 0x9b538(%rip), %xmm0    # 0xc1010
addsd (%rax), %xmm0
movsd %xmm0, -0x108(%rbp)
leaq -0x108(%rbp), %rsi
callq 0x1ee90
leaq -0xb8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x178(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x17700
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x26210
jmp 0x25b3b
movq -0xc8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x138(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x10ed0
cmpl $0x8, %eax
jne 0x25c02
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x3, 0x8(%rax)
jne 0x25c02
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x1, 0xc(%rax)
jne 0x25bbb
leaq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movsd 0x9c1a9(%rip), %xmm0    # 0xc1d50
movsd %xmm0, -0x110(%rbp)
leaq -0x110(%rbp), %rsi
callq 0x26210
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x3, 0xc(%rax)
jne 0x25c00
leaq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movsd 0x9c16c(%rip), %xmm0    # 0xc1d58
movsd %xmm0, -0x118(%rbp)
leaq -0x118(%rbp), %rsi
callq 0x26210
jmp 0x25c02
movq -0x138(%rbp), %rax
movq 0x28(%rax), %rdi
leaq -0xb8(%rbp), %rsi
addq $0x28, %rsi
callq 0x26230
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x11c(%rbp)
movq 0x10(%rax), %rdi
leaq -0x11c(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
addq $0x28, %rsi
callq 0x1d6d0
movaps %xmm0, %xmm1
movsd 0x9c0fa(%rip), %xmm0    # 0xc1d60
ucomisd %xmm1, %xmm0
jbe 0x25d68
movq -0x138(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x198(%rbp)
movq 0x28(%rax), %rdi
movl -0x11c(%rbp), %esi
callq 0x262e0
movq -0x198(%rbp), %rdi
movl %eax, -0x124(%rbp)
leaq -0x124(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x17700
movq %rax, %rcx
movq -0x138(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x190(%rbp)
movq 0x10(%rax), %rdi
leaq -0x11c(%rbp), %rsi
callq 0x1d480
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x176f0
movsd -0x190(%rbp), %xmm0
movsd (%rax), %xmm1
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, -0x120(%rbp)
leaq -0xb8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x188(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x17700
movq -0x188(%rbp), %rdi
movsd (%rax), %xmm0
movl -0x120(%rbp), %eax
shll %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
leaq -0x130(%rbp), %rsi
callq 0x26210
movq -0x138(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x26340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movq 0x18(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x176f0
movsd -0x1a0(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x25e07
leaq -0xb8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x1a8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x176f0
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x1b0(%rbp)
movq 0x28(%rax), %rdi
callq 0x26340
movq -0x1b0(%rbp), %rdi
movq %rax, %rsi
callq 0x12a60
movq -0x1a8(%rbp), %rdi
movq %rax, %rsi
callq 0x1ee90
leaq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x176f0
movq %rax, %rcx
movq -0x138(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x1b8(%rbp)
movq 0x20(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x176f0
movsd -0x1b8(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x25ea7
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x3, 0x8(%rax)
jne 0x25ea7
movq -0x138(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1c0(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12b60
movq -0x1c0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x7c940
movsd %xmm0, -0x80(%rbp)
jmp 0x25f8a
leaq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x176f0
movq %rax, %rcx
movq -0x138(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x1c8(%rbp)
movq 0x20(%rax), %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x176f0
movsd -0x1c8(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x25f48
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
callq 0x3d5f0
cmpl $0x1, 0x8(%rax)
jne 0x25f48
movq -0x138(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1d0(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12b60
movq -0x1d0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x7c940
movsd %xmm0, -0x80(%rbp)
jmp 0x25f88
movq -0x138(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1d8(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12b60
movq -0x1d8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x7c940
movsd 0x9b531(%rip), %xmm1    # 0xc14b0
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0x25f8a
callq 0x38230
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
addq $0x28, %rsi
xorl %edx, %edx
callq 0x382c0
movsd %xmm0, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x189a0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop