(arch, reg_offset)
return None
: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
: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
: 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
def get_reg_name(arch, reg_offset):
        """
        :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
        """
        # todo does this make sense
        if reg_offset is None:
            return None

        original_offset = reg_offset
        while reg_offset >= 0 and reg_offset >= original_offset - (arch.bytes):
            if reg_offset in arch.register_names:
                return arch.register_names[reg_offset]
            else:
                reg_offset -= 1
        return None
def get_reg_name ( arch , reg_offset ) : # todo does this make sense if reg_offset is None : return None original_offset = reg_offset while reg_offset >= 0 and reg_offset >= original_offset - ( arch . bytes ) : if reg_offset in arch . register_names : return arch . register_names [ reg_offset ] else : reg_offset -= 1 return None