//
// cocos2d::CCTexture2D::drawInRect from 0x5f3884 to 0x5f3940 (188 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::CCTexture2D::drawInRect(cocos2d::CCTexture2D *a1, const cocos2d::CCRect *a2)
{
float x; // s13
GLfloat m_fMaxS; // r3
float width; // s14
float y; // s15
float v8; // s14
float height; // s13
_DWORD v10[16]; // [sp+Ch] [bp+0h] BYREF
memset(v10, 0, 0x20u);
x = a2->origin.x;
m_fMaxS = a1->m_fMaxS;
width = a2->size.width;
v10[1] = LODWORD(a1->m_fMaxT);
*(GLfloat *)&v10[2] = m_fMaxS;
y = a2->origin.y;
v10[3] = v10[1];
*(GLfloat *)&v10[6] = m_fMaxS;
v8 = x + width;
*(float *)&v10[8] = x;
*(float *)&v10[12] = x;
height = a2->size.height;
*(float *)&v10[9] = y;
*(float *)&v10[11] = y;
*(float *)&v10[10] = v8;
*(float *)&v10[14] = v8;
*(float *)&v10[13] = y + height;
*(float *)&v10[15] = y + height;
cocos2d::ccGLEnableVertexAttribs((unsigned int)&byte_5);
cocos2d::CCGLProgram::use(a1->m_pShaderProgram);
cocos2d::CCGLProgram::setUniformsForBuiltins(a1->m_pShaderProgram);
cocos2d::ccGLBindTexture2D(a1->m_uName);
glVertexAttribPointer();
glVertexAttribPointer();
glDrawArrays(5u, 0, 4);
}