NTSTATUS __stdcall RtlpHpLfhSubsegmentSetOwner(INT64 a1, INT64 a2){
NTSTATUS result;
unsigned __int64 v3;
result = *(unsigned __int16 *)(a1 + 34);
if( *(_WORD *)(a1 + 32) == (_WORD)result )
{
*(_QWORD *)(a1 + 16) = a2;
}
else
{
v3 = _InterlockedExchange64((volatile __int64 *)(a1 + 16), a2);
if( (v3 & 1) != 0 )
_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 32), v3 >> 1);
}
return result;
}