//
// SetupCameraEdgePopup::updateTargetID from 0x140413df0 to 0x140413ebd (205 bytes)
//
// 7 xrefs:
// > SetupCameraEdgePopup::onUnlockEdge @ 0x140413c13
// > SetupCameraEdgePopup::onTargetIDArrow @ 0x140413c5a
// > SetupCameraEdgePopup::textChanged @ 0x140413d4b
// > SetupTouchTogglePopup::textChanged @ 0x140464e5b
// > ??> @ 0x14069f8bc
// > ??> @ 0x14069f8cc
// > ??> @ 0x1406d8dbc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Merged with: SetupCameraEdgePopup::updateTargetID, SetupTouchTogglePopup::updateTargetID
int __fastcall SetupCameraEdgePopup::updateTargetID(__int64 a1)
{
int v1; // edx
__int64 v3; // rax
cocos2d::CCArray *v4; // rcx
unsigned int v5; // edi
struct cocos2d::CCObject *v6; // rax
int v7; // ecx
v1 = 0;
if ( *(int *)(a1 + 944) >= 0 )
v1 = *(_DWORD *)(a1 + 944);
v3 = *(_QWORD *)(a1 + 656);
if ( v1 > 9999 )
v1 = 9999;
*(_DWORD *)(a1 + 944) = v1;
if ( v3 )
{
*(_DWORD *)(v3 + 1480) = v1;
}
else
{
v4 = *(cocos2d::CCArray **)(a1 + 664);
if ( v4 )
{
v5 = 0;
for ( LODWORD(v3) = cocos2d::CCArray::count(v4);
v5 < (unsigned int)v3;
LODWORD(v3) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664)) )
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 664), v5);
v7 = *(_DWORD *)(a1 + 944);
if ( v7 < 0 )
v7 = 0;
if ( v7 > 9999 )
v7 = 9999;
++v5;
v6[26].m_uAutoReleaseCount = v7;
}
}
}
return v3;
}