CmpUpdateSystemHiveHysteresis

VOID __fastcall CmpUpdateSystemHiveHysteresis(INT64 a1, UINT64 a2, UINT64 a3){
  unsigned int v3; 
  if( a1 == Hive && CmpSystemHiveHysteresisCallback )
  {
    v3 = 100 * ((int)a2 + 4096) / (unsigned int)CmSystemHiveLimitSize;
    if( (unsigned int)a2 <= (unsigned int)a3 )
    {
      if( !CmpSystemHiveHysteresisLowSeen && v3 < CmpSystemHiveHysteresisLow )
      {
        CmpSystemHiveHysteresisLowSeen = 1;
        if( CmpSystemHiveHysteresisHighSeen == 1 )
        {
          if( CmpDoQueueSystemHiveHysteresis(v3) != 1 )
            goto LABEL_9;
LABEL_14:
          CmpSystemHiveHysteresisHighSeen = 0;
        }
      }
    }
    else if( v3 > CmpSystemHiveHysteresisHigh && !CmpSystemHiveHysteresisHighSeen )
    {
      CmpSystemHiveHysteresisHighSeen = 1;
      if( CmpSystemHiveHysteresisLowSeen == 1 )
      {
        if( CmpDoQueueSystemHiveHysteresis(v3) == 1 )
        {
LABEL_9:
          CmpSystemHiveHysteresisLowSeen = 0;
          return;
        }
        goto LABEL_14;
      }
    }
  }
}

Referenced by:

HvFreeHivePartial
HvpAddBin