# 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
# 
# def get_reg_class_lst(reg_class):
#     """
#     @return Returns the whole list of a given register class 
#     """
#     return _registerClasses[reg_class]
# 
# Path: lib/StartVal.py
# ASSEMBLER_64 = 64
# ASSEMBLER_32 = 32


from lib.Register import (get_reg_class,
                          get_reg_class_lst)
from lib import StartVal as SV
            else:
                end_str = end_str + str(op) + ', '
        if (self.list_len != 0):
            end_str = end_str[0:len(end_str) - 2] + '\n'
        else:
            end_str += '\n'
        end_str = end_str.replace('+0x0', '')
        return end_str

    def get_scratch_variable(self):
        """
        @brief Replace memory operands from 'vpush' and 'vpop' with
        ScratchOperands
        """
        if (self.inst_type != POP_T and
                    self.inst_type != PUSH_T and self.list_len != 1):
            return
        op0 = self.op_lst[0]
        if (op0.type == MEMORY_T and
                    get_reg_class(op0.register) == get_reg_class('edi')):
            self.op_lst[0] = ScratchOperand(SVARIABLE_T,
                                            op0.displacement, op0.size)

    def replace_reg_class(self, rreg, catch_value):
        """
        @brief Replace register of evrey op with catch_value
        if it is in the same register class as rreg
        @param rreg Register to replace
        @param catch_value Value that replaces the register 
        """

# 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
# 
# def get_reg_class_lst(reg_class):
#     """
#     @return Returns the whole list of a given register class 
#     """
#     return _registerClasses[reg_class]
# 
# Path: lib/StartVal.py
# ASSEMBLER_64 = 64
# ASSEMBLER_32 = 32


# Path: lib/PseudoInstruction.py
from lib.Register import (get_reg_class,
                          get_reg_class_lst)
from lib import StartVal as SV

            else:
                end_str = end_str + str(op) + ', '
        if (self.list_len != 0):
            end_str = end_str[0:len(end_str) - 2] + '\n'
        else:
            end_str += '\n'
        end_str = end_str.replace('+0x0', '')
        return end_str

    def get_scratch_variable(self):
        """
        @brief Replace memory operands from 'vpush' and 'vpop' with
        ScratchOperands
        """
        if (self.inst_type != POP_T and
                    self.inst_type != PUSH_T and self.list_len != 1):
            return
        op0 = self.op_lst[0]
        if (op0.type == MEMORY_T and
                    get_reg_class(op0.register) == get_reg_class('edi')):
            self.op_lst[0] = ScratchOperand(SVARIABLE_T,
                                            op0.displacement, op0.size)

    def replace_reg_class(self, rreg, catch_value):
        """
        @brief Replace register of evrey op with catch_value
        if it is in the same register class as rreg
        @param rreg Register to replace
        @param catch_value Value that replaces the register 
        """

        reg_class = get_reg_class(rreg)