function LOOP() {
    // stop if scanned past end of path
    if (pos >= p.length) {
      if (cache) cache[original] = p;
      return cb(null, p);
    }

    // find the next part
    nextPartRe.lastIndex = pos;
    var result = nextPartRe.exec(p);
    previous = current;
    current += result[0];
    base = previous + result[1];
    pos = nextPartRe.lastIndex;

    // continue if not a symlink
    if (knownHard[base] || (cache && cache[base] === base)) {
      return process.nextTick(LOOP);
    }

    if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
      // known symbolic link.  no need to stat again.
      return gotResolvedLink(cache[base]);
    }

    return fs.lstat(base, gotStat);
  }
function LOOP() {
    // stop if scanned past end of path
    if (pos >= p.length) {
      if (cache) cache[original] = p;
      return cb(null, p);
    }

    // find the next part
    nextPartRe.lastIndex = pos;
    var result = nextPartRe.exec(p);
    previous = current;
    current += result[0];
    base = previous + result[1];
    pos = nextPartRe.lastIndex;

    // continue if not a symlink
    if (knownHard[base] || (cache && cache[base] === base)) {
      return process.nextTick(LOOP);
    }

    if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
      // known symbolic link.  no need to stat again.
      return gotResolvedLink(cache[base]);
    }

    return fs.lstat(base, gotStat);
  }
function LOOP ( ) { // stop if scanned past end of path if ( pos >= p . length ) { if ( cache ) cache [ original ] = p ; return cb ( null , p ) ; } // find the next part nextPartRe . lastIndex = pos ; var result = nextPartRe . exec ( p ) ; previous = current ; current += result [ 0 ] ; base = previous + result [ 1 ] ; pos = nextPartRe . lastIndex ; // continue if not a symlink if ( knownHard [ base ] || ( cache && cache [ base ] === base ) ) { return process . nextTick ( LOOP ) ; } if ( cache && Object . prototype . hasOwnProperty . call ( cache , base ) ) { // known symbolic link.  no need to stat again. return gotResolvedLink ( cache [ base ] ) ; } return fs . lstat ( base , gotStat ) ; }
walk down the path, swapping out linked pathparts for their real values
walk down the path swapping out linked pathparts for their real values