int __cdecl main(int argc, const char **argv, const char **envp)
{
__int64 perf_frequency; // kr08_8
__int64 v4; // kr10_8
__int64 v5; // kr18_8
__int64 v6; // rax
unsigned int v7; // esi
__int64 v8; // rax
int v9; // edi
unsigned __int64 v10; // rcx
__int64 perf_counter; // [esp-14h] [ebp-5Ch]
__int64 v13; // [esp-14h] [ebp-5Ch]
unsigned int v14; // [esp+10h] [ebp-38h]
__int64 v15; // [esp+18h] [ebp-30h]
xtime v16; // [esp+30h] [ebp-18h] BYREF
perf_frequency = __Query_perf_frequency();
perf_counter = __Query_perf_counter();
v4 = 1000000000 * (perf_counter / perf_frequency) + 1000000000 * (perf_counter % perf_frequency) / perf_frequency;
if ( v4 == 0x7FFFFFFFFF67697Fi64 || HIDWORD(v4) == 0x7FFFFFFF && (unsigned int)v4 >= 0xFF67697F )
v15 = 0x7FFFFFFFFFFFFFFFi64;
else
v15 = v4 + 10000000;
while ( 1 )
{
v5 = __Query_perf_frequency();
v13 = __Query_perf_counter();
v6 = 1000000000i64 * (unsigned int)(v13 / v5);
v14 = v6 + 1000000000 * (v13 % v5) / v5;
v7 = (__PAIR64__(HIDWORD(v6) + 1000000000 * ((unsigned __int64)(v13 / v5) >> 32), v6) + 1000000000 * (v13 % v5) / v5) >> 32;
if ( v15 == __PAIR64__(HIDWORD(v6) + 1000000000 * ((unsigned __int64)(v13 / v5) >> 32), v6)
+ 1000000000 * (v13 % v5) / v5
|| v15 < __SPAIR64__(v7, v14) )
{
break;
}
v8 = 100 * __Xtime_get_ticks();
v10 = v15 - __PAIR64__(v7, v14);
v9 = v15 - v14;
if ( (double)(__int64)(v15 - __PAIR64__(v7, v14)) > 8.64e14 )
{
v9 = -1391067136;
HIDWORD(v10) = 201165;
}
v16.sec = (__int64)(__PAIR64__(HIDWORD(v10), v9) + v8) / 1000000000;
v16.nsec = (__int64)(__PAIR64__(HIDWORD(v10), v9) + v8) % 1000000000;
__Thrd_sleep(&v16);
}
return 0;
}