public static void popControlFrame(ControlFrame frame) {
    if ((frame.state == Logic.KWD_PATTERN) ||
        (frame.state == Logic.KWD_CONTAINED_BY)) {
      ControlFrame.resetCurrentPatternRecord(frame, Logic.KWD_PARENT);
    }
    if (((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_CACHED_BINDINGS_ITERATOR, null))) != null) {
      ((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_CACHED_BINDINGS_ITERATOR, null))).free();
      KeyValueList.setDynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_CACHED_BINDINGS_ITERATOR, null, null);
    }
    frame.choicePointUnbindingOffset = Stella.NULL_INTEGER;
    frame.free();
    frame.state = Logic.KWD_POPPED;
  }