//
// cocos2d::CCDirector::setNextScene from 0x100206cac to 0x100206dc4 (280 bytes)
//
// 1 xrefs:
// > cocos2d::CCDirector::drawScene @ 0x100206bd0
//
// 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:00:57 +0000
//
__int64 __fastcall cocos2d::CCDirector::setNextScene(__int64 a1)
{
_DWORD *v2; // x20
_BOOL4 v3; // w21
const void *v4; // x0
__int64 v5; // x0
__int64 result; // x0
v2 = *(_DWORD **)(a1 + 272);
if ( v2 )
v3 = __dynamic_cast(
*(const void **)(a1 + 272),
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0) == nullptr;
else
v3 = 1;
v4 = *(const void **)(a1 + 280);
if ( !v4
|| !__dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0) )
{
if ( !v2 )
goto LABEL_12;
(*(void (__fastcall **)(_DWORD *))(*(_QWORD *)v2 + 728LL))(v2);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 272) + 720LL))(*(_QWORD *)(a1 + 272));
v2 = *(_DWORD **)(a1 + 272);
if ( *(_BYTE *)(a1 + 288) == 1 )
{
if ( !v2 )
goto LABEL_12;
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)v2 + 736LL))(*(_QWORD *)(a1 + 272));
v2 = *(_DWORD **)(a1 + 272);
}
}
if ( v2 )
cocos2d::CCObject::release(v2);
LABEL_12:
v5 = *(_QWORD *)(a1 + 280);
*(_QWORD *)(a1 + 272) = v5;
result = cocos2d::CCObject::retain(v5);
*(_QWORD *)(a1 + 280) = 0;
if ( v3 )
{
result = *(_QWORD *)(a1 + 272);
if ( result )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)result + 704LL))(result);
return (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 272) + 712LL))(*(_QWORD *)(a1 + 272));
}
}
return result;
}