// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Strategy.cpp
// Function: Strategy::SituationAnalyse()
void Strategy::SituationAnalyse() {
  if (mController < 0 && mWorldState.GetBall().GetPos().X() < -10) {
    mSituation = ST_Defense;
  } else {
    if (!mIsBallFree) {
      if (mController >= 0) {
        if (mBallInterPos.X() < 32.0) {
          if (mInfoState.GetPositionInfo().GetTeammateOffsideLine() > 40.0 &&
              mAgent.GetFormation()
                      .GetTeammateRoleType(mController)
                      .mLineType == LT_Midfielder &&
              mBallInterPos.X() > 25.0) {
            mSituation = ST_Penalty_Attack;
          } else {
            mSituation = ST_Forward_Attack;
          }
        } else {
          mSituation = ST_Penalty_Attack;
        }
      } else {
        mSituation = ST_Defense;
      }
    } else {
      if (IsMyControl() || mSureTmInterCycle <= mSureOppInterCycle) {
        if (mBallInterPos.X() < 32.0 && mController > 0) {
          if (mInfoState.GetPositionInfo().GetTeammateOffsideLine() > 40.0 &&
              mAgent.GetFormation()
                      .GetTeammateRoleType(mController)
                      .mLineType == LT_Midfielder &&
              mBallInterPos.X() > 25.0) {
            mSituation = ST_Penalty_Attack;
          } else {
            mSituation = ST_Forward_Attack;
          }
        } else {
          mSituation = ST_Penalty_Attack;
        }
      } else {
        mSituation = ST_Defense;
      }
    }
  }

  mFormation.Update(Formation::Offensive, "Strategy");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, 0x48(%rax)
jge 0x8a46c
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x10570
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11090
movq %rax, %rdi
callq 0x176f0
movsd 0x38a6d(%rip), %xmm0    # 0xc2ec0
ucomisd (%rax), %xmm0
jbe 0x8a46c
movq -0x48(%rbp), %rax
movl $0x2, 0xa4(%rax)
jmp 0x8a655
movq -0x48(%rbp), %rax
testb $0x1, 0x41(%rax)
jne 0x8a558
movq -0x48(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jl 0x8a545
movq -0x48(%rbp), %rdi
addq $0x90, %rdi
callq 0x176f0
movsd 0x3a7c0(%rip), %xmm0    # 0xc4c60
ucomisd (%rax), %xmm0
jbe 0x8a535
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x49590
movq %rax, %rdi
callq 0x26500
movsd (%rax), %xmm0
movsd 0x38a05(%rip), %xmm1    # 0xc2ed0
ucomisd %xmm1, %xmm0
jbe 0x8a525
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
movq -0x48(%rbp), %rax
movl 0x48(%rax), %esi
callq 0x29570
cmpl $0x2, 0x8(%rax)
jne 0x8a525
movq -0x48(%rbp), %rdi
addq $0x90, %rdi
callq 0x176f0
movsd (%rax), %xmm0
movsd 0x39079(%rip), %xmm1    # 0xc3588
ucomisd %xmm1, %xmm0
jbe 0x8a525
movq -0x48(%rbp), %rax
movl $0x1, 0xa4(%rax)
jmp 0x8a533
movq -0x48(%rbp), %rax
movl $0x0, 0xa4(%rax)
jmp 0x8a543
movq -0x48(%rbp), %rax
movl $0x1, 0xa4(%rax)
jmp 0x8a553
movq -0x48(%rbp), %rax
movl $0x2, 0xa4(%rax)
jmp 0x8a653
movq -0x48(%rbp), %rdi
callq 0x88c40
testb $0x1, %al
jne 0x8a578
movq -0x48(%rbp), %rcx
movl 0x7c(%rcx), %eax
cmpl 0x80(%rcx), %eax
jg 0x8a643
movq -0x48(%rbp), %rdi
addq $0x90, %rdi
callq 0x176f0
movsd 0x3a6d0(%rip), %xmm0    # 0xc4c60
ucomisd (%rax), %xmm0
jbe 0x8a633
movq -0x48(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jle 0x8a633
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x49590
movq %rax, %rdi
callq 0x26500
movsd (%rax), %xmm0
movsd 0x38907(%rip), %xmm1    # 0xc2ed0
ucomisd %xmm1, %xmm0
jbe 0x8a623
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1a4c0
movq %rax, %rdi
movq -0x48(%rbp), %rax
movl 0x48(%rax), %esi
callq 0x29570
cmpl $0x2, 0x8(%rax)
jne 0x8a623
movq -0x48(%rbp), %rdi
addq $0x90, %rdi
callq 0x176f0
movsd (%rax), %xmm0
movsd 0x38f7b(%rip), %xmm1    # 0xc3588
ucomisd %xmm1, %xmm0
jbe 0x8a623
movq -0x48(%rbp), %rax
movl $0x1, 0xa4(%rax)
jmp 0x8a631
movq -0x48(%rbp), %rax
movl $0x0, 0xa4(%rax)
jmp 0x8a641
movq -0x48(%rbp), %rax
movl $0x1, 0xa4(%rax)
jmp 0x8a651
movq -0x48(%rbp), %rax
movl $0x2, 0xa4(%rax)
jmp 0x8a653
jmp 0x8a655
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xaa70
movq -0x50(%rbp), %rdx
leaq 0x3a5ef(%rip), %rsi     # 0xc4c68
leaq -0x28(%rbp), %rdi
callq 0x1a540
jmp 0x8a684
movq -0x58(%rbp), %rdi
xorl %esi, %esi
leaq -0x28(%rbp), %rdx
callq 0x3e5b0
jmp 0x8a695
leaq -0x28(%rbp), %rdi
callq 0xa370
leaq -0x29(%rbp), %rdi
callq 0xa650
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8a6d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xa370
leaq -0x29(%rbp), %rdi
callq 0xa650
movq -0x38(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)