if ( bitnum == NOMORE) {
if ( bitnum == NOMORE) { if (VM.TraceStkMaps) VM.sysWrite("  NOMORE \n");
  getNextRef(int offset, int siteindex) {    int mapByteNum, startbitnumb, bitnum;    if (VM.TraceStkMaps)    {         VM.sysWrite("VM_ReferenceMaps-getNextRef-inputs offset = ");         VM.sysWrite( offset);         VM.sysWrite( " -siteindex = ");         VM.sysWrite( siteindex);         VM.sysWrite( "\n");     }    // use index to locate the gc point of interest    int mapindex  = siteindex * bytesPerMap;    if (bytesPerMap == 0) return 0;           // no map ie no refs    // is this the initial scan for the map    if ( offset == STARTOFFSET)    {       mapByteNum = mapindex;       startbitnumb = 1;      // start search from beginning       bitnum = scanForNextRef(startbitnumb, mapByteNum, bitsPerMap, referenceMaps);         if (debug)	 {         VM.sysWrite("VM_ReferenceMaps-getNextRef-initial call bitnum = ");         VM.sysWrite( bitnum);         VM.sysWrite( "\n");	 }       if ( bitnum == NOMORE)	 {          return NOMORE;	 }       if (debug)	 {         VM.sysWrite("VM_ReferenceMaps-getNextRef-initial offset return = " );         VM.sysWrite( convertBitNumToOffset(bitnum));         VM.sysWrite( "\n");	 }       return (convertBitNumToOffset(bitnum));     } // end offset = STARTOFFSET      // get bitnum and determine mapword to restart scan      bitnum = convertOffsetToBitNum(offset);  // get the bit number     if (VM.TraceStkMaps)       {       VM.sysWrite("VM_ReferenceMaps-getnextref- not initial- entry offset,bitnum  = ");       VM.sysWrite( offset);       VM.sysWrite(" ");       VM.sysWrite( bitnum);       VM.sysWrite( "\n");       }      // scan forward from current position to next ref      bitnum = scanForNextRef(bitnum+1, mapindex,(bitsPerMap - (bitnum - 1)),referenceMaps);      if (debug)	{         VM.sysWrite("VM_ReferenceMaps-getnextref- not initial- scan returned bitnum = ");         VM.sysWrite(  bitnum );         VM.sysWrite( "\n");	}     // test for end of map     if (bitnum == NOMORE)       {         return NOMORE;       }     if (debug)       {        VM.sysWrite("VM_ReferenceMaps-getnextref- not initial- offset return offset = ");        VM.sysWrite( convertBitNumToOffset(bitnum));         VM.sysWrite( "\n");        }     // else convert bitnum to stack offset and return     return (convertBitNumToOffset(bitnum));  }