//
// std::__ndk1::this_thread::sleep_for from 0x97e99c to 0x97ea2e (146 bytes)
//
// 2 xrefs:
// > GManager::waitForSave @ 0x3d3fee
// > LevelEditorLayer::waitForAutoSave @ 0x463960
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:05 +0000
//
int __fastcall std::this_thread::sleep_for(__int64 *a1)
{
__int64 v1; // r4
int v2; // r0
int v3; // r1
_DWORD v5[3]; // [sp+4h] [bp-14h] BYREF
v1 = *a1;
if ( *a1 >= 1 )
{
v2 = v1 / 0x3B9ACA00uLL;
if ( v1 < 2147483647000000000LL )
{
v3 = v1 % 0x3B9ACA00uLL;
}
else
{
v3 = 999999999;
v2 = 0x7FFFFFFF;
}
v5[0] = v2;
v5[1] = v3;
while ( nanosleep((const struct timespec *)v5, (struct timespec *)v5) == -1 && *(_DWORD *)_errno() == 4 )
;
}
return _stack_chk_guard - v5[2];
}