//
// sub_140077240 from 0x140077240 to 0x14007731a (218 bytes)
//
// 8 xrefs:
// > GManager::waitForSave @ 0x1400777d6
// > GManager::waitForSave @ 0x140077810
// > sub_1400779D0 @ 0x1400779e2
// > sub_1400779D0 @ 0x140077a1c
// > sub_1400779D0 @ 0x140077a84
// > LevelEditorLayer::waitForAutoSave @ 0x140409d3e
// > LevelEditorLayer::waitForAutoSave @ 0x140409d84
// > ??> @ 0x140911b7c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:25:51 +0000
//
_QWORD *__fastcall sub_140077240(_QWORD *a1)
{
__int64 perf_frequency; // rdi
__int64 perf_counter; // rax
perf_frequency = Query_perf_frequency();
perf_counter = Query_perf_counter();
if ( perf_frequency == 10000000 )
{
*a1 = 100 * perf_counter;
return a1;
}
else
{
if ( perf_frequency == 24000000 )
*a1 = 1000000000 * (perf_counter / 24000000) + 1000000000 * (perf_counter % 24000000) / 24000000;
else
*a1 = 1000000000 * (perf_counter / perf_frequency) + 1000000000 * (perf_counter % perf_frequency) / perf_frequency;
return a1;
}
}