//
// GJBaseGameLayer::applyTimeWarp from 0x100299554 to 0x100299618 (196 bytes)
//
// 3 xrefs:
// > ??> @ 0x1008df9d0
// > ??> @ 0x100919058
// > ??> @ 0x10094c580
//
// This function is hookable on this platform (idp: arm, 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:02:07 +0000
//
__int64 __fastcall GJBaseGameLayer::applyTimeWarp(__int64 a1, float a2)
{
float v2; // s8
float v4; // s0
float v5; // s0
__int64 v6; // x0
__int64 result; // x0
__int64 v8; // x0
float v9; // s8
_QWORD *v10; // x0
v2 = a2;
*(float *)(a1 + 824) = a2;
v4 = *(float *)(a1 + 13112);
if ( fabsf(v4 + -1.0) >= 0.01 )
{
v5 = v4 * v2;
if ( !*(_BYTE *)(a1 + 1982) )
v2 = v5;
}
v6 = cocos2d::CCDirector::sharedDirector();
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 128LL))(v6);
if ( *(float *)(result + 56) != v2 && *(_BYTE *)(a1 + 12664) == 1 )
{
v8 = cocos2d::CCDirector::sharedDirector();
*(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 128LL))(v8) + 56) = v2;
v9 = 1.0;
if ( (*(_BYTE *)(a1 + 1982) & 1) == 0 )
v9 = *(float *)(a1 + 13116);
v10 = (_QWORD *)FMODAudioEngine::sharedEngine();
return sub_1001B8114(v10, v9);
}
return result;
}