// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %r14
movq %rdx, (%r14)
callq 0x3848a
movq %r14, %rdi
callq 0x381af
movsd %xmm0, (%rbx)
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x8(%rbx)
movq (%r14), %rax
cmpb $0x29, (%rax)
je 0x38057
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x10(%rbx)
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x18(%rbx)
movq (%r14), %rax
cmpb $0x29, (%rax)
je 0x38057
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x20(%rbx)
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x28(%rbx)
movq (%r14), %rax
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0x20, %ecx
jne 0x37f86
movq %rax, -0x18(%rbp)
jmp 0x37f74
cmpl $0x29, %ecx
je 0x38057
cmpl $0x66, %ecx
je 0x37fb1
cmpl $0x6b, %ecx
je 0x37fe0
cmpl $0x72, %ecx
je 0x37fb7
cmpl $0x74, %ecx
je 0x37fc0
cmpl $0x79, %ecx
jne 0x37fc6
movl $0x1, 0x44(%rbx)
jmp 0x37fe0
movb $0x1, 0x41(%rbx)
jmp 0x37fe0
movl $0x2, 0x44(%rbx)
jmp 0x37fe0
movb $0x1, 0x40(%rbx)
jmp 0x37fe0
movb $0x1, 0x30(%rbx)
leaq -0x18(%rbp), %r14
movq %r14, %rdi
callq 0x381af
movsd %xmm0, 0x38(%rbx)
movq (%r14), %rax
jmp 0x37fe4
movq %rax, -0x18(%rbp)
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0x20, %ecx
je 0x37fe0
cmpl $0x29, %ecx
je 0x38057
cmpl $0x66, %ecx
je 0x38012
cmpl $0x72, %ecx
je 0x38018
cmpl $0x74, %ecx
je 0x38021
cmpl $0x79, %ecx
jne 0x3802e
movl $0x1, 0x44(%rbx)
jmp 0x3802e
movb $0x1, 0x41(%rbx)
jmp 0x3802e
movl $0x2, 0x44(%rbx)
jmp 0x3802e
movb $0x1, 0x40(%rbx)
jmp 0x3802e
movq %rax, -0x18(%rbp)
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0x20, %ecx
je 0x38027
cmpl $0x29, %ecx
je 0x38057
movq %rax, -0x18(%rbp)
movzbl (%rax), %eax
cmpl $0x79, %eax
je 0x38051
cmpl $0x72, %eax
jne 0x38057
pushq $0x2
jmp 0x38053
pushq $0x1
popq %rax
movl %eax, 0x44(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop