// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $0x0, 0x10(%rdi)
movzbl (%rdx), %ecx
cmpl $0x46, %ecx
je 0x428c5
cmpl $0x66, %ecx
jne 0x428cb
movl $0x2, (%rax)
movzbl 0x2(%rdx), %ecx
cmpl $0x6b, %ecx
jle 0x428cd
addl $-0x6c, %ecx
cmpl $0x8, %ecx
ja 0x428cb
leaq 0x28a14(%rip), %rsi     # 0x6b2ac
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x42abb
cmpl $0x62, %ecx
je 0x42a63
cmpl $0x30, %ecx
jne 0x428cb
movl $0x2c, 0x4(%rax)
jmp 0x428cb
movl $0x3, (%rax)
popq %rbp
retq
cmpl $0x62, %ecx
je 0x429a1
cmpl $0x63, %ecx
je 0x429cc
cmpl $0x67, %ecx
jne 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x42a2b
cmpl $0x6c, %ecx
jne 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x42c0d
cmpl $0x74, %ecx
jne 0x428cb
movl $0xf, 0x4(%rax)
jmp 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x42aa5
cmpl $0x62, %ecx
je 0x42a4d
cmpl $0x30, %ecx
jne 0x428cb
movl $0x33, 0x4(%rax)
jmp 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x42ad1
cmpl $0x6c, %ecx
je 0x42a79
cmpl $0x30, %ecx
jne 0x428cb
movl $0x18, 0x4(%rax)
jmp 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x6c, %ecx
je 0x42a00
cmpl $0x72, %ecx
jne 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x42c3d
cmpl $0x63, %ecx
je 0x42c25
cmpl $0x74, %ecx
jne 0x428cb
movl $0xc, 0x4(%rax)
jmp 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x42b29
cmpl $0x6c, %ecx
je 0x42afd
cmpl $0x30, %ecx
jne 0x428cb
movl $0x23, 0x4(%rax)
jmp 0x428cb
cmpb $0x29, 0x3(%rdx)
jne 0x429de
movl $0x2, 0x4(%rax)
jmp 0x428cb
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x42b55
cmpl $0x62, %ecx
jne 0x428cb
movl $0x4, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x42c49
cmpl $0x63, %ecx
je 0x42c31
cmpl $0x74, %ecx
jne 0x428cb
movl $0x9, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x42c19
cmpl $0x74, %ecx
jne 0x428cb
movl $0x11, 0x4(%rax)
jmp 0x428cb
cmpb $0x29, 0x5(%rdx)
jne 0x42b61
movl $0x8, 0x4(%rax)
jmp 0x428cb
cmpb $0x29, 0x5(%rdx)
jne 0x42b8c
movl $0x6, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x428cb
leaq 0x2887c(%rip), %rdx     # 0x6b30c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x17, 0x4(%rax)
jmp 0x428cb
cmpb $0x29, 0x5(%rdx)
jne 0x42bb7
movl $0x7, 0x4(%rax)
jmp 0x428cb
cmpb $0x29, 0x5(%rdx)
jne 0x42be2
movl $0x5, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x428cb
leaq 0x28810(%rip), %rdx     # 0x6b2f8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x19, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x428cb
leaq 0x287d0(%rip), %rdx     # 0x6b2e4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x22, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x428cb
leaq 0x28790(%rip), %rdx     # 0x6b2d0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x24, 0x4(%rax)
jmp 0x428cb
movl $0x3, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x42d2d
cmpl $0x32, %ecx
je 0x42d15
cmpl $0x31, %ecx
jne 0x428cb
movl $0x34, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x42d45
cmpl $0x32, %ecx
je 0x42d21
cmpl $0x31, %ecx
jne 0x428cb
movl $0x2d, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x42d5d
cmpl $0x32, %ecx
je 0x42d39
cmpl $0x31, %ecx
jne 0x428cb
movl $0x32, 0x4(%rax)
jmp 0x428cb
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x42d69
cmpl $0x32, %ecx
je 0x42d51
cmpl $0x31, %ecx
jne 0x428cb
movl $0x2b, 0x4(%rax)
jmp 0x428cb
movl $0x10, 0x4(%rax)
jmp 0x428cb
movl $0x12, 0x4(%rax)
jmp 0x428cb
movl $0xd, 0x4(%rax)
jmp 0x428cb
movl $0xa, 0x4(%rax)
jmp 0x428cb
movl $0xe, 0x4(%rax)
jmp 0x428cb
movl $0xb, 0x4(%rax)
jmp 0x428cb
movl $0x13, 0x4(%rax)
jmp 0x428cb
movl $0x1d, 0x4(%rax)
jmp 0x428cb
movl $0x15, 0x4(%rax)
jmp 0x428cb
movl $0x14, 0x4(%rax)
jmp 0x428cb
movl $0x1b, 0x4(%rax)
jmp 0x428cb
movl $0x16, 0x4(%rax)
jmp 0x428cb
movl $0x1c, 0x4(%rax)
jmp 0x428cb
movl $0x1a, 0x4(%rax)
jmp 0x428cb
movl $0x1e, 0x4(%rax)
jmp 0x428cb
movl $0x28, 0x4(%rax)
jmp 0x428cb
movl $0x20, 0x4(%rax)
jmp 0x428cb
movl $0x1f, 0x4(%rax)
jmp 0x428cb
movl $0x26, 0x4(%rax)
jmp 0x428cb
movl $0x21, 0x4(%rax)
jmp 0x428cb
movl $0x27, 0x4(%rax)
jmp 0x428cb
movl $0x25, 0x4(%rax)
jmp 0x428cb
movl $0x35, 0x4(%rax)
jmp 0x428cb
movl $0x2e, 0x4(%rax)
jmp 0x428cb
movl $0x36, 0x4(%rax)
jmp 0x428cb
movl $0x31, 0x4(%rax)
jmp 0x428cb
movl $0x2f, 0x4(%rax)
jmp 0x428cb
movl $0x2a, 0x4(%rax)
jmp 0x428cb
movl $0x30, 0x4(%rax)
jmp 0x428cb
movl $0x29, 0x4(%rax)
jmp 0x428cb
nop