//
// LevelEditorLayer::updateBlendValues from 0x36804c to 0x368180 (308 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x36ea72
// > LevelEditorLayer::updateGameObjects @ 0x37600c
//
// 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)
{
int *p_m_blendingColors; // r9
int *p_m_blendingColors2; // r7
unsigned int i; // r6
_BOOL4 shouldBlend; // r0
int v6; // r11
int v7; // r10
std::uintptr_t *m_bitptr; // r3
std::uintptr_t *v9; // r3
std::uintptr_t *v10; // r3
std::uintptr_t *v11; // r3
std::uintptr_t *v12; // r3
std::uintptr_t *v13; // r3
std::uintptr_t *v14; // r3
std::uintptr_t *v15; // r3
std::uintptr_t *v16; // [sp+4h] [bp-10h] BYREF
int v17; // [sp+8h] [bp-Ch]
p_m_blendingColors = (int *)&a1->m_blendingColors;
p_m_blendingColors2 = (int *)&a1->m_blendingColors2;
for ( i = 0; i != 1102; ++i )
{
shouldBlend = GJEffectManager::shouldBlend(a1->m_effectManager, i);
v6 = *p_m_blendingColors;
v7 = shouldBlend;
sub_365110(&v16, *p_m_blendingColors, i);
if ( v7 == std::_Bit_reference::operator bool((int)&v16) )
{
sub_365110(&v16, *p_m_blendingColors2, i);
std::_Bit_reference::operator=((int)&v16, 0);
}
else
{
sub_365110(&v16, v6, i);
std::_Bit_reference::operator=((int)&v16, v7);
sub_365110(&v16, *p_m_blendingColors2, i);
sub_364FBE((int)&v16);
}
}
m_bitptr = a1->m_blendingColors.m_start.m_bitptr;
v17 = 0x2000;
v16 = m_bitptr + 31;
sub_364FBE((int)&v16);
v9 = a1->m_blendingColors2.m_start.m_bitptr + 31;
v17 = 0x2000;
v16 = v9;
std::_Bit_reference::operator=((int)&v16, 0);
v10 = a1->m_blendingColors.m_start.m_bitptr;
v17 = 0x4000;
v16 = v10 + 31;
sub_364FBE((int)&v16);
v11 = a1->m_blendingColors2.m_start.m_bitptr + 31;
v17 = 0x4000;
v16 = v11;
std::_Bit_reference::operator=((int)&v16, 0);
v12 = a1->m_blendingColors.m_start.m_bitptr;
v17 = 0x8000;
v16 = v12 + 31;
sub_364FBE((int)&v16);
v13 = a1->m_blendingColors2.m_start.m_bitptr + 31;
v17 = 0x8000;
v16 = v13;
std::_Bit_reference::operator=((int)&v16, 0);
v14 = a1->m_blendingColors.m_start.m_bitptr;
v17 = 1;
v16 = v14;
std::_Bit_reference::operator=((int)&v16, 0);
v15 = a1->m_blendingColors2.m_start.m_bitptr;
v17 = 1;
v16 = v15;
std::_Bit_reference::operator=((int)&v16, 0);
}