ST_STORE::StDmRegionEvict

__int64 __fastcall ST_STORE::StDmRegionEvict(
        UINT64 CompressedSize,
        __int64 a2,
        unsigned int a3,
        __int64 a4,
        int a5){
  __int64 v5; 
  __int64 v7; 
  __int64 v8; 
  VOID *v9; 
  __int64 v10; 
  UINT16 v11; 
  __int64 v12; 
  void *v13; 
  int Keys; 
  __int64 v15; 
  int v16; 
  int *v17; 
  int v18; 
  int *v19; 
  int v20; 
  INT64 *v22; 
  UINT64 v23; 
  UINT64 v24; 
  int Base[240]; 
  INT64 v26; 
  UINT16 SpaceUsed; 
  UINT16 RegionLAT; 
  size_t NumOfElements; 
  __int64 v30; 
  __int128 v31; 
  __int128 v32; 

  v5 = a3;
  v31 = 0i64;
  v30 = a2;
  LODWORD(v31) = 1;
  v32 = 0i64;
  LODWORD(v32) = _mm_cvtsi128_si32((__m128i)0i64) | 1;
  v9 = SmEtwEnabled(SmEtwKeywordStoreOps);
  if( v9 )
  {
    v10 = *(_QWORD *)(CompressedSize + 1048);
    if( v10 )
      v11 = *(unsigned __int8 *)(v10 + v5);
    else
      v11 = 0;
    v12 = *(_QWORD *)(CompressedSize + 1032);
    RegionLAT = v11;
    SpaceUsed = *(_WORD *)(v12 + 2 * v5) & 0x1FFF;
    LODWORD(v26) = 0;
    SmEtwLogRegionOp(v9, 3ui64, CompressedSize, (unsigned int)v5, v26, SpaceUsed, v11);
    v7 = v30;
  }
  v13 = alloca(1024i64);
  do
  {
    NumOfElements = 256;
    Keys = ST_STORE::StDmRegionGetKeys(CompressedSize, v7, v5, v8, a5, Base, &NumOfElements);
    if( Keys < 0 || !NumOfElements )
      break;
    v15 = NumOfElements;
    qsort((UINT64)Base, NumOfElements, 4ui64, (INT64)ST_STORE::StpKeyCompare, v22, v23, v24);
    v16 = Base[0];
    v17 = &Base[v15];
    DWORD2(v31) = Base[0];
    v18 = Base[0];
    v19 = Base;
    v20 = 0;
LABEL_10:
    if( v16 != v18 )
      goto LABEL_13;
    while( 1 )
    {
      ++v20;
      if( ++v19 < v17 )
      {
        v18 = *v19;
        ++v16;
        goto LABEL_10;
      }
      if( v19 != v17 )
        break;
LABEL_13:
      HIDWORD(v31) = v20;
      Keys = ST_STORE::StDmPageRemove(CompressedSize, (__int64)&v31);
      if( Keys < 0 )
        return(unsigned int)Keys;
      v16 = *v19;
      v20 = 0;
      DWORD2(v31) = *v19;
    }
    v7 = v30;
  }
  while( NumOfElements >= 0x100 );
  return(unsigned int)Keys;
}

Referenced by:

No references.