RtlpHpVsFreeChunkRemove

NTSTATUS __stdcall RtlpHpVsFreeChunkRemove(INT64 a1, INT64 a2, INT64 a3){
  NTSTATUS v6; 
  __int64 v7; 
  UINT64 v9; 
  UINT64 v10; 

  LODWORD(v9) = 0;
  RtlRbRemoveNode((UINT64 *)(a1 + 16), a3 + 8);
  v6 = RtlpHpVsChunkComputeCost(a3, a2, &v9, &v10);
  v7 = (unsigned int)v9 + v6 - (unsigned __int16)(a3 ^ RtlpHpHeapGlobals ^ *(_WORD *)a3);
  *(_QWORD *)(a1 + 56) -= v7;
  return v7;
}

Referenced by:

RtlpHpVsChunkCoalesce
RtlpHpVsChunkSplit