//
// cocos2d::CCDirector::setScheduler from 0x1004793d0 to 0x10047940a (58 bytes)
//
// 2 xrefs:
// > ??> @ 0x100b473d8
// > ??> @ 0x100b47508
//
// 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 12:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::setScheduler(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 result; // rax
v3 = *(_QWORD *)(a1 + 104);
if ( v3 != a2 )
{
if ( a2 )
{
result = cocos2d::CCObject::retain(a2);
v3 = *(_QWORD *)(a1 + 104);
}
if ( v3 )
result = cocos2d::CCObject::release(v3);
*(_QWORD *)(a1 + 104) = a2;
}
return result;
}