//
// cocos2d::CCPointArray::insertControlPoint from 0x180026730 to 0x1800267ff (207 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b94b4
//
// This function is hookable on this platform (idp: pc, 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 11:21:30 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCPointArray::insertControlPoint(
cocos2d::CCPointArray *this,
struct cocos2d::CCPoint *a2,
unsigned int a3)
{
__int64 v3; // rdi
float *v6; // rax
float *v7; // rbx
_QWORD *v8; // r9
char *v9; // rdi
char *v10; // rcx
float *v11; // [rsp+30h] [rbp+8h] BYREF
v3 = a3;
v6 = (float *)sub_1800E4AC0(8u);
v11 = v6;
if ( v6 )
v7 = kmVec2Fill(v6, *(float *)a2, *((float *)a2 + 1));
else
v7 = nullptr;
v11 = v7;
v8 = *((_QWORD **)this + 7);
v9 = (char *)(*v8 + 8 * v3);
v10 = (char *)v8[1];
if ( v10 == (char *)v8[2] )
{
sub_180025630(*((const void ***)this + 7), v9, &v11);
}
else if ( v9 == v10 )
{
*(_QWORD *)v10 = v7;
v8[1] += 8LL;
}
else
{
*(_QWORD *)v10 = *((_QWORD *)v10 - 1);
v8[1] += 8LL;
memmove(v9 + 8, v9, v10 - v9 - 8);
*(_QWORD *)v9 = v7;
}
}