//
// LevelEditorLayer::updateBlendValues from 0x1000c3390 to 0x1000c3440 (176 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x1000ad884
// > LevelEditorLayer::onPlaytest @ 0x1000c5b7a
//
// 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:20:34 +0000
//
_BYTE *__fastcall LevelEditorLayer::updateBlendValues(_QWORD *a1)
{
unsigned __int64 i; // r14
_BYTE *result; // rax
char shouldBlend; // al
_BYTE *v5; // rdx
__int64 v6; // rdi
unsigned __int64 v7; // rsi
__int64 v8; // rcx
__int64 v9; // r8
__int64 v10; // r8
__int64 v11; // rcx
for ( i = 0; i != 1102; ++i )
{
while ( 1 )
{
shouldBlend = GJEffectManager::shouldBlend(a1[269]);
v5 = (_BYTE *)a1[1824];
v6 = 1LL << i;
v7 = i >> 6;
v8 = *(_QWORD *)&v5[8 * (i >> 6)];
v9 = ~(1LL << i);
if ( shouldBlend != _bittest64(&v8, i) )
break;
result = (_BYTE *)a1[1827];
*(_QWORD *)&result[8 * v7] &= v9;
if ( ++i == 1102 )
goto LABEL_7;
}
v10 = v8 & v9;
v11 = v6 | v8;
if ( !shouldBlend )
v11 = v10;
*(_QWORD *)&v5[8 * v7] = v11;
result = (_BYTE *)a1[1827];
*(_QWORD *)&result[8 * v7] |= v6;
}
LABEL_7:
v5[125] |= 0x20u;
result[125] &= ~0x20u;
v5[125] |= 0x40u;
result[125] &= ~0x40u;
v5[125] |= 0x80u;
result[125] &= ~0x80u;
*v5 &= ~1u;
*result &= ~1u;
return result;
}