// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::ParseSound(char*)
void Parser::ParseSound(char *msg) {
  char *end;
  int n;
  static char buffer[MAX_MESSAGE];

  msg++;
  if (msg[0] == 'r') // referee
  {
    parser::get_next_word(&msg);
    end = msg;
    while (*end != ')')
      end++;
    n = end - msg;
    strncpy(buffer, msg, n * sizeof(char));
    buffer[n] = '\0';

    ParseRefereeMsg(buffer);
  } else if (msg[0] == 's') // self
  {
    // self say
  } else if (msg[0] == 'o') // coach say
  {
    msg += 13; /** online_coach_ */
    if (msg[0] == mpObserver->OurInitSide()) {
      while (*msg != ' ')
        ++msg;
      ++msg;

      end = msg;
      //  while (*end != ')' || *(end + 1) != ')') end++; //
      //  对手阵型信息中有可能包含右括号
      n = strlen(msg);
      strncpy(buffer, msg, n * sizeof(char));
      buffer[n] = '\0';

      mpObserver->HearOurCoachSay(std::string(buffer));
    } else {
      // opponent coach say
    }
  } else // player say
  {      // dir our|opp unum
    AngleDeg dir = parser::get_double(&msg);
    if (msg[2] == 'u') { // our
      Unum unum = parser::get_int(&msg);
      while (*msg != '\"')
        msg++;
      msg++;
      end = msg;
      while (*end != '\"')
        end++;
      n = end - msg;
      strncpy(buffer, msg, n * sizeof(char));
      buffer[n] = '\0';

      mpObserver->HearTeammateSay(dir, unum, std::string(buffer));
    } else {
      // opponent player say
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x73bae
leaq -0x10(%rbp), %rdi
callq 0x77d20
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x73b61
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x73b47
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
shlq $0x0, %rdx
leaq 0x35dd2e(%rip), %rdi    # 0x3d18b0
callq 0xa2f0
movq -0x98(%rbp), %rdi
movslq -0x1c(%rbp), %rcx
leaq 0x35dd17(%rip), %rax    # 0x3d18b0
movb $0x0, (%rax,%rcx)
leaq 0x35dd0c(%rip), %rsi    # 0x3d18b0
callq 0x77840
jmp 0x73e82
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x73, %eax
jne 0x73bbf
jmp 0x73e80
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6f, %eax
jne 0x73d0a
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0xd, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movl %ecx, -0x9c(%rbp)
movq 0x10(%rax), %rdi
callq 0x6e590
movq %rax, %rcx
movl -0x9c(%rbp), %eax
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x73d03
jmp 0x73c0e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x73c28
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x73c0e
movq -0x10(%rbp), %rax
incq %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa260
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
leaq 0x35dc5a(%rip), %rdi    # 0x3d18b0
movq %rdi, -0xb0(%rbp)
callq 0xa2f0
movq -0xb0(%rbp), %rdx
movq -0x98(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rcx,%rdx)
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xaa70
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x1a540
jmp 0x73cac
movq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d350
jmp 0x73cbe
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq -0x41(%rbp), %rdi
callq 0xa650
jmp 0x73d05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x73cf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa370
leaq -0x41(%rbp), %rdi
callq 0xa650
jmp 0x73e8b
jmp 0x73d05
jmp 0x73e7e
leaq -0x10(%rbp), %rdi
callq 0x77d60
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x75, %eax
jne 0x73e7a
leaq -0x10(%rbp), %rdi
callq 0x77bf0
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x73d4f
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x73d35
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x73d7d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x73d63
movl -0x18(%rbp), %eax
movl -0x10(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
leaq 0x35db19(%rip), %rdi    # 0x3d18b0
movq %rdi, -0xc8(%rbp)
callq 0xa2f0
movq -0xc8(%rbp), %rdx
movq -0x98(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rcx,%rdx)
movq 0x10(%rax), %rax
movq %rax, -0xe0(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xcc(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0xaa70
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x1a540
jmp 0x73e09
movl -0xcc(%rbp), %esi
movsd -0xd8(%rbp), %xmm0
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x6d3a0
jmp 0x73e2c
leaq -0x88(%rbp), %rdi
callq 0xa370
leaq -0x89(%rbp), %rdi
callq 0xa650
jmp 0x73e7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x73e6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xa370
leaq -0x89(%rbp), %rdi
callq 0xa650
jmp 0x73e8b
jmp 0x73e7c
jmp 0x73e7e
jmp 0x73e80
jmp 0x73e82
addq $0xe0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)