//
// LevelEditorLayer::updateBlendValues from 0x6603c4 to 0x6604d0 (268 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x6640f0
// > LevelEditorLayer::updateGameObjects @ 0x67baf4
// > ??> @ 0xabf00
//
// 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 LevelEditorLayer::updateBlendValues(LevelEditorLayer *a1)
{
unsigned __int64 v1; // x19
__int64 v3; // x4
bool shouldBlend; // w0
unsigned __int64 v5; // x2
std::uintptr_t *m_bitptr; // x5
__int64 v7; // x1
std::uintptr_t v8; // x3
__int64 v9; // x6
bool v10; // zf
std::uintptr_t *v11; // x3
v1 = 0;
do
{
while ( 1 )
{
shouldBlend = GJEffectManager::shouldBlend(a1->m_effectManager, v1);
v5 = v1 >> 6;
m_bitptr = a1->m_blendingColors.m_start.m_bitptr;
v7 = 1LL << (v1 & 0x3F);
v8 = m_bitptr[v1 >> 6];
v9 = v8 | v7;
v3 = v8 & ~v7;
v10 = ((v8 & v7) != 0) == shouldBlend;
v11 = a1->m_blendingColors2.m_start.m_bitptr;
if ( !v10 )
break;
++v1;
v11[v5] &= ~v7;
if ( v1 == 1102 )
goto LABEL_8;
}
++v1;
if ( shouldBlend )
v3 = v9;
m_bitptr[v5] = v3;
v11[v5] |= v7;
}
while ( v1 != 1102 );
LABEL_8:
m_bitptr[15] |= 0x200000000000uLL;
v11[15] &= ~0x200000000000uLL;
m_bitptr[15] |= 0x400000000000uLL;
v11[15] &= ~0x400000000000uLL;
m_bitptr[15] |= 0x800000000000uLL;
v11[15] &= ~0x800000000000uLL;
*m_bitptr &= ~1uLL;
*v11 &= ~1uLL;
}