//
// ShaderLayer::preInvertColorShader from 0x1003ba650 to 0x1003ba719 (201 bytes)
//
// 0 xrefs:
//
// 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:29:30 +0000
//
__int64 __fastcall ShaderLayer::preInvertColorShader(__int64 a1)
{
__m128 v1; // xmm1
float v2; // xmm2_4
__m128 v3; // xmm1
__int64 v4; // rax
__m128 v6; // [rsp+0h] [rbp-20h]
float v7; // [rsp+14h] [rbp-Ch]
if ( *(float *)(a1 + 1000) > 0.0 || cocos2d::CCNode::getActionByTag(a1, 34) )
*(_BYTE *)(a1 + 1078) = 1;
v1 = (__m128)*(unsigned int *)(a1 + 1000);
v2 = *(float *)(a1 + 1004) * v1.f32[0];
v3 = _mm_mul_ps(
_mm_insert_ps(v1, (__m128)*(unsigned int *)(a1 + 1012), 16),
_mm_insert_ps((__m128)*(unsigned int *)(a1 + 1008), v1, 16));
if ( *(_BYTE *)(a1 + 1016) == 1 )
{
v7 = fminf(v2, 1.0);
v6 = _mm_min_ps(v3, (__m128)xmmword_100A038B0);
}
else
{
v6 = v3;
v7 = v2;
}
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1104) + 656LL))(*(_QWORD *)(a1 + 1104));
return cocos2d::CCGLProgram::setUniformLocationWith4f(
v4,
*(unsigned int *)(a1 + 1540),
v7,
*(double *)v6.i64,
*(double *)_mm_movehdup_ps(v6).i64,
*(float *)(a1 + 1000));
}