def int_to_bits(x, width):
    """Return `list` of `bool` for integer value `x`."""
    # Adapted from the function
    #   `omega.logic.bitvector.int_to_twos_complement`.
    # The sign bit is not needed.
    n = x.bit_length()
    if x >= 0:
        y = x
    else:
        y = 2**n + x
    m = max(width, n, 1)  # if y == 0 then n == 0
    bits = bin(y).lstrip('-0b').zfill(m)
    bits = list(reversed(bits))
    bits = [bool(int(b)) for b in bits]
    return bits