def search_motif(motif, sequence):
    """
    Returns occurrences (start indices) of the motif in the sequence.

    >>> search_motif("GATC", "ACAACGATCGCCAGCAGATCGTGAGGC")
    [5, 16]
    >>> search_motif("GATC", "GATCGCCAGCAGATC")
    [0, 11]
    >>> search_motif("GATC", "GCTCGCCAGCATATC")
    []
    >>> search_motif("GATC", "GAT")
    []
    """
    occurrences = []
    i_limit = len(sequence) - 4
    for i, c in enumerate(sequence):
        if c == motif[0]:
            if i > i_limit:
                continue
            if sequence[i:i+4] == motif:
                occurrences.append(i)
    return occurrences