public static Stella_Object coerceEvaluatedTree(Stella_Object tree, Stella_Object sourcetree, StandardObject sourcetype, StandardObject targettype, boolean evaluateP, Object [] MV_returnarray) {
    { Object old$Evaluationparenttree$000 = Stella.$EVALUATIONPARENTTREE$.get();
      Object old$Evaluationtree$000 = Stella.$EVALUATIONTREE$.get();

      try {
        Native.setSpecial(Stella.$EVALUATIONPARENTTREE$, ((Stella_Object)(Stella.$EVALUATIONTREE$.get())));
        Native.setSpecial(Stella.$EVALUATIONTREE$, sourcetree);
        { Surrogate sourcebasetype = StandardObject.typeSpecToBaseType(sourcetype);
          Surrogate targetbasetype = StandardObject.typeSpecToBaseType(targettype);

          if (tree == Stella.SYM_STELLA_NULL) {
            { GeneralizedSymbol testValue000 = ((GeneralizedSymbol)(targettype));

              if (testValue000 == Stella.SGT_STELLA_INTEGER) {
                { Stella_Object _return_temp = Stella.NULL_INTEGER_WRAPPER;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
              else if (testValue000 == Stella.SGT_STELLA_LONG_INTEGER) {
                { Stella_Object _return_temp = Stella.NULL_LONG_INTEGER_WRAPPER;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
              else if (testValue000 == Stella.SGT_STELLA_FLOAT) {
                { Stella_Object _return_temp = Stella.NULL_FLOAT_WRAPPER;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
              else if (testValue000 == Stella.SGT_STELLA_STRING) {
                { Stella_Object _return_temp = Stella.NULL_STRING_WRAPPER;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
              else if (testValue000 == Stella.SGT_STELLA_BOOLEAN) {
                { Stella_Object _return_temp = Stella.FALSE_WRAPPER;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
              else {
                { Stella_Object _return_temp = null;

                  MV_returnarray[0] = targettype;
                  return (_return_temp);
                }
              }
            }
          }
          if ((targettype == Stella.SGT_STELLA_BOOLEAN) &&
              (!evaluateP)) {
            if (tree == Stella.SYM_STELLA_TRUE) {
              { Stella_Object _return_temp = Stella.TRUE_WRAPPER;

                MV_returnarray[0] = targettype;
                return (_return_temp);
              }
            }
            if (tree == Stella.SYM_STELLA_FALSE) {
              { Stella_Object _return_temp = Stella.FALSE_WRAPPER;

                MV_returnarray[0] = targettype;
                return (_return_temp);
              }
            }
          }
          if (Surrogate.subtypeOfP(sourcebasetype, targetbasetype)) {
            { Stella_Object _return_temp = tree;

              MV_returnarray[0] = sourcetype;
              return (_return_temp);
            }
          }
          if (((!evaluateP) ||
              Stella_Object.isaP(tree, Stella.SGT_STELLA_WRAPPER)) &&
              (Surrogate.subtypeOfP(sourcebasetype, Stella.SGT_STELLA_LITERAL) &&
               Surrogate.subtypeOfP(sourcebasetype.typeToWrappedType(), targetbasetype))) {
            { Stella_Object _return_temp = tree;

              MV_returnarray[0] = sourcebasetype.typeToWrappedType();
              return (_return_temp);
            }
          }
          if (Surrogate.subtypeOfP(targetbasetype, Stella.SGT_STELLA_LITERAL) &&
              Surrogate.subtypeOfP(sourcebasetype, targetbasetype.typeToWrappedType())) {
            { Stella_Object _return_temp = tree;

              MV_returnarray[0] = targettype;
              return (_return_temp);
            }
          }
          if (StandardObject.voidP(sourcetype)) {
            { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print("While evaluating '" + ((Stella_Object)(Stella.$EVALUATIONTREE$.get())));
              if (((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())) != null) {
                {
                  stream000.nativeStream.println();
                  stream000.nativeStream.print("' inside '" + ((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())));
                }
;
              }
              stream000.nativeStream.println("':");
              stream000.nativeStream.print("`" + sourcetree + "' does not return a value");
              throw ((EvaluationException)(EvaluationException.newEvaluationException(stream000.theStringReader()).fillInStackTrace()));
            }
          }
          else {
            { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

              stream001.nativeStream.print("While evaluating '" + ((Stella_Object)(Stella.$EVALUATIONTREE$.get())));
              if (((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())) != null) {
                {
                  stream001.nativeStream.println();
                  stream001.nativeStream.print("' inside '" + ((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())));
                }
;
              }
              stream001.nativeStream.println("':");
              stream001.nativeStream.print("Type conflict: `" + StandardObject.yieldTypeSpecTree(sourcetype) + "' found where `" + StandardObject.yieldTypeSpecTree(targettype) + "' expected");
              throw ((EvaluationException)(EvaluationException.newEvaluationException(stream001.theStringReader()).fillInStackTrace()));
            }
          }
        }

      } finally {
        Stella.$EVALUATIONTREE$.set(old$Evaluationtree$000);
        Stella.$EVALUATIONPARENTTREE$.set(old$Evaluationparenttree$000);
      }
    }
  }