public static int countCaseTestClauses(Cons tree, Object [] MV_returnarray) {
    { Cons clauses = ((Cons)(tree.rest.rest));
      int nofclauses = 0;
      boolean otherwiseP = false;

      { Cons clause = null;
        Cons iter000 = clauses;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          clause = ((Cons)(iter000.value));
          if (Stella_Object.safePrimaryType(clause.value) == Stella.SGT_STELLA_CONS) {
            nofclauses = nofclauses + ((Cons)(clause.value)).length();
          }
          else {
            if (clause.value == Stella.SYM_STELLA_OTHERWISE) {
              otherwiseP = true;
            }
            else {
              nofclauses = nofclauses + 1;
            }
          }
        }
      }
      { int _return_temp = nofclauses;

        MV_returnarray[0] = BooleanWrapper.wrapBoolean(otherwiseP);
        return (_return_temp);
      }
    }
  }