int __cdecl EndPerformanceMeasurement(int a1, unsigned __int64 a2)
{
unsigned __int64 v2; // kr00_8
unsigned int *v3; // ebx
unsigned int v4; // eax
int v6; // [esp+Ch] [ebp-4h] BYREF
v2 = a2; /*0xffd7fc54*/
if ( !a2 ) /*0xffd7fc59*/
v2 = __rdtsc(); /*0xffd7fc5f*/
GetPerformanceLogBuffer((int *)&a2 + 1, &v6); /*0xffd7fc67*/
v3 = (unsigned int *)HIDWORD(a2); /*0xffd7fc6c*/
v4 = sub_FFD7FB51((unsigned int *)HIDWORD(a2)); /*0xffd7fc74*/
if ( v4 >= *v3 ) /*0xffd7fc7e*/
return -2147483634; /*0xffd7fc80*/
*(_QWORD *)&v3[10 * v4 + 10] = v2; /*0xffd7fc8b*/
return 0; /*0xffd7fc94*/
}