ST_STORE::StCompactionPickPriority
__int64 __fastcall ST_STORE::StCompactionPickPriority(
__int64 a1,
unsigned __int16 **a2,
unsigned int a3,
void *a4){
unsigned __int64 v4;
unsigned __int64 v8;
int v9;
unsigned int v10;
__int64 v11;
__int64 v12;
__int64 v13;
int v14;
char *v15;
unsigned int v16;
int i;
unsigned int v18;
unsigned int v19;
unsigned __int16 *v21;
INT64 result[35];
char v23;
v4 = a3;
memset((INT64)result, 0i64);
v8 = 0i64;
if( a2 > &a2[v4] )
v4 = 0i64;
if( v4 )
{
v9 = (unsigned __int8)*(_DWORD *)(a1 + 776);
do
{
if( v9 )
v10 = 0;
else
v10 = **a2 >> 13;
v11 = v10;
v12 = 5i64 * v10;
v13 = LODWORD(result[v12]);
if( (unsigned int)v13 < 4 )
{
v21 = *a2;
LODWORD(result[v12]) = v13 + 1;
HIDWORD(result[v12]) += *v21 & 0x1FFF;
result[5 * v11 + 1 + v13] = (INT64)v21;
}
++a2;
++v8;
}
while( v8 < v4 );
}
v14 = -1;
v15 = &v23;
v16 = 0;
for( i = 7; i >= 0; --i )
{
v18 = *((_DWORD *)v15 - 1);
if( v18 > 1 && v16 < v18 * *(_DWORD *)(a1 + 816) - *(_DWORD *)v15 )
{
v16 = v18 * *(_DWORD *)(a1 + 816) - *(_DWORD *)v15;
v14 = i;
}
v15 -= 40;
}
v19 = result[5 * v14];
if( v19 > 4 )
v19 = 4;
memmove((UINT8 *)a4, (UINT8 *)&result[5 * v14 + 1], 8i64 * v19);
return v19;
}
Referenced by:
No references.