public static Symbol startupNameFromFile(String file) {
    if (!Stella.probeFileP(Stella.makeFileName(file, Stella.KWD_STELLA, true))) {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("STELLA source file `" + Stella.makeFileName(file, Stella.KWD_STELLA, true) + "' does not exist");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    { String longname = Stella.makeFileName(file, Stella.KWD_STELLA, true);
      Module savedmodule = ((Module)(Stella.$MODULE$.get()));
      boolean seeninmoduleP = false;
      boolean unusedP = false;
      Symbol startupfnname = null;

      { InputFileStream inputstream = null;

        try {
          inputstream = Stella.openInputFile(longname, Stella.NIL);
          { Object old$TransientobjectsP$000 = Stella.$TRANSIENTOBJECTSp$.get();

            try {
              Native.setBooleanSpecial(Stella.$TRANSIENTOBJECTSp$, true);
              { Stella_Object tree = null;
                SExpressionIterator iter000 = InputStream.sExpressions(inputstream);

                while (iter000.nextP()) {
                  tree = iter000.value;
                  { Object old$TransientobjectsP$001 = Stella.$TRANSIENTOBJECTSp$.get();

                    try {
                      Native.setBooleanSpecial(Stella.$TRANSIENTOBJECTSp$, false);
                      if (Stella_Object.safePrimaryType(tree) == Stella.SGT_STELLA_CONS) {
                        { Cons tree000 = ((Cons)(tree));

                          { Object [] caller_MV_returnarray = new Object[1];

                            unusedP = Cons.handleInModuleTree(tree000, seeninmoduleP, true, caller_MV_returnarray);
                            seeninmoduleP = ((boolean)(((BooleanWrapper)(caller_MV_returnarray[0])).wrapperValue));
                          }
                          unusedP = unusedP;
                          if (seeninmoduleP) {
                            startupfnname = Stella.yieldStartupFunctionName(file);
                            savedmodule.changeModule();
                            return (startupfnname);
                          }
                        }
                      }
                      else {
                      }

                    } finally {
                      Stella.$TRANSIENTOBJECTSp$.set(old$TransientobjectsP$001);
                    }
                  }
                }
              }

            } finally {
              Stella.$TRANSIENTOBJECTSp$.set(old$TransientobjectsP$000);
            }
          }

        } finally {
          if (inputstream != null) {
            inputstream.free();
          }
        }
      }
      {
        Stella.STANDARD_WARNING.nativeStream.println("Warning: Missing IN-MODULE declaration for file `" + file + "'");
        Stella.STANDARD_WARNING.nativeStream.println();
      }
;
    }
    return (null);
  }