// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::DoDecisionMaking()
void Trainer::DoDecisionMaking() {
  switch (mpAgent->World().GetPlayMode()) {
  case PM_Our_Penalty:
  case PM_Opp_Penalty:
  case PM_Penalty_On_Our_Field:
  case PM_Penalty_On_Opp_Field:
  case PM_Our_Penalty_Setup:
  case PM_Our_Penalty_Ready:
  case PM_Our_Penalty_Taken:
  case PM_Our_Penalty_Score:
  case PM_Our_Penalty_Miss:
  case PM_Our_Penalty_Foul:
  case PM_Our_Penalty_Winner:
  case PM_Opp_Penalty_Setup:
  case PM_Opp_Penalty_Ready:
  case PM_Opp_Penalty_Taken:
  case PM_Opp_Penalty_Score:
  case PM_Opp_Penalty_Miss:
  case PM_Opp_Penalty_Foul:
  case PM_Opp_Penalty_Winner:
    return;
  default:
    break;
  }

  if (PlayerParam::instance()
          .ForcePenaltyMode()) //普通比赛，临近结束时强制进行点球
  {
    if (mpAgent->World().GetPlayMode() == PM_Before_Kick_Off &&
        mpAgent->World().GetLastPlayMode() == PM_Play_On)
      mPrepared = false;

    if (mpAgent->World().GetTeammateScore() !=
            mpAgent->World().GetOpponentScore() &&
        !mPrepared)

      mpAgent->World().GetTeammateScore() < mpAgent->World().GetOpponentScore()
          ? Score(true)
          : Score(false);
  } else if (CheckOpponent()) {
    if (!mInitialized) {
      InitializeStadium();
    }
    if (mpEndCondition->CheckState(mpAgent->World()) ||
        mpAgent->World().GetPlayMode() == PM_Before_Kick_Off) {
      mPrepared = false;
    }
    if (!mPrepared && mInitialized) {
      PrepareForTrain();
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x10ed0
movl %eax, %ecx
movl %ecx, %eax
addl $-0xe, %eax
movl %ecx, -0xc(%rbp)
subl $0x7, %eax
jb 0x93590
jmp 0x93576
movl -0xc(%rbp), %eax
addl $-0x17, %eax
subl $0x4, %eax
jb 0x93590
jmp 0x93583
movl -0xc(%rbp), %eax
addl $-0x31, %eax
subl $0x6, %eax
ja 0x93595
jmp 0x93590
jmp 0x93712
jmp 0x93597
callq 0x798a0
movq %rax, %rdi
callq 0x97af0
testb $0x1, (%rax)
je 0x93685
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x10ed0
cmpl $0x16, %eax
jne 0x935e9
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x27300
cmpl $0x1, %eax
jne 0x935e9
movq -0x18(%rbp), %rax
movb $0x0, 0x31(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x5c520
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x5c540
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
je 0x93680
movq -0x18(%rbp), %rax
testb $0x1, 0x31(%rax)
jne 0x93680
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x5c520
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x20(%rbp)
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x5c540
movl %eax, %ecx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jge 0x93673
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x93720
jmp 0x9367e
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x93720
jmp 0x93680
jmp 0x93712
movq -0x18(%rbp), %rdi
callq 0x93940
testb $0x1, %al
jne 0x93694
jmp 0x93710
movq -0x18(%rbp), %rax
testb $0x1, 0x30(%rax)
jne 0x936a7
movq -0x18(%rbp), %rdi
callq 0x93a10
movq -0x18(%rbp), %rax
movq 0x158(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x93bc0
testb $0x1, %al
jne 0x936e9
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1a9b0
movq %rax, %rdi
callq 0x10ed0
cmpl $0x16, %eax
jne 0x936f1
movq -0x18(%rbp), %rax
movb $0x0, 0x31(%rax)
movq -0x18(%rbp), %rax
testb $0x1, 0x31(%rax)
jne 0x9370e
movq -0x18(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0x9370e
movq -0x18(%rbp), %rdi
callq 0x94540
jmp 0x93710
jmp 0x93712
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)