RtlLongLongAdd

NTSTATUS __stdcall RtlLongLongAdd(UINT64 a1, UINT64 a2, UINT64 *a3){
  UINT64 v3; 
  UINT64 v4; 
  NTSTATUS result; 

  v3 = a1 + a2;
  v4 = a1 >> 63;
  if( (_DWORD)v4 != a2 >> 63 || (_DWORD)v4 == v3 >> 63 )
  {
    result = 0;
  }
  else
  {
    result = -1073741675;
    v3 = -1i64;
  }
  *a3 = v3;
  return result;
}

Referenced by:

PopReadPagesFromHiberFile
RtlParseLeapSecondData