//
// cocos2d::CCDirector::checkSceneReference from 0xd49980 to 0xd499c8 (72 bytes)
//
// 6 xrefs:
// > cocos2d::CCDirector::replaceScene @ 0xd49a38
// > cocos2d::CCDirector::replaceScene @ 0xd49a94
// > cocos2d::CCDirector::popScene @ 0xd49b3c
// > cocos2d::CCDirector::popSceneWithTransition @ 0xd49bcc
// > cocos2d::CCDirector::popToSceneStackLevel @ 0xd49cd4
// > ??> @ 0x9ba10
//
// 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 13:07:37 +0000
//
__int64 __fastcall cocos2d::CCDirector::checkSceneReference(__int64 this)
{
__int64 v1; // x19
if ( *(_QWORD *)(this + 96) )
{
v1 = this;
this = cocos2d::CCArray::lastObject(*(cocos2d::CCArray **)(this + 296));
if ( *(_QWORD *)(v1 + 96) == this )
*(_QWORD *)(v1 + 96) = 0;
}
return this;
}