// File: /workspace/github_cpp_makefile_star2_O1/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 0x43aff
cmpl $0x66, %ecx
jne 0x43b05
movl $0x2, (%rax)
movzbl 0x2(%rdx), %ecx
cmpl $0x6b, %ecx
jle 0x43b07
addl $-0x6c, %ecx
cmpl $0x8, %ecx
ja 0x43b05
leaq 0x29802(%rip), %rsi     # 0x6d2d4
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x43cf5
cmpl $0x62, %ecx
je 0x43c9d
cmpl $0x30, %ecx
jne 0x43b05
movl $0x2c, 0x4(%rax)
jmp 0x43b05
movl $0x3, (%rax)
popq %rbp
retq
cmpl $0x62, %ecx
je 0x43bdb
cmpl $0x63, %ecx
je 0x43c06
cmpl $0x67, %ecx
jne 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x43c65
cmpl $0x6c, %ecx
jne 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x43e47
cmpl $0x74, %ecx
jne 0x43b05
movl $0xf, 0x4(%rax)
jmp 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x43cdf
cmpl $0x62, %ecx
je 0x43c87
cmpl $0x30, %ecx
jne 0x43b05
movl $0x33, 0x4(%rax)
jmp 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x43d0b
cmpl $0x6c, %ecx
je 0x43cb3
cmpl $0x30, %ecx
jne 0x43b05
movl $0x18, 0x4(%rax)
jmp 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x6c, %ecx
je 0x43c3a
cmpl $0x72, %ecx
jne 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x43e77
cmpl $0x63, %ecx
je 0x43e5f
cmpl $0x74, %ecx
jne 0x43b05
movl $0xc, 0x4(%rax)
jmp 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x72, %ecx
je 0x43d63
cmpl $0x6c, %ecx
je 0x43d37
cmpl $0x30, %ecx
jne 0x43b05
movl $0x23, 0x4(%rax)
jmp 0x43b05
cmpb $0x29, 0x3(%rdx)
jne 0x43c18
movl $0x2, 0x4(%rax)
jmp 0x43b05
movzbl 0x4(%rdx), %ecx
cmpl $0x74, %ecx
je 0x43d8f
cmpl $0x62, %ecx
jne 0x43b05
movl $0x4, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x43e83
cmpl $0x63, %ecx
je 0x43e6b
cmpl $0x74, %ecx
jne 0x43b05
movl $0x9, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x62, %ecx
je 0x43e53
cmpl $0x74, %ecx
jne 0x43b05
movl $0x11, 0x4(%rax)
jmp 0x43b05
cmpb $0x29, 0x5(%rdx)
jne 0x43d9b
movl $0x8, 0x4(%rax)
jmp 0x43b05
cmpb $0x29, 0x5(%rdx)
jne 0x43dc6
movl $0x6, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x43b05
leaq 0x2966a(%rip), %rdx     # 0x6d334
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x17, 0x4(%rax)
jmp 0x43b05
cmpb $0x29, 0x5(%rdx)
jne 0x43df1
movl $0x7, 0x4(%rax)
jmp 0x43b05
cmpb $0x29, 0x5(%rdx)
jne 0x43e1c
movl $0x5, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x43b05
leaq 0x295fe(%rip), %rdx     # 0x6d320
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x19, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x43b05
leaq 0x295be(%rip), %rdx     # 0x6d30c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x22, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
addl $-0x31, %ecx
cmpl $0x4, %ecx
ja 0x43b05
leaq 0x2957e(%rip), %rdx     # 0x6d2f8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x24, 0x4(%rax)
jmp 0x43b05
movl $0x3, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x43f67
cmpl $0x32, %ecx
je 0x43f4f
cmpl $0x31, %ecx
jne 0x43b05
movl $0x34, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x43f7f
cmpl $0x32, %ecx
je 0x43f5b
cmpl $0x31, %ecx
jne 0x43b05
movl $0x2d, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x43f97
cmpl $0x32, %ecx
je 0x43f73
cmpl $0x31, %ecx
jne 0x43b05
movl $0x32, 0x4(%rax)
jmp 0x43b05
movzbl 0x6(%rdx), %ecx
cmpl $0x33, %ecx
je 0x43fa3
cmpl $0x32, %ecx
je 0x43f8b
cmpl $0x31, %ecx
jne 0x43b05
movl $0x2b, 0x4(%rax)
jmp 0x43b05
movl $0x10, 0x4(%rax)
jmp 0x43b05
movl $0x12, 0x4(%rax)
jmp 0x43b05
movl $0xd, 0x4(%rax)
jmp 0x43b05
movl $0xa, 0x4(%rax)
jmp 0x43b05
movl $0xe, 0x4(%rax)
jmp 0x43b05
movl $0xb, 0x4(%rax)
jmp 0x43b05
movl $0x13, 0x4(%rax)
jmp 0x43b05
movl $0x1d, 0x4(%rax)
jmp 0x43b05
movl $0x15, 0x4(%rax)
jmp 0x43b05
movl $0x14, 0x4(%rax)
jmp 0x43b05
movl $0x1b, 0x4(%rax)
jmp 0x43b05
movl $0x16, 0x4(%rax)
jmp 0x43b05
movl $0x1c, 0x4(%rax)
jmp 0x43b05
movl $0x1a, 0x4(%rax)
jmp 0x43b05
movl $0x1e, 0x4(%rax)
jmp 0x43b05
movl $0x28, 0x4(%rax)
jmp 0x43b05
movl $0x20, 0x4(%rax)
jmp 0x43b05
movl $0x1f, 0x4(%rax)
jmp 0x43b05
movl $0x26, 0x4(%rax)
jmp 0x43b05
movl $0x21, 0x4(%rax)
jmp 0x43b05
movl $0x27, 0x4(%rax)
jmp 0x43b05
movl $0x25, 0x4(%rax)
jmp 0x43b05
movl $0x35, 0x4(%rax)
jmp 0x43b05
movl $0x2e, 0x4(%rax)
jmp 0x43b05
movl $0x36, 0x4(%rax)
jmp 0x43b05
movl $0x31, 0x4(%rax)
jmp 0x43b05
movl $0x2f, 0x4(%rax)
jmp 0x43b05
movl $0x2a, 0x4(%rax)
jmp 0x43b05
movl $0x30, 0x4(%rax)
jmp 0x43b05
movl $0x29, 0x4(%rax)
jmp 0x43b05
nop