from typing import Optional


def int_append_int(int_a: int, int_b: int, l_shift_a: int = 0, bits_oi_b: Optional[int] = None) -> int:
    """
    Shift a (leading 1 of a) x left and append bits_oi_b b
    :param int_a: integer
    :param int_b: integer to append
    :param l_shift_a: left shift a
    :param bits_oi_b: bits of interest to append to a of b
    :return: interger
    """
    bits_oi_b = bits_oi_b if bits_oi_b is not None else l_shift_a
    return int_a << l_shift_a | (int_b & 2 ** bits_oi_b - 1)