public static String computeUnitsForInteger(int value, boolean negateExponentP) {
    { StringBuffer buffer = Stella.makeRawMutableString(128);
      int i = 0;
      int p = 1;
      int e = 0;
      boolean previousNoExponentP = false;

      { IntegerWrapper prime = null;
        Cons iter000 = Utilities.$PRIME_NUMBERS$;

        loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          prime = ((IntegerWrapper)(iter000.value));
          e = 0;
          p = prime.wrapperValue;
          while ((value % p) == 0) {
            value = ((int)(((double)(value)) / p));
            e = e + 1;
          }
          if (e > 0) {
            if (previousNoExponentP) {
              edu.isi.stella.javalib.Native.mutableString_nthSetter(buffer, '.', i);
              i = i + 1;
            }
            i = Stella.insertString(((Measure)(Utilities.$PRIME_TO_BASE_MEASURE_TABLE$.lookup(p))).baseUnit, 0, Stella.NULL_INTEGER, buffer, i, Utilities.KWD_PRESERVE);
            if (negateExponentP) {
              i = Stella.insertString(Native.integerToString(((long)(0 - e))), 0, Stella.NULL_INTEGER, buffer, i, Utilities.KWD_PRESERVE);
              previousNoExponentP = false;
            }
            else if (e > 1) {
              i = Stella.insertString(Native.integerToString(((long)(e))), 0, Stella.NULL_INTEGER, buffer, i, Utilities.KWD_PRESERVE);
              previousNoExponentP = false;
            }
            else {
              previousNoExponentP = true;
            }
          }
          if (value < p) {
            break loop000;
          }
        }
      }
      return (Native.mutableString_subsequence(buffer, 0, i));
    }
  }