def decode_imsi(imsi64):
    """
    Convert from the compacted uint back to a string, using the second two bits
    to determine the padding
    Args:
        imsi64 - compacted representation of imsi with padding at end
    Returns:
        imsi string in the form IMSI00101...
    """
    prefix_len = (imsi64 >> 1) & 0x3
    return 'IMSI' + '0' * prefix_len + str(imsi64 >> 3)