//
// cocos2d::CCPointArray::reverse from 0xd27784 to 0xd278ac (296 bytes)
//
// 3 xrefs:
// > cocos2d::CCCardinalSplineTo::reverse @ 0xd278c0
// > cocos2d::CCCardinalSplineBy::reverse @ 0xd27d8c
// > ??> @ 0xbe3a8
//
// 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
//
cocos2d::CCPointArray *__fastcall cocos2d::CCPointArray::reverse(cocos2d::CCPointArray *this)
{
_QWORD *v2; // x0
__int64 v3; // x20
_QWORD *v4; // x1
__int64 v5; // x0
float **v6; // x19
cocos2d::CCPoint **v7; // x0
float *v8; // x21
float **v9; // x23
cocos2d::CCPoint *v10; // x22
cocos2d::CCPointArray *v11; // x19
cocos2d::CCPoint *v13; // [xsp+50h] [xbp+50h] BYREF
v2 = (_QWORD *)operator new(0x18u);
*v2 = 0;
v2[1] = 0;
v3 = (__int64)v2;
v2[2] = 0;
v4 = *((_QWORD **)this + 7);
v5 = v4[1];
v6 = (float **)(v5 - 8);
if ( v5 != *v4 )
{
do
{
while ( 1 )
{
v8 = *v6;
v9 = v6;
v10 = (cocos2d::CCPoint *)operator new(8u);
cocos2d::CCPoint::CCPoint(v10, *v8, v8[1]);
v13 = v10;
v7 = *(cocos2d::CCPoint ***)(v3 + 8);
if ( (unsigned __int64)v7 < *(_QWORD *)(v3 + 16) )
break;
--v6;
std::vector::__push_back_slow_path((void **)v3, &v13);
if ( **((float ****)this + 7) == v9 )
goto LABEL_8;
}
if ( v7 )
{
*v7 = v10;
v7 = *(cocos2d::CCPoint ***)(v3 + 8);
}
*(_QWORD *)(v3 + 8) = v7 + 1;
--v6;
}
while ( **((float ****)this + 7) != v9 );
}
LABEL_8:
v11 = cocos2d::CCPointArray::create(nullptr);
cocos2d::CCPointArray::setControlPoints((__int64)v11, v3);
return v11;
}