//
// PauseLayer::onChangeStartpos from 0x7d4814 to 0x7d49c4 (432 bytes)
//
// 7 xrefs:
// > PauseLayer::startPosSelected @ 0x7d49d0
// > PauseLayer::createStartPosPopupClosed @ 0x7d4a64
// > PauseLayer::customSetup @ 0x7d8dc4
// > ??> @ 0xc53e0
// > PauseLayer::customSetup @ 0x7d8b90
// > PauseLayer::customSetup @ 0x7d8c58
// > ??> @ 0x1545c50
//
// 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::onChangeStartpos(cocos2d::CCArray **this, cocos2d::CCObject *a2)
{
int v3; // w21
int v4; // w0
int v5; // w1
StartPosObject *v7; // x0
__int64 v8; // x22
void (__fastcall *v9)(__int64, __int64); // x23
char *v10; // x2
cocos2d::CCString *v11; // x0
__int64 CString; // x0
char *v13; // [xsp+48h] [xbp+48h]
__int64 v14[2]; // [xsp+50h] [xbp+50h] BYREF
void *v15; // [xsp+60h] [xbp+60h]
if ( !a2 )
{
v4 = cocos2d::CCArray::count(*(this + 76));
v5 = *((_DWORD *)this + 150);
goto LABEL_5;
}
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = cocos2d::CCArray::count(*(this + 76));
v5 = *((_DWORD *)this + 150);
if ( v3 != -1 )
{
if ( v3 == 1 )
*((_DWORD *)this + 150) = ++v5;
LABEL_5:
if ( (v5 & 0x80000000) == 0 )
goto LABEL_6;
LABEL_11:
*((_DWORD *)this + 150) = v4;
v5 = v4;
goto LABEL_12;
}
*((_DWORD *)this + 150) = --v5;
if ( v5 < 0 )
goto LABEL_11;
LABEL_6:
if ( v4 < v5 )
{
*((_DWORD *)this + 150) = 0;
LABEL_8:
(*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)*(this + 74) + 928LL))(*(this + 74), "None");
goto LABEL_9;
}
LABEL_12:
if ( !v5 )
goto LABEL_8;
v7 = (StartPosObject *)cocos2d::CCArray::objectAtIndex(*(this + 76), v5 - 1);
if ( v7 )
{
v8 = (__int64)*(this + 74);
v13 = (char *)*((unsigned int *)this + 150);
v9 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 928LL);
StartPosObject::getDisplayName(v14, v7);
v10 = (char *)v14 + 1;
if ( (v14[0] & 1) != 0 )
v10 = (char *)v15;
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i: %s", v13, v10);
CString = cocos2d::CCString::getCString(v11);
v9(v8, CString);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
}
else
{
(*(void (__fastcall **)(_QWORD, char *))(*(_QWORD *)*(this + 74) + 928LL))(*(this + 74), &byte_1191DE0);
}
LABEL_9:
cocos2d::CCLabelBMFont::limitLabelWidth(*(this + 74), 150.0, 0.5, 0.0);
*((_BYTE *)this + 616) = 1;
return _stack_chk_guard;
}