//
// cocos2d::CCPointArray::reverse from 0xab5e90 to 0xab5fa4 (276 bytes)
//
// 3 xrefs:
// > cocos2d::CCCardinalSplineTo::reverse @ 0xab5fb8
// > cocos2d::CCCardinalSplineBy::reverse @ 0xab6084
// > ??> @ 0x8fc28
//
// 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
//
cocos2d::CCPointArray *cocos2d::CCPointArray::reverse(cocos2d::CCPointArray *a1)
{
std::vector *v2; // x19
cocos2d::CCPointArray_vtbl *v3; // x1
void (__fastcall *v4)(cocos2d::CCPointArray *__hidden); // x0
float **v5; // x20
float *v6; // x21
cocos2d::CCObject *(__fastcall *v7)(cocos2d::CCPointArray *__hidden, cocos2d::CCZone *); // x23
cocos2d::CCPoint *v8; // x22
cocos2d::CCPoint **m_finish; // x0
cocos2d::CCPointArray *v10; // x20
cocos2d::CCPoint *v12; // [xsp+50h] [xbp+50h] BYREF
v2 = (std::vector *)operator new(0x18u);
v3 = a1[1].__vftable;
v2->m_start = nullptr;
v2->m_finish = nullptr;
v2->m_reserveEnd = nullptr;
v4 = v3->~CCPointArray;
v5 = (float **)((char *)v4 - 8);
if ( v4 != (void (__fastcall *)(cocos2d::CCPointArray *__hidden))v3->copyWithZone )
{
do
{
v6 = *v5;
v7 = (cocos2d::CCObject *(__fastcall *)(cocos2d::CCPointArray *__hidden, cocos2d::CCZone *))v5;
v8 = (cocos2d::CCPoint *)operator new(8u);
cocos2d::CCPoint::CCPoint(v8, *v6, v6[1]);
v12 = v8;
m_finish = v2->m_finish;
if ( m_finish == v2->m_reserveEnd )
{
std::vector::_M_emplace_back_aux((__int64)v2, &v12);
}
else
{
if ( m_finish )
{
*m_finish = v8;
m_finish = v2->m_finish;
}
v2->m_finish = m_finish + 1;
}
--v5;
}
while ( a1[1].copyWithZone != v7 );
}
v10 = cocos2d::CCPointArray::create(0);
cocos2d::CCPointArray::setControlPoints(v10, v2);
return v10;
}