RtlpHpLfhBucketComputeNewSubsegmentBlockCount

NTSTATUS __stdcall RtlpHpLfhBucketComputeNewSubsegmentBlockCount(INT64 a1, INT64 a2){
  __int16 v3; 
  unsigned int v4; 
  unsigned int v5; 
  unsigned int v6; 
  bool v7; 
  char v8; 
  char v9; 
  unsigned int v10; 

  v3 = word_140010F30[*(unsigned __int8 *)(a1 + 1)];
  v4 = *(unsigned __int8 *)(a1 + 2);
  v5 = *(_DWORD *)(a1 + 56);
  if( !(_DWORD)a2 )
    v5 = (v5 >> 3) / v4;
  v6 = v5;
  if( v5 == 0xFFFFFFFFi64 )
    v6 = -1;
  v7 = v4 > 1;
  v8 = (v4 > 1) - 1;
  if( (unsigned __int16)v3 >= 0x100u )
    v8 = v7;
  v9 = v8 - 1;
  if( !*(_QWORD *)(a1 + 64) )
    v9 = v8;
  v10 = 1 << (3 - v9);
  if( v6 >= v10 )
    v10 = v6;
  if( v10 < 4 )
    v10 = 4;
  if( v10 > 0x400 )
    return 1024;
  return v10;
}

Referenced by:

RtlpHpLfhSubsegmentCreate