//
// GJBaseGameLayer::stopCustomEnterEffect from 0x5a6ca0 to 0x5a6d74 (212 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x5a6d8c
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x5a6da2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:21 +0000
//
int *__fastcall GJBaseGameLayer::stopCustomEnterEffect(GJBaseGameLayer *this, EnterEffectObject *a2, unsigned int a3)
{
unsigned int v6; // r3
char *v7; // r0
int *result; // r0
int v9; // r3
int v10; // r10
int *v11; // r6
int v12; // r1
int v13; // lr
int v14; // r4
int i; // r4
char **v16; // r0
int v17; // r1
int v18[3]; // [sp+0h] [bp-Ch] BYREF
v18[0] = (int)this;
v18[1] = (int)a2;
v18[2] = a3;
v6 = *((_DWORD *)a2 + 460);
if ( v6 > 0x64 )
v6 = 0;
v18[0] = v6;
if ( a3 )
v7 = (char *)this + 1096;
else
v7 = (char *)this + 1116;
result = std::unordered_map>::operator[]((int)v7, (unsigned int *)v18);
v9 = *result;
v10 = result[1];
v11 = result;
v12 = -1030792151 * ((v10 - *result) >> 3);
if ( v12 )
{
v13 = *((_DWORD *)a2 + 450);
if ( !v13 )
{
result = (int *)GJBaseGameLayer::removeCustomEnterEffects((unsigned int)this, v18[0], a3);
LABEL_18:
if ( a3 )
v17 = *((_DWORD *)this + 284);
else
v17 = *((_DWORD *)this + 287);
*(_DWORD *)(v17 + 4 * v18[0]) = -2;
return result;
}
result = nullptr;
while ( 1 )
{
v14 = v9;
v9 += 200;
if ( *(_DWORD *)(*(_DWORD *)(v14 + 152) + 1800) == v13 )
break;
result = (int *)((char *)result + 1);
if ( result == (int *)v12 )
goto LABEL_17;
}
for ( i = v9; i != v10; i += 200 )
EnterEffectInstance::operator=(i - 200, i);
while ( 1 )
{
result = (int *)v11[1];
if ( (int *)(i - 200) == result )
break;
v16 = (char **)(result - 50);
v11[1] = (int)v16;
EnterEffectInstance::~EnterEffectInstance(v16);
}
LABEL_17:
if ( !(-1030792151 * ((v11[1] - *v11) >> 3)) )
goto LABEL_18;
}
return result;
}