public static PatternVariable variableFromUnbindingOffset(Description description, int uboffset) {
    { PatternRecord patternrecord = ((QueryIterator)(Logic.$QUERYITERATOR$.get())).currentPatternRecord;
      int offset = ((IntegerWrapper)((patternrecord.unbindingStack.theArray)[uboffset])).wrapperValue;

      { PatternVariable vbl = null;
        Vector vector000 = description.ioVariables;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          vbl = ((PatternVariable)((vector000.theArray)[index000]));
          if (vbl.boundToOffset == offset) {
            return (vbl);
          }
        }
      }
      { PatternVariable vbl = null;
        Vector vector001 = description.internalVariables;
        int index001 = 0;
        int length001 = vector001.length();

        for (;index001 < length001; index001 = index001 + 1) {
          vbl = ((PatternVariable)((vector001.theArray)[index001]));
          if (vbl.boundToOffset == offset) {
            return (vbl);
          }
        }
      }
      return (null);
    }
  }