def filter_divisors(iterable, reverse=False):
    """Removes all elements that divide any other.

    Returns list generated by given iterable consisting of elements that are
    maximal by divisibility.
    Input argument must be in decreasing order

    Args:
        iterable: Input iterable of integers in decreasing order.
        reverse: If true, returns list in increasing order. Default is false.

    Returns:
        List without divisors.

    """
    ret = []
    if not reverse:
        def append_left(element): ret.insert(0, element)

        add_element = append_left
    else:
        add_element = ret.append
    for element in iterable:
        if not any(x % element == 0 for x in ret):
            add_element(element)

    return ret