ST_STORE::StDmRegionEvict

__int64 __fastcall ST_STORE::StDmRegionEvict(__int64 a1, __int64 a2, unsigned int a3, __int64 a4, int a5){
  __int64 v5; 
  __int64 v7; 
  __int64 v8; 
  UINT64 *v9; 
  __int64 v10; 
  UINT16 v11; 
  __int64 v12; 
  void *v13; 
  int Keys; 
  __int64 v15; 
  int v16; 
  int *v17; 
  int v18; 
  int *v19; 
  int v20; 
  int Base[240]; 
  INT64 v23; 
  UINT16 SpaceUsed; 
  UINT16 RegionLAT; 
  size_t NumOfElements; 
  __int64 v27; 
  __int128 v28; 
  __int128 v29; 
  v5 = a3;
  v28 = 0i64;
  v27 = a2;
  LODWORD(v28) = 1;
  v29 = 0i64;
  LODWORD(v29) = _mm_cvtsi128_si32((__m128i)0i64) | 1;
  v9 = SmEtwEnabled(0i64);
  if( v9 )
  {
    v10 = *(_QWORD *)(a1 + 1048);
    if( v10 )
      v11 = *(unsigned __int8 *)(v10 + v5);
    else
      v11 = 0;
    v12 = *(_QWORD *)(a1 + 1032);
    RegionLAT = v11;
    SpaceUsed = *(_WORD *)(v12 + 2 * v5) & 0x1FFF;
    LODWORD(v23) = 0;
    SmEtwLogRegionOp(v9, 3ui64, a1, (unsigned int)v5, v23, SpaceUsed, v11);
    v7 = v27;
  }
  v13 = alloca(1024i64);
  do
  {
    LODWORD(NumOfElements) = 256;
    Keys = ST_STORE::StDmRegionGetKeys(a1, v7, v5, v8, a5, Base, &NumOfElements);
    if( Keys < 0 || !(_DWORD)NumOfElements )
      break;
    v15 = (unsigned int)NumOfElements;
    qsort((WCHAR *)Base, (unsigned int)NumOfElements, (const WCHAR *)4, ST_STORE::StpKeyCompare);
    v16 = Base[0];
    v17 = &Base[v15];
    DWORD2(v28) = 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(v28) = v20;
      Keys = ST_STORE::StDmPageRemove(a1, (__int64)&v28);
      if( Keys < 0 )
        return(unsigned int)Keys;
      v16 = *v19;
      v20 = 0;
      DWORD2(v28) = *v19;
    }
    v7 = v27;
  }
  while( (unsigned int)NumOfElements >= 0x100 );
  return(unsigned int)Keys;
}

Referenced by:

No references.