# Path: lib/Register.py
# def get_reg_class(reg):
#     """
#     @brief Determines the register class of a given reg.
#     All different register names that address the same register
#     belong to the same register class e.g.: 'ax' and 'eax'
#     @param reg name of register
#     @return register class
#     """
#     lreg = reg.lower()
#     ret_value = None
#     for pos, reg_list in enumerate(_registerClasses):
#         for reg in reg_list:
#             found = False
#             if reg == lreg:
#                 found = True
#                 ret_value = pos
#                 break
#         if found:
#             break
#     return ret_value


from lib.Register import get_reg_class
                                         self.disasm_str(),
                                         ''.join(c for c in self.comment if self.comment is not None),
                                         ''.join('%s:%s ' % (c, self.ctx[c]) for c in self.ctx.keys() if isinstance(self.ctx, dict)))
    @property
    def is_mov(self):
        return self._line[2][0].__contains__('mov')

    @property
    def is_pop(self):
        return self._line[2][0].startswith('pop')

    @property
    def is_push(self):
        return self._line[2][0].startswith('push')

    @property
    def is_jmp(self):
        # returns true for conditional AND non-cond jumps
        return self._line[2][0].startswith('j')

    @property
    def is_op1_reg(self):
        try:
            return get_reg_class(self._line[2][1]) is not None
        except:
            return False

    @property
    def is_op2_reg(self):
        try:

# Path: lib/Register.py
# def get_reg_class(reg):
#     """
#     @brief Determines the register class of a given reg.
#     All different register names that address the same register
#     belong to the same register class e.g.: 'ax' and 'eax'
#     @param reg name of register
#     @return register class
#     """
#     lreg = reg.lower()
#     ret_value = None
#     for pos, reg_list in enumerate(_registerClasses):
#         for reg in reg_list:
#             found = False
#             if reg == lreg:
#                 found = True
#                 ret_value = pos
#                 break
#         if found:
#             break
#     return ret_value


# Path: dynamic/TraceRepresentation.py
from lib.Register import get_reg_class

                                         self.disasm_str(),
                                         ''.join(c for c in self.comment if self.comment is not None),
                                         ''.join('%s:%s ' % (c, self.ctx[c]) for c in self.ctx.keys() if isinstance(self.ctx, dict)))
    @property
    def is_mov(self):
        return self._line[2][0].__contains__('mov')

    @property
    def is_pop(self):
        return self._line[2][0].startswith('pop')

    @property
    def is_push(self):
        return self._line[2][0].startswith('push')

    @property
    def is_jmp(self):
        # returns true for conditional AND non-cond jumps
        return self._line[2][0].startswith('j')

    @property
    def is_op1_reg(self):
        try:
            return get_reg_class(self._line[2][1]) is not None
        except:
            return False

    @property
    def is_op2_reg(self):
        try:

            return get_reg_class(self._line[2][2]) is not None