// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb 0x1(%rsi), %r15b
incq %rbx
movsbl %r15b, %edi
callq 0x97c0
testl %eax, %eax
je 0x423b5
movb 0x1(%rbx), %r15b
jmp 0x4239f
testb %r15b, %r15b
je 0x423d3
movsbl 0x1(%rbx), %r15d
incq %rbx
movl %r15d, %edi
callq 0x97c0
testl %r15d, %r15d
je 0x423d3
testl %eax, %eax
je 0x423ba
movzbl (%rbx), %eax
cmpl $0x6c, %eax
jle 0x42422
cmpl $0x6d, %eax
je 0x426bd
cmpl $0x72, %eax
je 0x426bd
cmpl $0x73, %eax
jne 0x42480
movzbl 0x1(%rbx), %eax
cmpl $0x61, %eax
je 0x424f3
cmpl $0x79, %eax
jne 0x42571
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x4f686
movb $0x1, 0x4e(%r14)
jmp 0x426b5
cmpl $0x63, %eax
je 0x42458
cmpl $0x65, %eax
jne 0x42480
movzbl 0x1(%rbx), %eax
cmpl $0x61, %eax
je 0x42522
cmpl $0x79, %eax
jne 0x425aa
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x4f686
movb $0x1, 0x4f(%r14)
jmp 0x426b5
movzbl 0x1(%rbx), %eax
cmpl $0x68, %eax
je 0x424bc
cmpl $0x6c, %eax
jne 0x42538
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x4f686
movb $0x1, 0x4d(%r14)
jmp 0x426b5
movq 0x44b69(%rip), %r15     # 0x86ff0
leaq 0x2af18(%rip), %rsi     # 0x6d3a6
movl $0x11, %edx
movq %r15, %rdi
callq 0x9560
leaq 0x2cd20(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
movq %r15, %rdi
movl $0x679, %esi            # imm = 0x679
jmp 0x425e1
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x4f686
movq 0x10(%r14), %rax
cmpl $0xc, 0x2c(%rax)
jne 0x4268b
movb (%rbx), %r12b
movsbl %r12b, %edi
callq 0x97c0
testl %eax, %eax
je 0x42650
movb 0x1(%rbx), %r12b
incq %rbx
jmp 0x424d9
callq 0x450ba
cmpb $0x0, 0x31a5(%rax)
jne 0x42513
callq 0x450ba
cmpb $0x1, 0x31a6(%rax)
jne 0x426bd
movq 0x10(%r14), %rax
incl 0x164(%rax)
jmp 0x42714
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x4f686
movb $0x1, 0x50(%r14)
jmp 0x426b5
movq 0x44ab1(%rip), %r15     # 0x86ff0
leaq 0x2ae60(%rip), %rsi     # 0x6d3a6
movl $0x11, %edx
movq %r15, %rdi
callq 0x9560
leaq 0x2cc68(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
movq %r15, %rdi
movl $0x64e, %esi            # imm = 0x64E
jmp 0x425e1
movq 0x44a78(%rip), %r15     # 0x86ff0
leaq 0x2ae27(%rip), %rsi     # 0x6d3a6
movl $0x11, %edx
movq %r15, %rdi
callq 0x9560
leaq 0x2cc2f(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
movq %r15, %rdi
movl $0x65d, %esi            # imm = 0x65D
jmp 0x425e1
movq 0x44a3f(%rip), %r15     # 0x86ff0
leaq 0x2adee(%rip), %rsi     # 0x6d3a6
movl $0x11, %edx
movq %r15, %rdi
callq 0x9560
leaq 0x2cbf6(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
movq %r15, %rdi
movl $0x670, %esi            # imm = 0x670
callq 0x9880
movq %rax, %r15
leaq 0x2ae8f(%rip), %rsi     # 0x6d47f
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x2ae33(%rip), %rsi     # 0x6d437
movl $0x12, %edx
movq %r15, %rdi
callq 0x9560
movq %rbx, %rdi
callq 0x9200
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9560
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
jmp 0x426bd
testb %r12b, %r12b
je 0x4266e
movsbl 0x1(%rbx), %r12d
incq %rbx
movl %r12d, %edi
callq 0x97c0
testl %r12d, %r12d
je 0x4266e
testl %eax, %eax
je 0x42655
callq 0x450ba
movq 0x3138(%rax), %rsi
movl $0x3, %edx
movq %rbx, %rdi
callq 0x9230
testl %eax, %eax
jne 0x426b5
movb (%rbx), %al
movsbl %al, %ecx
addl $-0x30, %ecx
movq %rbx, %rdi
cmpl $0xa, %ecx
jae 0x427d5
xorl %esi, %esi
movl $0xa, %edx
callq 0x9680
decl %eax
cltq
movb $0x1, 0x51(%r14,%rax)
movq %r15, %rdi
callq 0x4f6a2
movq 0x10(%r14), %rax
movl 0x2c(%rax), %eax
cmpl $0xc, %eax
je 0x42714
testl %eax, %eax
jne 0x4271d
movq 0x448ec(%rip), %r14     # 0x86fc0
leaq 0x2c800(%rip), %rsi     # 0x6eedb
movl $0x1, %edx
movq %r14, %rdi
callq 0x9560
callq 0x450ba
movq 0x3138(%rax), %rsi
movq 0x3140(%rax), %rdx
movq %r14, %rdi
callq 0x9560
movq %rax, %r14
leaq 0x2ad3d(%rip), %rsi     # 0x6d44a
movl $0x9, %edx
jmp 0x42788
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4489c(%rip), %r15     # 0x86fc0
leaq 0x2c7b0(%rip), %rsi     # 0x6eedb
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
callq 0x450ba
movq 0x3138(%rax), %rsi
movq 0x3140(%rax), %rdx
movq %r15, %rdi
callq 0x9560
movq %rax, %r15
leaq 0x2c497(%rip), %rsi     # 0x6ebf4
movl $0x1, %edx
movq %rax, %rdi
callq 0x9560
movq 0x10(%r14), %rax
movl 0x2c(%rax), %esi
movq %r15, %rdi
callq 0x9880
movq %rax, %r14
leaq 0x2accd(%rip), %rsi     # 0x6d450
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
movq %rbx, %rdi
callq 0x9200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9560
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9330
movabsq $0x680000000001, %rcx   # imm = 0x680000000001
movq %rbx, %rdi
cmpb $0x2e, %al
ja 0x427f3
movzbl %al, %eax
btq %rax, %rcx
jb 0x4269f
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %edx
addl $-0x30, %edx
cmpl $0xa, %edx
jae 0x427e2
jmp 0x4269f
nop