//
// DialogLayer::addToMainScene from 0x10009078c to 0x1000907e4 (88 bytes)
//
// 6 xrefs:
// > sub_1001669E8 @ 0x100166bfc
// > DailyLevelPage::dailyStatusFailed @ 0x1002501c8
// > LevelListLayer::onClaimReward @ 0x1002e33c4
// > SecretRewardsLayer::onGoldChest @ 0x100385040
// > SecretRewardsLayer::onSelectItem @ 0x1003867e4
// > sub_10044F9C4 @ 0x10044fb1c
//
// 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 10:58:23 +0000
//
__int64 __fastcall DialogLayer::addToMainScene(__int64 a1)
{
__int64 v2; // x20
__int64 v3; // x2
v2 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(a1) + 272);
if ( (int)cocos2d::CCScene::getHighestChildZ(v2) < 1000 )
v3 = 1000;
else
v3 = (unsigned int)cocos2d::CCScene::getHighestChildZ(v2) + 1;
return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v2 + 464LL))(v2, a1, v3);
}