//
// cocos2d::ccDrawCubicBezier from 0x5c4a24 to 0x5c4b7a (342 bytes)
//
// 0 xrefs:
//
// 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
//
void cocos2d::ccDrawCubicBezier(
const cocos2d::CCPoint *a1,
const cocos2d::CCPoint *a2,
const cocos2d::CCPoint *a3,
const cocos2d::CCPoint *a4,
unsigned int a5)
{
float v9; // s17
unsigned int v10; // r0
char *v11; // r0
GLsizei v12; // r2
char *v13; // r4
float *v14; // r11
GLsizei v15; // r9
float v16; // s16
float v17; // s20
float v18; // s22
float v19; // r0
float *v20; // r2
cocos2d::CCGLProgram *v21; // r0
v9 = 0.0;
cocos2d::ccDrawInit((cocos2d *)a1);
if ( a5 + 1 > 0xFE00000 )
v10 = -1;
else
v10 = 8 * (a5 + 1);
v11 = (char *)operator new[](v10);
v12 = 0;
v13 = v11;
v14 = (float *)v11;
while ( 1 )
{
v14 += 2;
v15 = v12 + 1;
if ( v12 == a5 )
break;
v16 = (float)((float)((float)(1.0 - v9) * (float)(1.0 - v9)) * 3.0) * v9;
v17 = (float)((float)((float)(1.0 - v9) * 3.0) * v9) * v9;
v18 = (float)(v9 * v9) * v9;
*(v14 - 2) = (float)((float)((float)(v16 * a2->x) + (float)(powf(1.0 - v9, 3.0) * a1->x)) + (float)(v17 * a3->x))
+ (float)(v18 * a4->x);
v19 = powf(1.0 - v9, 3.0);
v12 = v15;
*(v14 - 1) = (float)((float)((float)(v16 * a2->y) + (float)(v19 * a1->y)) + (float)(v17 * a3->y))
+ (float)(v18 * a4->y);
v9 = v9 + (float)(1.0 / (float)a5);
}
v20 = (float *)&v13[8 * v12];
*v20 = a4->x;
v21 = (cocos2d::CCGLProgram *)dword_AC8A40;
v20[1] = a4->y;
cocos2d::CCGLProgram::use(v21);
cocos2d::CCGLProgram::setUniformsForBuiltins((cocos2d::CCGLProgram *)dword_AC8A40);
cocos2d::CCGLProgram::setUniformLocationWith4fv(
(cocos2d::CCGLProgram *)dword_AC8A40,
dword_ABAC20,
(float *)&dword_ABAC28,
1u);
cocos2d::ccGLEnableVertexAttribs((unsigned int)&dword_0 + 1);
glVertexAttribPointer();
glDrawArrays(3u, 0, v15);
operator delete[](v13);
++g_uNumberOfDraws;
}