RtlpHpVsFreeChunkRemove

INT64 __fastcall RtlpHpVsFreeChunkRemove(INT64 a1, INT64 a2, INT64 a3){
  int v6; 
  INT64 result; 
  UINT64 v8; 
  UINT64 v9; 
  LODWORD(v8) = 0;
  RtlRbRemoveNode((unsigned __int64 *)(a1 + 16), a3 + 8);
  v6 = RtlpHpVsChunkComputeCost(a3, a2, &v8, &v9);
  result = (unsigned int)v8 + v6 - (unsigned __int16)(a3 ^ RtlpHpHeapGlobals ^ *(_WORD *)a3);
  *(_QWORD *)(a1 + 56) -= result;
  return result;
}

Referenced by:

RtlpHpVsChunkCoalesce
RtlpHpVsChunkSplit