def right_rotate(x: int, amount: int, bits: int=32) ->int:
    """
    Performs a right-rotate.

    Parameters:
        x      (int): Integer to rotate.
        amount (int): Amount to rotate by.
        bits   (int): Bitspace to rotate over.
    
    Returns:
        int: Rotated integer.
    """
    mask = 2 ** bits - 1
    return (x >> amount | x << bits - amount) & mask
