// File: 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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
addl $-0x63, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x11, %eax
ja 0x717ce
movq -0x28(%rbp), %rax
leaq 0x519cc(%rip), %rcx     # 0xc3050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x10, -0x14(%rbp)
jmp 0x717d5
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x68, %eax
je 0x716b5
jmp 0x716ab
movl -0x34(%rbp), %eax
subl $0x6c, %eax
je 0x716be
jmp 0x716c5
movl $0x8, -0x14(%rbp)
jmp 0x716c5
movl $0x9, -0x14(%rbp)
jmp 0x717d5
movl $0xd, -0x14(%rbp)
jmp 0x717d5
movl $0xb, -0x14(%rbp)
jmp 0x717d5
movl $0x5, -0x14(%rbp)
jmp 0x717d5
movl $0x3, -0x14(%rbp)
jmp 0x717d5
movl $0xe, -0x14(%rbp)
jmp 0x717d5
movq -0x10(%rbp), %rax
movsbl 0x8(%rax), %eax
movl %eax, -0x38(%rbp)
subl $0x70, %eax
je 0x71722
jmp 0x71718
movl -0x38(%rbp), %eax
subl $0x74, %eax
je 0x7172b
jmp 0x71734
movl $0x7, -0x14(%rbp)
jmp 0x7173b
movl $0xa, -0x14(%rbp)
jmp 0x7173b
movl $0x0, -0x14(%rbp)
jmp 0x717d5
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
addl $-0x65, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0xd, %eax
ja 0x717bc
movq -0x40(%rbp), %rax
leaq 0x51937(%rip), %rcx     # 0xc3098
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xf, -0x14(%rbp)
jmp 0x717c3
movq -0x10(%rbp), %rax
movsbl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x20, %eax
je 0x7178f
jmp 0x71785
movl -0x44(%rbp), %eax
subl $0x5f, %eax
je 0x71798
jmp 0x717a1
movl $0x1, -0x14(%rbp)
jmp 0x717a8
movl $0x2, -0x14(%rbp)
jmp 0x717a8
movl $0x0, -0x14(%rbp)
jmp 0x717c3
movl $0x4, -0x14(%rbp)
jmp 0x717c3
movl $0x6, -0x14(%rbp)
jmp 0x717c3
movl $0x0, -0x14(%rbp)
jmp 0x717d5
movl $0xc, -0x14(%rbp)
jmp 0x717d5
movl $0x0, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0x10, %rax
ja 0x71a69
movq -0x50(%rbp), %rax
leaq 0x518d7(%rip), %rcx     # 0xc30d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x72230
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x725b0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x6d920
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
movl $0x1, %ecx
callq 0x72230
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x72b30
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x6d920
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
movl $0x1, %ecx
callq 0x72230
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x73250
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x6d890
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x73a30
testb $0x1, %al
jne 0x718d2
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
movl $0x1, %ecx
callq 0x72230
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x73b00
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x73ea0
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x73f00
jmp 0x71a69
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x73f60
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x74bb0
jmp 0x71a69
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x74c20
jmp 0x71a69
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x74d20
jmp 0x71a69
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x71fb0
jmp 0x71a69
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x11dd0
movl (%rax), %esi
movq 0x8c646(%rip), %rdi     # 0xfdfc0
callq 0xaa40
movq %rax, %rdi
leaq 0x51b5f(%rip), %rsi     # 0xc34e8
callq 0xa5a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq 0x10(%rax), %rdi
callq 0x11a70
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x11d40
movq %rax, %rdi
leaq 0x51ba8(%rip), %rsi     # 0xc3560
callq 0xa5a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x8c5dd(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x71a69
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x6d8e0
jmp 0x71a69
jmp 0x719ee
movq 0x8c5fb(%rip), %rdi     # 0xfdff0
leaq 0x51a8a(%rip), %rsi     # 0xc3486
callq 0xa5a0
movq %rax, %rdi
leaq 0x53846(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x156, %esi            # imm = 0x156
callq 0xaa40
movq %rax, %rdi
leaq 0x51b38(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq 0x10(%rax), %rdi
callq 0x11a70
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x11d40
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x8c54e(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x71a69
addq $0x60, %rsp
popq %rbp
retq
nop