// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq %rdi, %r14
movzbl 0x1(%rsi), %eax
addl $-0x63, %eax
cmpl $0x11, %eax
ja 0x3ece5
leaq 0x2e4df(%rip), %rcx     # 0x6d120
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x2(%rbx), %al
xorl %ecx, %ecx
cmpb $0x6c, %al
sete %cl
leal (%rcx,%rcx,8), %ecx
cmpb $0x68, %al
movl $0x8, %eax
cmovnel %ecx, %eax
jmp 0x3ece7
movl $0xb, %eax
jmp 0x3ece7
movl $0x10, %eax
jmp 0x3ece7
movl $0xd, %eax
jmp 0x3ece7
movl $0xe, %eax
jmp 0x3ece7
movb 0x8(%rbx), %al
xorl %ecx, %ecx
cmpb $0x74, %al
movl $0xa, %edx
cmovnel %ecx, %edx
cmpb $0x70, %al
movl $0x7, %eax
cmovnel %edx, %eax
jmp 0x3ece7
movl $0x5, %eax
jmp 0x3ece7
movl $0x3, %eax
jmp 0x3ece7
movl $0xc, %eax
jmp 0x3ece7
movzbl 0x3(%rbx), %eax
cmpl $0x6e, %eax
jg 0x3ecd0
cmpl $0x65, %eax
je 0x3efa4
cmpl $0x6e, %eax
jne 0x3ece5
movl $0x4, %eax
jmp 0x3ece7
cmpl $0x6f, %eax
je 0x3efbc
cmpl $0x72, %eax
jne 0x3ece5
movl $0x6, %eax
jmp 0x3ece7
xorl %eax, %eax
movq $0x0, -0x20(%rbp)
cmpl $0x10, %eax
ja 0x3ee81
movl %eax, %eax
leaq 0x2e467(%rip), %rcx     # 0x6d168
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x482df(%rip), %r15     # 0x86ff0
leaq 0x2e68e(%rip), %rsi     # 0x6d3a6
movl $0x11, %edx
movq %r15, %rdi
callq 0x9560
leaq 0x30496(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r15, %rdi
callq 0x9560
movq %r15, %rdi
movl $0x156, %esi            # imm = 0x156
callq 0x9880
movq %rax, %r15
leaq 0x2e72f(%rip), %rsi     # 0x6d47f
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
movq 0x10(%r14), %rsi
addq $0xc, %rsi
movq %r15, %rdi
callq 0xea74
movq %rax, %r14
jmp 0x3edd8
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3f2da
movq 0x10(%r14), %rax
movl 0x2c(%rax), %esi
movq 0x4822b(%rip), %rdi     # 0x86fc0
callq 0x9880
movq %rax, %r15
leaq 0x2e664(%rip), %rsi     # 0x6d408
movl $0x1, %edx
movq %rax, %rdi
callq 0x9560
movq 0x10(%r14), %rsi
addq $0xc, %rsi
movq %r15, %rdi
callq 0xea74
movq %rax, %r14
leaq 0x2e6b5(%rip), %rsi     # 0x6d480
movl $0x2, %edx
movq %rax, %rdi
callq 0x9560
testq %rbx, %rbx
je 0x3ef2d
movq %rbx, %rdi
callq 0x9200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x3ef47
leaq -0x20(%rbp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x3f462
movq (%r15), %rsi
movq %r14, %rdi
callq 0x40030
movq 0x10(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3d21a
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4238a
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4134a
movq 0x10(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3d272
movq %r14, %rdi
movq %rbx, %rsi
callq 0x40ef0
testb %al, %al
je 0x3ef78
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x20(%rbp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x3f462
movq (%r15), %rsi
movq %r14, %rdi
callq 0x3fa04
jmp 0x3eecf
leaq -0x20(%rbp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x3f462
movq (%r15), %rsi
movq %r14, %rdi
callq 0x3f6a6
movq 0x10(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3d294
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x41304
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x412be
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x422aa
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x421ae
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x9860
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
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9330
leaq -0x20(%rbp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x3f462
movq (%r15), %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x40fbc
movb 0x4(%rbx), %al
xorl %ecx, %ecx
cmpb $0x5f, %al
sete %cl
addl %ecx, %ecx
cmpb $0x20, %al
movl $0x1, %eax
jmp 0x3ec5e
movl $0xf, %eax
jmp 0x3ece7