//
// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x100308268 to 0x100308350 (232 bytes)
//
// 1 xrefs:
// > cocos2d::CCTextureAtlas::drawQuads @ 0x100308264
//
// 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 11:03:09 +0000
//
void __fastcall cocos2d::CCTextureAtlas::drawNumberOfQuads(__int64 a1, int a2, int a3)
{
__int64 v6; // x0
void *v7; // x0
if ( a2 )
{
v6 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 88) + 104LL))(*(_QWORD *)(a1 + 88));
cocos2d::ccGLBindTexture2D(v6);
if ( *(_BYTE *)(a1 + 76) == 1 )
{
glBindBuffer(0x8892u, *(_DWORD *)(a1 + 68));
glBufferData(0x8892u, 96LL * (unsigned int)(a2 - a3), nullptr, 0x88E8u);
v7 = (void *)glMapBufferOES(34962, 35001);
memcpy(v7, *(const void **)(a1 + 96), 96LL * (unsigned int)(a2 - a3));
glUnmapBufferOES(34962);
glBindBuffer(0x8892u, 0);
*(_BYTE *)(a1 + 76) = 0;
}
cocos2d::ccGLBindVAO(*(unsigned int *)(a1 + 64));
glDrawElements(4u, 6 * a2, 0x1403u, (const GLvoid *)(2LL * (unsigned int)(6 * a3)));
++dword_100A0F904;
}
}