// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::Parse(char*)
void Parser::Parse(char *msg) {
  ServerMsgType msg_type = None_Msg;

  switch (msg[1]) {
  case 'i':
    msg_type = Initialize_Msg;
    break; /* ( i nit */
  case 'c':
    switch (msg[2]) {
    case 'h':
      msg_type = ChangePlayerType_Msg;
      break; /* ( c h ange */
    case 'l':
      msg_type = Clang_Msg;
      break; /* ( c l ang */
    }
    break;
  case 'd':
    msg_type = Disp_Msg;
    break; /* (d isp */
  case 'e':
    msg_type = Error_Msg;
    break; /* ( e rror */
  case 'f':
    msg_type = Fullstate_Msg;
    break; /* ( f ullstate */
  case 'h':
    msg_type = Hear_Msg;
    break; /* ( h ear  */
  case 'o':
    msg_type = Ok_Msg;
    break; /* ( o k */
  case 'p':
    switch (msg[8]) {
    case 'p':
      msg_type = PlayerParam_Msg;
      break; /* (p layer_ p ram */
    case 't':
      msg_type = PlayerType_Msg;
      break; /* ( p layer_ t ype */
    default:
      msg_type = None_Msg;
      break;
    }
    break;
  case 's':
    switch (msg[3]) {
    case 'o':
      msg_type = Score_Msg;
      break; /* ( s c o re */
    case 'e':
      switch (msg[4]) {
      case ' ':
        msg_type = Sight_Msg;
        break; /* ( s e e   */
      case '_':
        msg_type = CoachSight_Msg;
        break; /* ( s e e _global   */
      default:
        msg_type = None_Msg;
        break;
      }
      break;
    case 'n':
      msg_type = Sense_Msg;
      break; /* ( s e n se_body */
    case 'r':
      msg_type = ServerParam_Msg;
      break; /* ( s e r ver_param */
    default:
      msg_type = None_Msg;
      break;
    }
    break;
  case 't':
    msg_type = Think_Msg;
    break; /* (t hink */
  default:
    msg_type = None_Msg;
    break;
  }

  char *time_end = 0;
  switch (msg_type) {
  case Sight_Msg:
    ParseTime(msg, &time_end, false);
    ParseSight(time_end);
    mpObserver->SetNewSight();
    break;
  case CoachSight_Msg:
    ParseTime(msg, &time_end, true);
    ParseSight_Coach(time_end);
    mpObserver->SetNewSight();
    break;
  case Sense_Msg:
    ParseTime(msg, &time_end, true);
    ParseSense(time_end);
    mpObserver->SetNewSense();
    break;
  case Hear_Msg:
    if (!ParseForTrainer(msg)) {
      ParseTime(msg, &time_end, true);
      ParseSound(time_end);
    }
    break;
  case PlayerParam_Msg:
    ParsePlayerParam(msg);
    break;
  case ServerParam_Msg:
    ParseServerParam(msg);
    break;
  case Disp_Msg: /*TODO: process disp message */
    break;
  case Fullstate_Msg:
    ParseFullstateMsg(msg);
    break;
  case ChangePlayerType_Msg:
    ParseChangePlayerType(msg);
    break;
  case Clang_Msg: /*TODO: process clang message*/
    break;
  case PlayerType_Msg:
    ParsePlayerType(msg);
    break;
  case Score_Msg: /*TODO: process score message*/
    break;
  case Ok_Msg:
    ParseOkMsg(msg);
    break;
  case Initialize_Msg:
    ParseInitializeMsg(msg);
    break;
  case Error_Msg:
    std::cout << mpObserver->SelfUnum() << "@" << mpObserver->CurrentTime()
              << ": " << msg << std::endl;
    break;
  case Think_Msg:
    mpObserver->SetNewThink();
    break;
  case None_Msg:
    PRINT_ERROR(mpObserver->CurrentTime() << msg);
    break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x1(%rsi), %eax
addl $-0x63, %eax
cmpl $0x11, %eax
ja 0x34d9e
leaq 0x244fd(%rip), %rcx     # 0x590d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x2(%r14), %dl
xorl %eax, %eax
cmpb $0x6c, %dl
sete %cl
cmpb $0x68, %dl
je 0x34e09
movb %cl, %al
leal (%rax,%rax,8), %eax
jmp 0x34d7e
movq 0x10(%rbx), %rax
movl 0x2c(%rax), %esi
movq 0x423b7(%rip), %rdi     # 0x76fc0
callq 0x9890
leaq 0x24793(%rip), %rsi     # 0x593a8
movq %rax, %rdi
callq 0x94b0
movq 0x10(%rbx), %rsi
addq $0xc, %rsi
movq %rax, %rdi
callq 0xd465
leaq 0x247ec(%rip), %rsi     # 0x59420
movq %rax, %rdi
callq 0x94b0
jmp 0x34dec
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x350ca
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x369e6
movb 0x8(%r14), %cl
xorl %edx, %edx
cmpb $0x74, %cl
pushq $0xa
popq %rax
cmovnel %edx, %eax
cmpb $0x70, %cl
jne 0x34d7e
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36202
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3628a
andq $0x0, -0x20(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35f90
testb %al, %al
jne 0x34e7a
leaq -0x20(%rbp), %r15
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35252
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x36028
jmp 0x34e7a
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3348c
movzbl 0x3(%r14), %eax
cmpl $0x72, %eax
je 0x34d68
cmpl $0x6e, %eax
je 0x34d36
cmpl $0x6f, %eax
je 0x34e7a
cmpl $0x65, %eax
jne 0x34d9e
movb 0x4(%r14), %dl
xorl %eax, %eax
cmpb $0x5f, %dl
sete %cl
cmpb $0x20, %dl
jne 0x34d7a
andq $0x0, -0x20(%rbp)
jmp 0x34e1e
leaq -0x20(%rbp), %r15
andq $0x0, (%r15)
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35252
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x35ae6
movq 0x10(%rbx), %rdi
callq 0x33452
jmp 0x34e7a
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36246
movb %cl, %al
addl %eax, %eax
andq $0x0, -0x20(%rbp)
cmpl $0xa, %eax
ja 0x34e7a
movl %eax, %eax
leaq 0x24383(%rip), %rcx     # 0x59118
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x4224b(%rip), %rdi     # 0x76ff0
leaq 0x2459a(%rip), %rsi     # 0x59346
callq 0x94b0
leaq 0x263ba(%rip), %rsi     # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x156, %esi            # imm = 0x156
callq 0x9890
leaq 0x2464b(%rip), %rsi     # 0x5941f
movq %rax, %rdi
callq 0x94b0
movq 0x10(%rbx), %rsi
addq $0xc, %rsi
movq %rax, %rdi
callq 0xd465
movq %rax, %rdi
movq %r14, %rsi
callq 0x94b0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x99e8
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36906
leaq -0x20(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x35252
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x35404
jmp 0x34e71
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36958
leaq -0x20(%rbp), %r15
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35252
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x356de
movq 0x10(%rbx), %rdi
callq 0x334ae
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop