def _decode_mask(mask):
    """splits a mask into its bottom_any and empty parts"""
    empty = []
    bottom_any = []

    for i in range(32):
        if (mask >> i) & 1 == 1:
            empty.append(i)
        if (mask >> (i + 32)) & 1 == 1:
            bottom_any.append(i)

    return bottom_any, empty