//
// LevelEditorLayer::updateBlendValues from 0x1403fcff0 to 0x1403fd118 (296 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x1403fb76e
// > LevelEditorLayer::onPlaytest @ 0x1403fea5a
// > ??> @ 0x1409257cc
//
// 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 11:31:53 +0000
//
_DWORD *__fastcall LevelEditorLayer::updateBlendValues(_QWORD *a1)
{
unsigned __int64 v2; // r10
__int64 v3; // rdi
__int64 v4; // r11
__int64 v5; // rsi
char v6; // r8
__int64 v7; // rbx
int v8; // eax
int v9; // eax
__int64 v10; // rcx
int v11; // eax
_DWORD *result; // rax
v2 = 0;
v3 = 1102;
do
{
v4 = *(_QWORD *)(*(_QWORD *)(a1[301] + 736LL) + 8 * v2);
if ( v4 )
LOBYTE(v4) = *(_BYTE *)(v4 + 84);
v5 = a1[1910];
v6 = v2 & 0x1F;
v7 = 4 * (v2 >> 5);
v8 = *(_DWORD *)(v5 + v7);
if ( (_BYTE)v4 == (((1 << (v2 & 0x1F)) & v8) != 0) )
{
v10 = a1[1914];
v11 = *(_DWORD *)(v10 + v7) & ~(1 << v6);
}
else
{
if ( (_BYTE)v4 )
v9 = v8 | (1 << v6);
else
v9 = v8 & ~(1 << v6);
*(_DWORD *)(v5 + v7) = v9;
v10 = a1[1914];
v11 = *(_DWORD *)(v10 + v7) | (1 << v6);
}
++v2;
*(_DWORD *)(v10 + v7) = v11;
--v3;
}
while ( v3 );
*(_DWORD *)(a1[1910] + 124LL) |= 0x2000u;
*(_DWORD *)(a1[1914] + 124LL) &= ~0x2000u;
*(_DWORD *)(a1[1910] + 124LL) |= 0x4000u;
*(_DWORD *)(a1[1914] + 124LL) &= ~0x4000u;
*(_DWORD *)(a1[1910] + 124LL) |= 0x8000u;
*(_DWORD *)(a1[1914] + 124LL) &= ~0x8000u;
*(_DWORD *)a1[1910] &= ~1u;
result = (_DWORD *)a1[1914];
*result &= ~1u;
return result;
}