/*@
@ requires s1 != dst && s2 != dst;
@ requires s1.length >= s1Len && s2.length >= s2Len && dst.length >= s1Len + s2Len;
@ assignable dst[0 .. s1Len + s2Len - 1];
@ ensures AP(dst, s1Len + s2Len) == \old(AP(s1, s1Len) * AP(s2, s2Len));
@
551376
private static void mult(int[] s1, int s1Len, int[] s2, int s2Len, int[] dst) {
        for (int i = 0; i < s1Len; i++) {
            long v = s1[i] & LONG_MASK;
            long p = 0L;
            for (int j = 0; j < s2Len; j++) {
                p += (dst[i + j] & LONG_MASK) + v * (s2[j] & LONG_MASK);
                dst[i + j] = (int) p;
                p >>>= 32;
            }
            dst[i + s2Len] = (int) p;
        }
    }
77167
function isSameMonthAndYear(d1, d2) {
      return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth();
    }
835568
function(or1, or2) {
			var union1 = set.union(or1.values[0], or2.values[0]);
			var union2 = set.union(or1.values[1], or2.values[1]);

			if (!isAndOrOr(union1) || !isAndOrOr(union2)) {
				return set.union(union1, union2);
			}
			union1 = set.union(or1.values[0], or2.values[1]);
			union2 = set.union(or1.values[1], or2.values[0]);

			if (!isAndOrOr(union1) || !isAndOrOr(union2)) {
				return set.union(union1, union2);
			} else {
				return new is.Or([or1, or2]);
			}
		}
346924
@SuppressWarnings("deprecation")
	public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) {
        if (d1 == null || d2 == null) {
            return false;
        }

        return d1.getDate() == d2.getDate()
                && d1.getMonth() == d2.getMonth()
                && d1.getYear() == d2.getYear()
                && d1.getHours() == d2.getHours()
                && d1.getMinutes() == d2.getMinutes()
                && d1.getSeconds() == d2.getSeconds();
    }
963842
function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) {
		return (p2.y - p.y) * (p1.x - p.x) > (p1.y - p.y) * (p2.x - p.x);
	}
1352637
private void normalizeDate() {
		while (day <= 0) {
			int days = TimeUtils.yearLength(month > 2 ? year : year - 1);
			day += days;
			--year;
		}

		if (month <= 0) {
			int years = month / 12 - 1;
			year += years;
			month -= 12 * years;
		} else if (month > 12) {
			int years = (month - 1) / 12;
			year += years;
			month -= 12 * years;
		}

		while (true) {
			if (month == 1) {
				int yearLength = TimeUtils.yearLength(year);
				if (day > yearLength) {
					++year;
					day -= yearLength;
				}
			}

			int monthLength = TimeUtils.monthLength(year, month);
			if (day <= monthLength) {
				break;
			}

			day -= monthLength;
			if (++month > 12) {
				month -= 12;
				++year;
			}
		}
	}
966367
private static int appendByte(byte[] dst, int offset, long value) {
        if (value == 0) {
            return offset;
        }
        dst[offset] = (byte) value;
        return offset + 1;
    }
1359976
function(p1, p2)
	{
		var min = Math.min(p1.length, p2.length);
		var comp = 0;
		
		for (var i = 0; i < min; i++)
		{
			if (p1[i] != p2[i])
			{
				if (p1[i].length == 0 ||
					p2[i].length == 0)
				{
					comp = (p1[i] == p2[i]) ? 0 : ((p1[i] > p2[i]) ? 1 : -1);
				}
				else
				{
					var t1 = parseInt(p1[i]);
					var t2 = parseInt(p2[i]);
					
					comp = (t1 == t2) ? 0 : ((t1 > t2) ? 1 : -1);
				}
				
				break;
			}
		}
		
		// Compares path length if both paths are equal to this point
		if (comp == 0)
		{
			var t1 = p1.length;
			var t2 = p2.length;
			
			if (t1 != t2)
			{
				comp = (t1 > t2) ? 1 : -1;
			}
		}
		
		return comp;
	}
1030922
private int ssCompare(int pa, int pb, int p2, int depth) {
        int U1, U2, U1n, U2n;// pointers to T

        for (U1 = depth + pa, U2 = depth + SA[p2], U1n = pb + 2, U2n = SA[p2 + 1] + 2; (U1 < U1n)
            && (U2 < U2n) && (T[start + U1] == T[start + U2]); ++U1, ++U2) {
        }

        return U1 < U1n ? (U2 < U2n ? T[start + U1] - T[start + U2] : 1) : (U2 < U2n ? -1
            : 0);
    }
305908
private static boolean isleap( double gpsTime ) {
        boolean isLeap = false;
        double[] leaps = getleaps();
        for( int i = 0; i < leaps.length; i += 1 ) {
            if (gpsTime == leaps[i]) {
                isLeap = true;
                break;
            }
        }
        return isLeap;
    }
1238235
function boundAlpha(a) {
    a = parseFloat(a);

    if (isNaN(a) || a < 0 || a > 1) {
        a = 1;
    }

    return a;
}
492585
private void construct(int _raw,
                           int _startMonth,
                           int _startDay,
                           int _startDayOfWeek,
                           int _startTime,
                           int _startTimeMode,
                           int _endMonth,
                           int _endDay,
                           int _endDayOfWeek,
                           int _endTime,
                           int _endTimeMode,
                           int _dst) {
        raw            = _raw;
        startMonth     = _startMonth;
        startDay       = _startDay;
        startDayOfWeek = _startDayOfWeek;
        startTime      = _startTime;
        startTimeMode  = _startTimeMode;
        endMonth       = _endMonth;
        endDay         = _endDay;
        endDayOfWeek   = _endDayOfWeek;
        endTime        = _endTime;
        endTimeMode    = _endTimeMode;
        dst            = _dst;
        startYear      = 0;
        startMode      = DOM_MODE;
        endMode        = DOM_MODE;

        decodeRules();

        if (_dst <= 0) {
            throw new IllegalArgumentException();
        }
    }
816883
function negate(m, dst) {
  dst = dst || new MatType(16);

  dst[ 0] = -m[ 0];
  dst[ 1] = -m[ 1];
  dst[ 2] = -m[ 2];
  dst[ 3] = -m[ 3];
  dst[ 4] = -m[ 4];
  dst[ 5] = -m[ 5];
  dst[ 6] = -m[ 6];
  dst[ 7] = -m[ 7];
  dst[ 8] = -m[ 8];
  dst[ 9] = -m[ 9];
  dst[10] = -m[10];
  dst[11] = -m[11];
  dst[12] = -m[12];
  dst[13] = -m[13];
  dst[14] = -m[14];
  dst[15] = -m[15];

  return dst;
}
149084
function(){
        var h=this.maxY-this.minY;
        var d=this.maxZ-this.minZ;
        return 2*((this.maxX-this.minX)*(h+d)+h*d);
    }
104346
def ed(s1, s2):
    '''
    '''
    m, n = len(s1), len(s2)
    if m < n:
        m, n = n, m         # ensure n <= m, to use O(min(n,m)) space
        s1, s2 = s2, s1
    d = list(range(n+1))
    for i in range(m):
        p = i
        d[0] = i+1
        for j in range(n):
            t = 0 if s1[i] == s2[j] else 1
            p, d[j+1] = d[j+1], min(p+t, d[j]+1, d[j+1]+1)
    return d[n]
1157563
@Override
  public Double subtract12(Long arg1, Double arg2) {
    if (arg1 == null || arg2 == null) {
      return Double.NaN;
    } else {
      return arg1.doubleValue() - arg2;
    }
  }
671618
public static boolean isEqualOrNull( Object s1,
                                         Object s2 ) {
        if ( s1 == null
                && s2 == null ) {
            return true;
        } else if ( s1 != null
                && s2 != null
                && s1.equals( s2 ) ) {
            return true;
        }
        return false;
    }