//
// ShaderLayer::preChromaticShader from 0xb2bf6c to 0xb2c080 (276 bytes)
//
// 2 xrefs:
// > ShaderLayer::performCalculations @ 0xb2e62c
// > ??> @ 0x5e7f8
//
// 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:01:41 +0000
//
__int64 __fastcall ShaderLayer::preChromaticShader(ShaderLayer *this)
{
__int64 v2; // x0
float v3; // s10
float v4; // s2
float v5; // s8
float v6; // s9
cocos2d::CCGLProgram *v7; // x0
cocos2d::CCGLProgram *v8; // x0
if ( *((float *)this + 181) != 0.0
|| *((float *)this + 182) != 0.0
|| cocos2d::CCNode::getActionByTag(this, 1)
|| cocos2d::CCNode::getActionByTag(this, 2) )
{
*((_BYTE *)this + 1078) = 1;
}
if ( *((_BYTE *)this + 732) && (v2 = *((_QWORD *)this + 141)) != 0 )
v3 = fabsf((*(float (__fastcall **)(_QWORD))(**(_QWORD **)(v2 + 3920) + 168LL))(*(_QWORD *)(v2 + 3920)));
else
v3 = 1.0;
v4 = *((float *)this + 288);
v5 = (float)(v4 / 1.2019) / *((float *)this + 295);
v6 = (float)(v4 / 1.2019) / *((float *)this + 294);
v7 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 138) + 656LL))(*((_QWORD *)this + 138));
cocos2d::CCGLProgram::setUniformLocationWith1f(
v7,
*((_DWORD *)this + 352),
v3 * (float)((float)(v6 * *((float *)this + 181)) * *((float *)this + 128)));
v8 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 138) + 656LL))(*((_QWORD *)this + 138));
return cocos2d::CCGLProgram::setUniformLocationWith1f(
v8,
*((_DWORD *)this + 353),
v3 * (float)((float)(v5 * *((float *)this + 182)) * *((float *)this + 129)));
}