//
// cocos2d::ccDrawQuadBezier from 0xd4b4ec to 0xd4b66c (384 bytes)
//
// 1 xrefs:
// > ??> @ 0xbb678
//
// 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::ccDrawQuadBezier(
cocos2d *this,
const cocos2d::CCPoint *a2,
const cocos2d::CCPoint *a3,
const cocos2d::CCPoint *a4)
{
unsigned int v7; // w25
__int64 v8; // x0
char *v9; // x24
float v10; // s2
float *v11; // x0
float v12; // s0
float v13; // s3
float v14; // s1
float v15; // s0
float v16; // s1
cocos2d::CCGLProgram *v17; // x0
char *v18; // x1
unsigned int v19; // w1
v7 = (unsigned int)a4;
if ( !byte_1560140 )
sub_D4A780(nullptr);
v8 = operator new[](8LL * (v7 + 1));
v9 = (char *)v8;
if ( v7 )
{
v10 = 0.0;
v11 = (float *)(v8 + 4);
do
{
v12 = 1.0 - v10;
v13 = v10 * v10;
v14 = v12 + v12;
v15 = v12 * v12;
v16 = v14 * v10;
v10 = v10 + (float)(1.0 / (float)v7);
*(v11 - 1) = (float)((float)(v16 * *(float *)a2) + (float)(v15 * *(float *)this)) + (float)(v13 * *(float *)a3);
*v11 = (float)((float)(v16 * *((float *)a2 + 1)) + (float)(v15 * *((float *)this + 1)))
+ (float)(v13 * *((float *)a3 + 1));
v11 += 2;
}
while ( v11 != (float *)&v9[8 * v7 + 4] );
}
v17 = (cocos2d::CCGLProgram *)qword_1560138;
v18 = &v9[8 * v7];
*(_DWORD *)v18 = *(_DWORD *)a3;
*((_DWORD *)v18 + 1) = *((_DWORD *)a3 + 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[](v9);
++g_uNumberOfDraws;
return &g_uNumberOfDraws;
}