def multiply_int(x, y):
    if x == 0 or y == 0:
        return 0

    negative = (x < 0) ^ (y < 0)
    a = -x if x < 0 else x
    b = -y if y < 0 else y

    if a < b:
        a, b = b, a

    result = 0
    while b > 0:
        if b & 1:
            result += a
        a += a
        b >>= 1

    return -result if negative else result