// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::ParseObjProperty_Coach(char*)
Parser::ObjProperty_Coach Parser::ParseObjProperty_Coach(char *msg) {
  ObjProperty_Coach result;

  // goal or ball or player
  result.x = parser::get_double(&msg);
  result.y = parser::get_double(&msg);

  if (*msg != ')') { // ball or player
    result.vx = parser::get_double(&msg);
    result.vy = parser::get_double(&msg);

    if (*msg != ')') { // player
      result.body_dir = parser::get_double(&msg);
      result.head_dir = parser::get_double(&msg);

      while (*msg == ' ')
        ++msg;
      if (*msg != ')') {
        switch (*msg) {
        case 't':
          result.tackling = true;
          ++msg;
          break;
        case 'f':
          result.lying = true;
          ++msg;
          break;
        case 'y':
          result.card_type = CR_Yellow;
          ++msg;
          break;
        case 'r':
          result.card_type = CR_Red;
          ++msg;
          break;
        case 'k':
          // kicking
          ++msg;
          break;
        default:
          result.pointing = true;
          result.point_dir = parser::get_double(&msg);
          break;
        }
        while (*msg == ' ')
          ++msg;
        if (*msg != ')') {
          if (*msg == 't') {
            result.tackling = true;
          } else if (*msg == 'f') {
            result.lying = true;
          } else if (*msg == 'k') {
          } else if (*msg == 'y') {
            result.card_type = CR_Yellow;
          } else if (*msg == 'r') {
            result.card_type = CR_Red;
          }
          while (*msg == ' ')
            ++msg;
          if (*msg != ')') {
            ++msg;
            if (*msg == 'y') {
              result.card_type = CR_Yellow;
            } else if (*msg == 'r') {
              result.card_type = CR_Red;
            }
            //						else {
            //							PARSE_ERROR("why come to this
            //place");
            //						}
          }
          /*else
          {
                  PARSE_ERROR("why come to this place");
          }*/
        }
      }
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
callq 0x78580
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rdi
movsd %xmm0, (%rdi)
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rdi
movsd %xmm0, 0x8(%rdi)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x77836
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rax
movsd %xmm0, 0x10(%rax)
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x77834
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rax
movsd %xmm0, 0x20(%rax)
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rax
movsd %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x77665
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7764b
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x77832
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
addl $-0x66, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x13, %eax
ja 0x7770e
movq -0x28(%rbp), %rax
leaq 0x4bd67(%rip), %rcx     # 0xc3400
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movb $0x1, 0x40(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x77728
movq -0x18(%rbp), %rax
movb $0x1, 0x41(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x77728
movq -0x18(%rbp), %rax
movl $0x1, 0x44(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x77728
movq -0x18(%rbp), %rax
movl $0x2, 0x44(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x77728
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x77728
movq -0x18(%rbp), %rax
movb $0x1, 0x30(%rax)
leaq -0x10(%rbp), %rdi
callq 0x77d60
movq -0x18(%rbp), %rax
movsd %xmm0, 0x38(%rax)
jmp 0x7772a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x77744
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7772a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x77830
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x7776a
movq -0x18(%rbp), %rax
movb $0x1, 0x40(%rax)
jmp 0x777c6
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x77780
movq -0x18(%rbp), %rax
movb $0x1, 0x41(%rax)
jmp 0x777c4
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6b, %eax
jne 0x7778e
jmp 0x777c2
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x79, %eax
jne 0x777a7
movq -0x18(%rbp), %rax
movl $0x1, 0x44(%rax)
jmp 0x777c0
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x777be
movq -0x18(%rbp), %rax
movl $0x2, 0x44(%rax)
jmp 0x777c0
jmp 0x777c2
jmp 0x777c4
jmp 0x777c6
jmp 0x777c8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x777e2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x777c8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x7782e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x79, %eax
jne 0x77813
movq -0x18(%rbp), %rax
movl $0x1, 0x44(%rax)
jmp 0x7782c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x7782a
movq -0x18(%rbp), %rax
movl $0x2, 0x44(%rax)
jmp 0x7782c
jmp 0x7782e
jmp 0x77830
jmp 0x77832
jmp 0x77834
jmp 0x77836
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq