//
// PauseLayer::createStartPosPopupClosed from 0x7d49dc to 0x7d4aa8 (204 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'PauseLayer::createStartPosPopupClosed @ 0x7d4aac
// > ??> @ 0xb4d60
// > ??> @ 0x14380f0
//
// 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 12:54:20 +0000
//
__int64 __fastcall PauseLayer::createStartPosPopupClosed(__int64 a1)
{
int v2; // w20
GameManager *v3; // x0
cocos2d::CCObject *v4; // x20
__int64 v5; // x0
cocos2d::CCObject *v6; // x0
int v7; // w0
char v8; // w20
__int64 result; // x0
__int64 v10; // x0
cocos2d::CCObject *StartPosObjectsForCurrentMode; // x0
v2 = *(_DWORD *)(a1 + 600);
v3 = *(GameManager **)(a1 + 608);
if ( v2 > 0 )
{
if ( !v3 )
{
LABEL_11:
v10 = GameManager::sharedState(v3);
StartPosObjectsForCurrentMode = (cocos2d::CCObject *)GJBaseGameLayer::getStartPosObjectsForCurrentMode(*(GJBaseGameLayer **)(v10 + 544));
*(_QWORD *)(a1 + 608) = StartPosObjectsForCurrentMode;
cocos2d::CCObject::retain(StartPosObjectsForCurrentMode);
v7 = 0;
goto LABEL_8;
}
if ( v2 <= (unsigned int)cocos2d::CCArray::count(v3) )
{
v4 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(
*(cocos2d::CCArray **)(a1 + 608),
*(_DWORD *)(a1 + 600) - 1);
v3 = *(GameManager **)(a1 + 608);
if ( !v3 )
goto LABEL_6;
goto LABEL_5;
}
v3 = *(GameManager **)(a1 + 608);
}
v4 = nullptr;
if ( !v3 )
goto LABEL_11;
LABEL_5:
v3 = (GameManager *)cocos2d::CCObject::release(v3);
LABEL_6:
v5 = GameManager::sharedState(v3);
v6 = (cocos2d::CCObject *)GJBaseGameLayer::getStartPosObjectsForCurrentMode(*(GJBaseGameLayer **)(v5 + 544));
*(_QWORD *)(a1 + 608) = v6;
cocos2d::CCObject::retain(v6);
if ( v4 )
v7 = cocos2d::CCArray::indexOfObject(*(cocos2d::CCArray **)(a1 + 608), v4) + 1;
else
v7 = 0;
LABEL_8:
*(_DWORD *)(a1 + 600) = v7;
v8 = *(_BYTE *)(a1 + 616);
result = PauseLayer::onChangeStartpos((cocos2d::CCArray **)a1, nullptr);
*(_BYTE *)(a1 + 616) = v8;
return result;
}