// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::ParseMarker(char*)
Parser::ObjType Parser::ParseMarker(char *msg) {
  ObjType result;
  if (*msg == 'f') { // flag
    result.type = OBJ_Marker;
    msg += 2; // 'f '
    if (*msg == 'r') {
      msg += 2; // 'r'
      if (*msg == '0') {
        result.marker = Flag_R0;
      } else if (*msg == 'b') {
        msg += 1;
        if (*msg == ')') {
          result.marker = Flag_RB;
        } else {    // flag r b
          msg += 1; // skip space
          if (*msg == '1') {
            result.marker = Flag_RB10;
          } else if (*msg == '2') {
            result.marker = Flag_RB20;
          } else if (*msg == '3') {
            result.marker = Flag_RB30;
          } else {
            PARSE_ERROR("flag r b ?");
          }
        }
      } else if (*msg == 't') {
        msg += 1;
        if (*msg == ')') {
          result.marker = Flag_RT;
        } else { // flag r t
          msg += 1;
          if (*msg == '1') {
            result.marker = Flag_RT10;
          } else if (*msg == '2') {
            result.marker = Flag_RT20;
          } else if (*msg == '3') {
            result.marker = Flag_RT30;
          } else {
            PARSE_ERROR("flag r t ?");
          }
        }
      } else {
        PARSE_ERROR("flag r ?");
      }
    } else if (*msg == 'l') { // flag l
      msg += 2;               // 'l '
      if (*msg == '0') {
        result.marker = Flag_L0;
      } else if (*msg == 'b') { // flag l b
        msg += 1;
        if (*msg == ')') {
          result.marker = Flag_LB;
        } else {
          msg += 1;
          if (*msg == '1') {
            result.marker = Flag_LB10;
          } else if (*msg == '2') {
            result.marker = Flag_LB20;
          } else if (*msg == '3') {
            result.marker = Flag_LB30;
          } else {
            PARSE_ERROR("flag l b ?");
          }
        }
      } else if (*msg == 't') { // flag l t
        msg += 1;
        if (*msg == ')') {
          result.marker = Flag_LT;
        } else {
          msg += 1;
          if (*msg == '1') {
            result.marker = Flag_LT10;
          } else if (*msg == '2') {
            result.marker = Flag_LT20;
          } else if (*msg == '3') {
            result.marker = Flag_LT30;
          } else {
            PARSE_ERROR("flag l t ?");
          }
        }
      } else {
        PARSE_ERROR("flag l ?");
      }
    } else if (*msg == 't') { // flag t
      msg += 2;
      if (*msg == '0') {
        result.marker = Flag_T0;
      } else if (*msg == 'l') {
        msg += 2;
        if (*msg == '1') {
          result.marker = Flag_TL10;
        } else if (*msg == '2') {
          result.marker = Flag_TL20;
        } else if (*msg == '3') {
          result.marker = Flag_TL30;
        } else if (*msg == '4') {
          result.marker = Flag_TL40;
        } else if (*msg == '5') {
          result.marker = Flag_TL50;
        } else {
          PARSE_ERROR("flag t l ?");
        }
      } else if (*msg == 'r') {
        msg += 2;
        if (*msg == '1') {
          result.marker = Flag_TR10;
        } else if (*msg == '2') {
          result.marker = Flag_TR20;
        } else if (*msg == '3') {
          result.marker = Flag_TR30;
        } else if (*msg == '4') {
          result.marker = Flag_TR40;
        } else if (*msg == '5') {
          result.marker = Flag_TR50;
        } else {
          PARSE_ERROR("flag t r ?");
        }
      } else {
        PARSE_ERROR("flag t ?");
      }
    } else if (*msg == 'b') {
      msg += 2;
      if (*msg == '0') {
        result.marker = Flag_B0;
      } else if (*msg == 'l') {
        msg += 2;
        if (*msg == '1') {
          result.marker = Flag_BL10;
        } else if (*msg == '2') {
          result.marker = Flag_BL20;
        } else if (*msg == '3') {
          result.marker = Flag_BL30;
        } else if (*msg == '4') {
          result.marker = Flag_BL40;
        } else if (*msg == '5') {
          result.marker = Flag_BL50;
        } else {
          PARSE_ERROR("flag b l ?");
        }
      } else if (*msg == 'r') {
        msg += 2;
        if (*msg == '1') {
          result.marker = Flag_BR10;
        } else if (*msg == '2') {
          result.marker = Flag_BR20;
        } else if (*msg == '3') {
          result.marker = Flag_BR30;
        } else if (*msg == '4') {
          result.marker = Flag_BR40;
        } else if (*msg == '5') {
          result.marker = Flag_BR50;
        } else {
          PARSE_ERROR("flag b r ?");
        }
      } else {
        PARSE_ERROR("flag b ?");
      }
    } else if (*msg == 'c') {
      msg += 1;
      if (*msg == ')') {
        result.marker = Flag_C;
      } else {
        msg += 1;
        if (*msg == 'b') {
          result.marker = Flag_CB;
        } else if (*msg == 't') {
          result.marker = Flag_CT;
        } else {
          PARSE_ERROR("flag c ?");
        }
      }
    } else if (*msg == 'p') {
      msg += 2;
      if (*msg == 'r') {
        msg += 2;
        if (*msg == 't') {
          result.marker = Flag_PRT;
        } else if (*msg == 'c') {
          result.marker = Flag_PRC;
        } else if (*msg == 'b') {
          result.marker = Flag_PRB;
        } else {
          PARSE_ERROR("flag p r ?");
        }
      } else if (*msg == 'l') {
        msg += 2;
        if (*msg == 't') {
          result.marker = Flag_PLT;
        } else if (*msg == 'c') {
          result.marker = Flag_PLC;
        } else if (*msg == 'b') {
          result.marker = Flag_PLB;
        } else {
          PARSE_ERROR("flag p l ?");
        }
      } else {
        PARSE_ERROR("flag p ?");
      }
    } else if (*msg == 'g') {
      msg += 2;
      if (*msg == 'l') {
        msg += 2;
        if (*msg == 't') {
          result.marker = Flag_GLT;
        } else if (*msg == 'b') {
          result.marker = Flag_GLB;
        } else {
          PARSE_ERROR("flag g l ?");
        }
      } else if (*msg == 'r') {
        msg += 2;
        if (*msg == 't') {
          result.marker = Flag_GRT;
        } else if (*msg == 'b') {
          result.marker = Flag_GRB;
        } else {
          PARSE_ERROR("flag g r ?");
        }
      } else {
        PARSE_ERROR("flag g ?");
      }
    } else {
      PARSE_ERROR("flag ?");
    }
  } else if (*msg == 'F') { // Flag behind
    result.type = OBJ_Marker_Behind;
    // result.marker = _pMem->ClosestFlagTo(); /*TODO:  could be No_Marker */
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movabsq $0x3800000005, %rcx     # imm = 0x3800000005
movq %rcx, (%rdi)
movl $0x5, 0x8(%rdi)
movb $0x3f, 0xc(%rdi)
andq $0x0, 0x10(%rdi)
movzbl (%rdx), %ecx
cmpl $0x46, %ecx
je 0x37877
cmpl $0x66, %ecx
jne 0x3787d
movl $0x2, (%rax)
movzbl 0x2(%rdx), %ecx
leal -0x6c(%rcx), %esi
cmpl $0x8, %esi
ja 0x3787f
leaq 0x21a22(%rip), %rcx     # 0x5926c
movslq (%rcx,%rsi,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x37a69
cmpl $0x62, %ecx
je 0x37a53
cmpl $0x30, %ecx
jne 0x3787d
movl $0x2c, 0x4(%rax)
jmp 0x3787d
movl $0x3, (%rax)
popq %rbp
retq
cmpl $0x62, %ecx
je 0x37961
cmpl $0x63, %ecx
je 0x3794f
cmpl $0x67, %ecx
jne 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x379d9
cmpl $0x6c, %ecx
jne 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x37bbb
cmpl $0x74, %ecx
jne 0x3787d
movl $0xf, 0x4(%rax)
jmp 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x6c, %ecx
je 0x379ae
cmpl $0x72, %ecx
jne 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x37beb
cmpl $0x63, %ecx
je 0x37bd3
cmpl $0x74, %ecx
jne 0x3787d
movl $0xc, 0x4(%rax)
jmp 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x37a27
cmpl $0x6c, %ecx
je 0x379fb
cmpl $0x30, %ecx
jne 0x3787d
movl $0x18, 0x4(%rax)
jmp 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x37a95
cmpl $0x62, %ecx
je 0x37a7f
cmpl $0x30, %ecx
jne 0x3787d
movl $0x33, 0x4(%rax)
jmp 0x3787d
cmpb $0x29, 0x3(%rdx)
jne 0x3798c
movl $0x2, 0x4(%rax)
jmp 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x37ad7
cmpl $0x6c, %ecx
je 0x37aab
cmpl $0x30, %ecx
jne 0x3787d
movl $0x23, 0x4(%rax)
jmp 0x3787d
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x37b03
cmpl $0x62, %ecx
jne 0x3787d
movl $0x4, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x37bf7
cmpl $0x63, %ecx
je 0x37bdf
cmpl $0x74, %ecx
jne 0x3787d
movl $0x9, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x37bc7
cmpl $0x74, %ecx
jne 0x3787d
movl $0x11, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x3787d
leaq 0x218ba(%rip), %rdx     # 0x592cc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x17, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x3787d
leaq 0x2187a(%rip), %rdx     # 0x592b8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x19, 0x4(%rax)
jmp 0x3787d
cmpb $0x29, 0x5(%rdx)
jne 0x37b0f
movl $0x6, 0x4(%rax)
jmp 0x3787d
cmpb $0x29, 0x5(%rdx)
jne 0x37b3a
movl $0x5, 0x4(%rax)
jmp 0x3787d
cmpb $0x29, 0x5(%rdx)
jne 0x37b65
movl $0x8, 0x4(%rax)
jmp 0x3787d
cmpb $0x29, 0x5(%rdx)
jne 0x37b90
movl $0x7, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x3787d
leaq 0x217e2(%rip), %rdx     # 0x592a4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x22, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x3787d
leaq 0x217a2(%rip), %rdx     # 0x59290
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x24, 0x4(%rax)
jmp 0x3787d
movl $0x3, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x37ccf
cmpl $0x32, %ecx
je 0x37cc3
cmpl $0x31, %ecx
jne 0x3787d
movl $0x2d, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x37cf3
cmpl $0x32, %ecx
je 0x37cdb
cmpl $0x31, %ecx
jne 0x3787d
movl $0x2b, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x37cff
cmpl $0x32, %ecx
je 0x37ce7
cmpl $0x31, %ecx
jne 0x3787d
movl $0x34, 0x4(%rax)
jmp 0x3787d
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x37d17
cmpl $0x32, %ecx
je 0x37d0b
cmpl $0x31, %ecx
jne 0x3787d
movl $0x32, 0x4(%rax)
jmp 0x3787d
movl $0x10, 0x4(%rax)
jmp 0x3787d
movl $0x12, 0x4(%rax)
jmp 0x3787d
movl $0xd, 0x4(%rax)
jmp 0x3787d
movl $0xa, 0x4(%rax)
jmp 0x3787d
movl $0xe, 0x4(%rax)
jmp 0x3787d
movl $0xb, 0x4(%rax)
jmp 0x3787d
movl $0x13, 0x4(%rax)
jmp 0x3787d
movl $0x1d, 0x4(%rax)
jmp 0x3787d
movl $0x15, 0x4(%rax)
jmp 0x3787d
movl $0x14, 0x4(%rax)
jmp 0x3787d
movl $0x1b, 0x4(%rax)
jmp 0x3787d
movl $0x16, 0x4(%rax)
jmp 0x3787d
movl $0x1c, 0x4(%rax)
jmp 0x3787d
movl $0x1a, 0x4(%rax)
jmp 0x3787d
movl $0x1e, 0x4(%rax)
jmp 0x3787d
movl $0x28, 0x4(%rax)
jmp 0x3787d
movl $0x20, 0x4(%rax)
jmp 0x3787d
movl $0x1f, 0x4(%rax)
jmp 0x3787d
movl $0x26, 0x4(%rax)
jmp 0x3787d
movl $0x21, 0x4(%rax)
jmp 0x3787d
movl $0x27, 0x4(%rax)
jmp 0x3787d
movl $0x25, 0x4(%rax)
jmp 0x3787d
movl $0x2e, 0x4(%rax)
jmp 0x3787d
movl $0x2f, 0x4(%rax)
jmp 0x3787d
movl $0x2a, 0x4(%rax)
jmp 0x3787d
movl $0x35, 0x4(%rax)
jmp 0x3787d
movl $0x29, 0x4(%rax)
jmp 0x3787d
movl $0x36, 0x4(%rax)
jmp 0x3787d
movl $0x31, 0x4(%rax)
jmp 0x3787d
movl $0x30, 0x4(%rax)
jmp 0x3787d
nop