//
// sub_18000BFF0 from 0x18000bff0 to 0x18000c1b1 (449 bytes)
//
// 2 xrefs:
// > ??> @ 0x180029520
// > ??> @ 0x18004bc18
//
// This function is hookable on this platform (idp: pc, 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 12:15:38 +0000
//
__int64 __fastcall sub_18000BFF0(__int64 a1)
{
__int64 v1; // rbx
cocos2d::CCGLProgram *v2; // rax
cocos2d::CCGLProgram *v3; // rax
unsigned int v4; // edx
unsigned int v5; // r8d
cocos2d::CCGLProgram *v6; // rax
__int64 v7; // rax
unsigned int v8; // eax
unsigned int v9; // r8d
unsigned int v10; // eax
unsigned int v11; // r8d
__int64 v12; // r9
v1 = a1;
cocos2d::ccGLEnable(*(unsigned int *)(a1 + 248));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v1 + 648LL))(v1);
v2 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 648LL))(v1);
cocos2d::CCGLProgram::use(v2);
v3 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 648LL))(v1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v4);
cocos2d::ccGLBlendFunc((cocos2d *)0x302, 0x303u, v5);
v6 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 648LL))(v1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v6);
_glewActiveTexture(33984);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(v1 + 344) + 16LL))(v1 + 344);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 96LL))(v7);
cocos2d::ccGLBindTexture2DN(nullptr, v8, v9);
_glewUniform1i(*(unsigned int *)(v1 + 632), 0);
_glewActiveTexture(33985);
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 624) + 96LL))(*(_QWORD *)(v1 + 624));
cocos2d::ccGLBindTexture2DN((cocos2d *)1, v10, v11);
_glewUniform1i(*(unsigned int *)(v1 + 636), 1);
v1 += 460;
_glewVertexAttribPointer(0, 3, 5126, 0, 24, v1);
_glewVertexAttribPointer(2, 2, 5126, 0, 24, v1 + 16);
LOBYTE(v12) = 1;
_glewVertexAttribPointer(1, 4, 5121, v12, 24, v1 + 12);
glDrawArrays(5u, 0, 4);
return _glewActiveTexture(33984);
}