private void lsSort (final int ISA, final int n, final int depth) {

		final int[] SA = this.SA;

		int ISAd;
		int first, last, i;
		int t, skip;

		for (ISAd = ISA + depth; -n < SA[0]; ISAd += (ISAd - ISA)) {
			first = 0;
			skip = 0;
			do {
				if ((t = SA[first]) < 0) {
					first -= t;
					skip += t;
				} else {
					if (skip != 0) {
						SA[first + skip] = skip;
						skip = 0;
					}
					last = SA[ISA + t] + 1;
					lsIntroSort (ISA, ISAd, ISA + n, first, last);
					first = last;
				}
			} while (first < n);
			if (skip != 0) {
				SA[first + skip] = skip;
			}
			if (n < (ISAd - ISA)) {
				first = 0;
				do {
					if ((t = SA[first]) < 0) {
						first -= t;
					}
					else {
						last = SA[ISA + t] + 1;
						for (i = first; i < last; ++i) {
							SA[ISA + SA[i]] = i;
						}
						first = last;
					}
				} while (first < n);
				break;
			}
		}

	}