// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::ParseOkMsg(char*)
void Parser::ParseOkMsg(char *msg) {
  bool is_ok_say = false;

  msg++;
  parser::get_next_word(&msg);
  switch (msg[0]) {
  case 'c':
    switch (msg[1]) {
    case 'l':
      mOkMutex.Lock();
      mClangOk = true;
      mOkMutex.UnLock();
      break;
    case 'h':
      /*
      mOkMutex.Lock(); mChangePlayerTypeOk[parser::get_int(msg)] = true;
      mOkMutex.UnLock(); break;
      */
      mOkMutex.Lock();
      if ((!(mpObserver->SelfUnum() == TRAINER_UNUM)) ||
          std::strncmp(parser::get_next_word(&msg),
                       PlayerParam::instance().teamName().c_str(), 3) ==
              0) // Trainer接收到的信息包括己方和敌方，现在只处理己方
        mChangePlayerTypeOk[parser::get_int(msg)] = true;
      mOkMutex.UnLock();
      break;
    default:
      PRINT_ERROR("unknow ok message " << msg);
      break;
    }
    break;
  case 's':
    switch (msg[1]) {
    case 'y':
      mOkMutex.Lock();
      mSynchOk = true;
      mOkMutex.UnLock();
      break;
    case 'a':
      is_ok_say = true;
      break; /** (ok say) */
    default:
      PRINT_ERROR("unknow ok message " << msg);
      break;
    }
    break;
    //			case 'e': mOkMutex.Lock(); mEyeOnOk = true; mOkMutex.UnLock();
    //break;
  case 'e':
    switch (msg[1]) {
    case 'y':
      mOkMutex.Lock();
      mEyeOnOk = true;
      mOkMutex.UnLock();
      break;
    case 'a':
      mOkMutex.Lock();
      mEarOnOk = true;
      mOkMutex.UnLock();
      break;
    default:
      PRINT_ERROR("unknow ok message " << msg);
      break;
    }
    break;
  case 'm':
  case 'r': /*std::cout << "#" << PlayerParam::instance().teamName() << "
               Trainer: (" << msg << std::endl;*/
    break;
  default:
    PRINT_ERROR("unknow ok message " << msg);
    break;
  }

  if (is_ok_say && (PlayerParam::instance().isCoach() ||
                    PlayerParam::instance().isTrainer())) {
    mpObserver->SetCoachSayCount(mpObserver->GetCoachSayCount() + 1);
  } else {
    if (mpObserver->SelfUnum() == 0) {
      std::cout << "#" << PlayerParam::instance().teamName() << " Coach: ("
                << msg << std::endl;
    } else if (mpObserver->SelfUnum() == TRAINER_UNUM) {
      /*std::cout << "#" << PlayerParam::instance().teamName() << " Trainer: ("
       * << msg << std::endl;*/
    } else {
      std::cout << "#" << PlayerParam::instance().teamName() << " "
                << mpObserver->SelfUnum() << ": (" << msg << std::endl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rax
incq %rax
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x77d20
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
addl $-0x63, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x10, %eax
ja 0x75041
movq -0x20(%rbp), %rax
leaq 0x4e3b4(%rip), %rcx     # 0xc3128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x68, %eax
je 0x74dc0
jmp 0x74d8f
movl -0x2c(%rbp), %eax
subl $0x6c, %eax
jne 0x74e4e
jmp 0x74d9d
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebb0
movq -0x28(%rbp), %rdi
movb $0x1, 0x4d(%rdi)
addq $0x20, %rdi
callq 0x8ebe0
jmp 0x74eba
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebb0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x11dd0
cmpl $0xc, (%rax)
jne 0x74e17
leaq -0x10(%rbp), %rdi
callq 0x77d20
movq %rax, -0x38(%rbp)
callq 0x798a0
movq %rax, %rdi
callq 0x11db0
movq %rax, %rdi
callq 0xa240
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0xa2c0
cmpl $0x0, %eax
jne 0x74e3f
movq -0x28(%rbp), %rax
addq $0x51, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x78240
movq -0x40(%rbp), %rdi
movl %eax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x78780
movb $0x1, (%rax)
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebe0
jmp 0x74eba
jmp 0x74e50
movq 0x89199(%rip), %rdi     # 0xfdff0
leaq 0x4e628(%rip), %rsi     # 0xc3486
callq 0xa5a0
movq %rax, %rdi
leaq 0x503e4(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x64e, %esi            # imm = 0x64E
callq 0xaa40
movq %rax, %rdi
leaq 0x4e6d6(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x4e67f(%rip), %rsi     # 0xc3517
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x890fd(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x74eba
jmp 0x750ad
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x61, %eax
je 0x74efb
jmp 0x74ed1
movl -0x44(%rbp), %eax
subl $0x79, %eax
jne 0x74f01
jmp 0x74edb
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebb0
movq -0x28(%rbp), %rdi
movb $0x1, 0x4e(%rdi)
addq $0x20, %rdi
callq 0x8ebe0
jmp 0x74f6d
movb $0x1, -0x11(%rbp)
jmp 0x74f6d
jmp 0x74f03
movq 0x890e6(%rip), %rdi     # 0xfdff0
leaq 0x4e575(%rip), %rsi     # 0xc3486
callq 0xa5a0
movq %rax, %rdi
leaq 0x50331(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x65d, %esi            # imm = 0x65D
callq 0xaa40
movq %rax, %rdi
leaq 0x4e623(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x4e5cc(%rip), %rsi     # 0xc3517
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x8904a(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x74f6d
jmp 0x750ad
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x48(%rbp)
subl $0x61, %eax
je 0x74fb1
jmp 0x74f84
movl -0x48(%rbp), %eax
subl $0x79, %eax
jne 0x74fd1
jmp 0x74f8e
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebb0
movq -0x28(%rbp), %rdi
movb $0x1, 0x4f(%rdi)
addq $0x20, %rdi
callq 0x8ebe0
jmp 0x7503d
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x8ebb0
movq -0x28(%rbp), %rdi
movb $0x1, 0x50(%rdi)
addq $0x20, %rdi
callq 0x8ebe0
jmp 0x7503d
jmp 0x74fd3
movq 0x89016(%rip), %rdi     # 0xfdff0
leaq 0x4e4a5(%rip), %rsi     # 0xc3486
callq 0xa5a0
movq %rax, %rdi
leaq 0x50261(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x670, %esi            # imm = 0x670
callq 0xaa40
movq %rax, %rdi
leaq 0x4e553(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x4e4fc(%rip), %rsi     # 0xc3517
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x88f7a(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x7503d
jmp 0x750ad
jmp 0x750ad
jmp 0x75043
movq 0x88fa6(%rip), %rdi     # 0xfdff0
leaq 0x4e435(%rip), %rsi     # 0xc3486
callq 0xa5a0
movq %rax, %rdi
leaq 0x501f1(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x679, %esi            # imm = 0x679
callq 0xaa40
movq %rax, %rdi
leaq 0x4e4e3(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x4e48c(%rip), %rsi     # 0xc3517
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x88f0a(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x750ad
testb $0x1, -0x11(%rbp)
je 0x750ff
callq 0x798a0
movq %rax, %rdi
callq 0x10de0
testb $0x1, (%rax)
jne 0x750d7
callq 0x798a0
movq %rax, %rdi
callq 0x12080
testb $0x1, (%rax)
je 0x750ff
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x10(%rax), %rdi
callq 0x787f0
movq -0x50(%rbp), %rdi
movl (%rax), %esi
addl $0x1, %esi
callq 0x787c0
jmp 0x75213
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x11dd0
cmpl $0x0, (%rax)
jne 0x75170
movq 0x88ea8(%rip), %rdi     # 0xfdfc0
leaq 0x4fe4b(%rip), %rsi     # 0xc4f6a
callq 0xa5a0
movq %rax, -0x58(%rbp)
callq 0x798a0
movq %rax, %rdi
callq 0x11db0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xa4f0
movq %rax, %rdi
leaq 0x4e3df(%rip), %rsi     # 0xc352a
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x88e4a(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x75211
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x11dd0
cmpl $0xc, (%rax)
jne 0x75187
jmp 0x7520f
movq 0x88e32(%rip), %rdi     # 0xfdfc0
leaq 0x4fdd5(%rip), %rsi     # 0xc4f6a
callq 0xa5a0
movq %rax, -0x68(%rbp)
callq 0x798a0
movq %rax, %rdi
callq 0x11db0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xa4f0
movq %rax, %rdi
leaq 0x4fb1b(%rip), %rsi     # 0xc4cdc
callq 0xa5a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq 0x10(%rax), %rdi
callq 0x11dd0
movq -0x60(%rbp), %rdi
movl (%rax), %esi
callq 0xaa40
movq %rax, %rdi
leaq 0x4e341(%rip), %rsi     # 0xc3530
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x88da6(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x75211
jmp 0x75213
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)