//
// DialogLayer::addToMainScene from 0xa705fc to 0xa70654 (88 bytes)
//
// 9 xrefs:
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x903e2c
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0xa2b680
// > DailyLevelPage::dailyStatusFailed @ 0xa6d474
// > SecretRewardsLayer::showLockedChest @ 0xb9e4dc
// > SecretRewardsLayer::onGoldChest @ 0xb9eb44
// > SecretRewardsLayer::onSelectItem @ 0xb9ee18
// > LevelListLayer::onClaimReward @ 0xbac080
// > GameSettingsLayer::showPracticeMusicSyncUnlockInfo @ 0xc06a5c
// > ??> @ 0x7ab00
//
// 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:00:23 +0000
//
__int64 __fastcall DialogLayer::addToMainScene(DialogLayer *this)
{
cocos2d::CCScene *v2; // x19
int HighestChildZ; // w0
__int64 v4; // x2
v2 = *(cocos2d::CCScene **)(cocos2d::CCDirector::sharedDirector(this) + 272);
HighestChildZ = cocos2d::CCScene::getHighestChildZ(v2);
v4 = 1000;
if ( HighestChildZ > 999 )
v4 = (unsigned int)cocos2d::CCScene::getHighestChildZ(v2) + 1;
return (*(__int64 (__fastcall **)(cocos2d::CCScene *, DialogLayer *, __int64))(*(_QWORD *)v2 + 464LL))(v2, this, v4);
}