//
// cocos2d::CCPointArray::addControlPoint from 0xd275a4 to 0xd27648 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0x9b7e8
//
// 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:07:15 +0000
//
__int64 __fastcall cocos2d::CCPointArray::addControlPoint(__int64 a1, float *a2)
{
__int64 v2; // x20
cocos2d::CCPoint *v3; // x21
cocos2d::CCPoint **v4; // x0
cocos2d::CCPoint *v7; // [xsp+40h] [xbp+40h] BYREF
v2 = *(_QWORD *)(a1 + 56);
v3 = (cocos2d::CCPoint *)operator new(8u);
cocos2d::CCPoint::CCPoint(v3, *a2, a2[1]);
v7 = v3;
v4 = *(cocos2d::CCPoint ***)(v2 + 8);
if ( (unsigned __int64)v4 >= *(_QWORD *)(v2 + 16) )
{
std::vector::__push_back_slow_path((void **)v2, &v7);
}
else
{
if ( v4 )
{
*v4 = v3;
v4 = *(cocos2d::CCPoint ***)(v2 + 8);
}
*(_QWORD *)(v2 + 8) = v4 + 1;
}
return _stack_chk_guard;
}