':param arch: the architecture
:param reg_offset: Tries to find the name of a register given the offset in the registers.
:return: The register name'

@staticmethod
def get_reg_name(arch, reg_offset):

    if (reg_offset is None):
        return None
    original_offset = reg_offset
    while ((reg_offset >= 0) and (reg_offset >= (original_offset - (arch.bits / 8)))):
        if (reg_offset in arch.register_names):
            return arch.register_names[reg_offset]
        else:
            reg_offset -= 1
    return None
