class OpBehaviorIntSright extends BinaryOpBehavior {

	@Override
	public long evaluateBinary(int sizeout, int sizein, long in1, long in2) {
		long maxShift = (sizein * 8) - 1;
		if (in2 < 0 || in2 > maxShift) {
			if (Utils.signbit_negative(in1, sizein)) {
				return Utils.calc_mask(sizein);
			}
			return 0;
		}
		long res;
		if (Utils.signbit_negative(in1, sizein)) {
			res = in1 >> in2;
			long mask = Utils.calc_mask(sizein);
			mask = (mask >>> in2) ^ mask;
			res |= mask;
		}
		else {
			res = in1 >>> in2;
		}
		return res;
	}

	public  OpBehaviorIntSright();

}