def DecodeFileRecordSegmentReference(ReferenceNumber):
    """Decode a file record segment reference, return the (file_record_segment_number, sequence_number) tuple."""

    file_record_segment_number = ReferenceNumber & 0xFFFFFFFFFFFF
    sequence_number = ReferenceNumber >> 48

    return (file_record_segment_number, sequence_number)