public static void registerAuxiliaryMethod(MethodSlot method, Slot reason) {
    if (method != null) {
      { Stella_Class renamed_Class = ((Stella_Class)(method.slotOwner.surrogateValue));
        List auxiliarymethods = null;

        if (renamed_Class != null) {
          auxiliarymethods = renamed_Class.classAuxiliaryMethods();
          if (List.nullListP(auxiliarymethods)) {
            auxiliarymethods = ((List)(KeyValueList.setDynamicSlotValue(renamed_Class.dynamicSlots, Stella.SYM_STELLA_CLASS_AUXILIARY_METHODS, List.newList(), null)));
          }
          MethodSlot.finalizeAuxiliaryMethod(method);
          { MethodSlot value000 = null;

            { MethodSlot aux = null;
              Cons iter000 = auxiliarymethods.theConsList;

              loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                aux = ((MethodSlot)(iter000.value));
                if ((method.slotName == aux.slotName) &&
                    (method.slotOwner == aux.slotOwner)) {
                  value000 = aux;
                  break loop000;
                }
              }
            }
            auxiliarymethods.remove(value000);
          }
          auxiliarymethods.insert(method);
          KeyValueList.setDynamicSlotValue(method.dynamicSlots, Stella.SYM_STELLA_AUXILIARY_METHOD_REASON, reason, null);
        }
      }
    }
  }