//
// cocos2d::CCGLProgram::logForOpenGLObject from 0x7ee870 to 0x7ee92e (190 bytes)
//
// 3 xrefs:
// > cocos2d::CCGLProgram::vertexShaderLog @ 0x7ee942
// > cocos2d::CCGLProgram::fragmentShaderLog @ 0x7ee95e
// > cocos2d::CCGLProgram::programLog @ 0x7ee97a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:02 +0000
//
char *__fastcall cocos2d::CCGLProgram::logForOpenGLObject(
cocos2d::CCGLProgram *this,
unsigned int a2,
void (*a3)(unsigned int, unsigned int, int *),
void (*a4)(unsigned int, int, int *, char *))
{
char *v6; // r7
size_t v7; // r0
size_t v8; // r4
char *v9; // r3
unsigned int v10; // r0
int v11; // r6
char *v12; // r0
cocos2d::CCObject *v13; // r4
size_t byte_count; // [sp+0h] [bp-18h] BYREF
int v16; // [sp+4h] [bp-14h] BYREF
int v17; // [sp+8h] [bp-10h] BYREF
size_t v18; // [sp+Ch] [bp-Ch]
void *v19; // [sp+10h] [bp-8h]
byte_count = 0;
v16 = 0;
a3(a2, 35716u, (int *)&byte_count);
if ( (int)byte_count <= 0 )
return nullptr;
v6 = (char *)malloc(byte_count);
a4(a2, byte_count, &v16, v6);
v17 = 0;
v18 = 0;
v19 = nullptr;
v7 = strlen(v6);
v8 = v7;
if ( v7 > 0xA )
{
v10 = (v7 + 16) & 0xFFFFFFF0;
v11 = v10 | 1;
v12 = (char *)operator new(v10);
v17 = v11;
v18 = v8;
v9 = v12;
v19 = v12;
LABEL_6:
v9 = (char *)memcpy(v9, v6, v8);
goto LABEL_7;
}
LOBYTE(v17) = 2 * v7;
v9 = (char *)&v17 + 1;
if ( v7 )
goto LABEL_6;
LABEL_7:
v9[v8] = 0;
v13 = cocos2d::CCString::create((int)&v17);
if ( (v17 & 1) != 0 )
operator delete(v19);
free(v6);
return cocos2d::CCString::getCString(v13);
}