//
// cocos2d::ccDrawCubicBezier from 0xd4b8a4 to 0xd4ba88 (484 bytes)
//
// 1 xrefs:
// > ??> @ 0xdbbe0
//
// 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:38 +0000
//
int *__fastcall cocos2d::ccDrawCubicBezier(
cocos2d *this,
const cocos2d::CCPoint *a2,
const cocos2d::CCPoint *a3,
const cocos2d::CCPoint *a4,
const cocos2d::CCPoint *a5)
{
unsigned int v9; // w22
float *v10; // x23
float v11; // s8
float *v12; // x27
float v13; // s10
float v14; // s9
float v15; // s13
float v16; // s0
cocos2d::CCGLProgram *v17; // x0
float *v18; // x1
unsigned int v19; // w1
v9 = (unsigned int)a5;
if ( !byte_1560140 )
sub_D4A780(nullptr);
v10 = (float *)operator new[](8LL * (v9 + 1));
if ( v9 )
{
v11 = 0.0;
v12 = v10 + 1;
do
{
v13 = (float)((float)((float)(1.0 - v11) * (float)(1.0 - v11)) * 3.0) * v11;
v14 = (float)((float)((float)(1.0 - v11) * 3.0) * v11) * v11;
v15 = (float)(v11 * v11) * v11;
*(v12 - 1) = (float)((float)((float)(v13 * *(float *)a2) + (float)(powf(1.0 - v11, 3.0) * *(float *)this))
+ (float)(v14 * *(float *)a3))
+ (float)(v15 * *(float *)a4);
v16 = powf(1.0 - v11, 3.0);
v11 = v11 + (float)(1.0 / (float)v9);
*v12 = (float)((float)((float)(v13 * *((float *)a2 + 1)) + (float)(v16 * *((float *)this + 1)))
+ (float)(v14 * *((float *)a3 + 1)))
+ (float)(v15 * *((float *)a4 + 1));
v12 += 2;
}
while ( v12 != &v10[2 * v9 + 1] );
}
v17 = (cocos2d::CCGLProgram *)qword_1560138;
v18 = &v10[2 * v9];
*v18 = *(float *)a4;
v18[1] = *((float *)a4 + 1);
cocos2d::CCGLProgram::use(v17);
cocos2d::CCGLProgram::setUniformsForBuiltins((cocos2d::CCGLProgram *)qword_1560138);
cocos2d::CCGLProgram::setUniformLocationWith4fv(
(cocos2d::CCGLProgram *)qword_1560138,
dword_154A088,
(float *)&dword_154A090,
1u);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)((char *)&dword_0 + 1), v19);
glVertexAttribPointer();
glDrawArrays();
operator delete[](v10);
++g_uNumberOfDraws;
return &g_uNumberOfDraws;
}