//
// sub_100015908 from 0x100015908 to 0x100015994 (140 bytes)
//
// 5 xrefs:
// > GJEffectManager::getPersistentStateString @ 0x1000155a0
// > GJEffectManager::getPersistentStateString @ 0x1000156c0
// > GJEffectManager::updateTimers @ 0x100015fbc
// > cocos2d::CCAnimate::initWithAnimation @ 0x10018d350
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x1001fc234
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall sub_100015908(__int64 a1, unsigned __int64 a2)
{
__int64 v3; // x20
__int64 v4; // x0
__int64 v5; // x21
__int64 v6; // x1
__int64 v7; // x22
size_t v8; // x2
void *v9; // x20
void *v10; // x0
if ( a2 > (__int64)(*(_QWORD *)(a1 + 16) - *(_QWORD *)a1) >> 2 )
{
if ( a2 >> 62 )
sub_10000A5F8();
v3 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
v4 = sub_1000179E8(a1, a2);
v5 = v4 + v3;
v7 = v4 + 4 * v6;
v8 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
v9 = (void *)(v4 + v3 - v8);
memcpy(v9, *(const void **)a1, v8);
v10 = *(void **)a1;
*(_QWORD *)a1 = v9;
*(_QWORD *)(a1 + 8) = v5;
*(_QWORD *)(a1 + 16) = v7;
if ( v10 )
operator delete(v10);
}
}