//
// GJEffectManager::runOpacityActionOnGroup from 0xa06814 to 0xa06b14 (768 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x795b88
// > EffectGameObject::triggerObject @ 0x898668
// > ??> @ 0xd0378
//
// This function is hookable on this platform (idp: arm, 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:59:21 +0000
//
__int64 __fastcall GJEffectManager::runOpacityActionOnGroup(
GJEffectManager *this,
int a2,
float a3,
float a4,
int a5,
int a6)
{
unsigned __int64 v6; // x28
int v10; // w2
float v13; // s9
__int64 *v14; // x1
void *v15; // x0
float v16; // s11
char v17; // w5
unsigned __int64 v18; // x26
unsigned __int64 v19; // x23
__int64 *v20; // x0
unsigned __int64 v21; // x1
unsigned __int64 v22; // x1
__int64 v23; // x27
float v24; // s2
float v25; // s0
_BOOL8 v26; // x2
__int64 v27; // x0
unsigned __int64 v28; // x2
unsigned __int64 v29; // x1
__int64 *v30; // x0
unsigned __int64 v32; // x1
unsigned __int64 v33; // x0
unsigned __int8 v34; // [xsp+88h] [xbp+88h]
int v35; // [xsp+90h] [xbp+90h]
int v36; // [xsp+9Ch] [xbp+9Ch] BYREF
void *v37; // [xsp+A0h] [xbp+A0h] BYREF
v36 = a2;
v10 = 9999;
if ( a2 <= 9998 )
{
if ( a2 < 0 )
v10 = 0;
else
v10 = a2;
}
v36 = v10;
v13 = GJEffectManager::opacityModForGroup(this, v10);
v14 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
(_QWORD *)this + 51,
&v36);
if ( v14 )
{
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::remove(
(__int64 *)this + 51,
v14,
(__int64)&v37);
v15 = v37;
v37 = nullptr;
if ( v15 )
operator delete(v15);
}
if ( a3 <= 0.0 )
{
v16 = a4;
v17 = 1;
}
else
{
v16 = v13;
v17 = 0;
}
v18 = *((_QWORD *)this + 52);
v19 = v36;
if ( v18 )
{
v6 = (v18 - 1) & v36;
if ( ((v18 - 1) & v18) != 0 )
v6 = v36 % v18;
v20 = *(__int64 **)(*((_QWORD *)this + 51) + 8 * v6);
if ( v20 )
{
while ( 1 )
{
v20 = (__int64 *)*v20;
if ( !v20 )
break;
v21 = v20[1];
v22 = ((v18 - 1) & v18) != 0 ? v21 % v18 : (v18 - 1) & v21;
if ( v6 != v22 )
break;
if ( v36 == *((_DWORD *)v20 + 4) )
return std::unordered_map::operator[]((unsigned __int64)this + 408, &v36);
}
}
}
v34 = v17;
v35 = v36;
v23 = operator new(0x40u);
*(float *)(v23 + 20) = a3;
*(_DWORD *)(v23 + 16) = v36;
*(_WORD *)(v23 + 32) = v34;
*(_DWORD *)(v23 + 40) = v35;
*(_DWORD *)(v23 + 48) = a5;
*(_DWORD *)(v23 + 52) = a6;
*(_QWORD *)(v23 + 8) = v19;
*(_QWORD *)v23 = 0;
*(_DWORD *)(v23 + 36) = 0;
*(_DWORD *)(v23 + 56) = 0;
*(_DWORD *)(v23 + 60) = 0;
*(float *)(v23 + 24) = v13;
*(float *)(v23 + 28) = a4;
*(float *)(v23 + 44) = v16;
v24 = *((float *)this + 110);
v25 = (float)(unsigned __int64)(*((_QWORD *)this + 54) + 1LL);
if ( v25 <= (float)((float)v18 * v24) )
{
if ( v18 )
goto LABEL_25;
v26 = 1;
v27 = 0;
}
else
{
v26 = 1;
v27 = 2 * v18;
if ( v18 > 2 )
v26 = ((v18 - 1) & v18) != 0;
}
v28 = v26 + v27;
v29 = vcvtps_u32_f32(v25 / v24);
if ( v29 < v28 )
v29 = v28;
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::rehash(
(unsigned __int64)this + 408,
v29);
v18 = *((_QWORD *)this + 52);
if ( ((v18 - 1) & v18) != 0 )
{
v6 = v19 % v18;
v30 = *(__int64 **)(*((_QWORD *)this + 51) + 8 * (v19 % v18));
if ( v30 )
goto LABEL_26;
LABEL_36:
*(_QWORD *)v23 = *((_QWORD *)this + 53);
*((_QWORD *)this + 53) = v23;
*(_QWORD *)(*((_QWORD *)this + 51) + 8 * v6) = (char *)this + 424;
if ( *(_QWORD *)v23 )
{
v32 = *(_QWORD *)(*(_QWORD *)v23 + 8LL);
if ( ((v18 - 1) & v18) != 0 )
v33 = v32 % v18;
else
v33 = (v18 - 1) & v32;
*(_QWORD *)(*((_QWORD *)this + 51) + 8 * v33) = v23;
}
goto LABEL_27;
}
v6 = (v18 - 1) & v19;
LABEL_25:
v30 = *(__int64 **)(*((_QWORD *)this + 51) + 8 * v6);
if ( !v30 )
goto LABEL_36;
LABEL_26:
*(_QWORD *)v23 = *v30;
*v30 = v23;
LABEL_27:
++*((_QWORD *)this + 54);
return std::unordered_map::operator[]((unsigned __int64)this + 408, &v36);
}