public static int debugFrameId(ControlFrame frame) {
    { int id = ((IntegerWrapper)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_DEBUG_FRAME_ID_INTERNAL, Stella.NULL_INTEGER_WRAPPER))).wrapperValue;

      if (id == Stella.NULL_INTEGER) {
        Logic.$CONTROL_FRAME_ID_COUNTER$ = Logic.$CONTROL_FRAME_ID_COUNTER$ + 1;
        id = Logic.$CONTROL_FRAME_ID_COUNTER$;
        KeyValueList.setDynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_DEBUG_FRAME_ID_INTERNAL, IntegerWrapper.wrapInteger(id), Stella.NULL_INTEGER_WRAPPER);
      }
      return (id);
    }
  }