//
// GJEffectManager::postCollisionCheck from 0xa12138 to 0xa122ec (436 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::loadUpToPosition @ 0x9ebe70
// > GJBaseGameLayer::update @ 0x9eddf0
// > ??> @ 0xb9bc0
//
// 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:31 +0000
//
__int64 __fastcall GJEffectManager::postCollisionCheck(GJEffectManager *this)
{
__int64 *v2; // x19
char *v3; // x22
unsigned __int64 v5; // x2
__int64 v6; // x4
unsigned __int64 v7; // x6
unsigned __int64 v8; // x3
__int64 v9; // x7
__int64 *v10; // x9
unsigned __int64 v11; // x3
__int64 v12; // x8
char *i; // x1
unsigned __int64 v14; // x0
unsigned __int64 v15; // x0
unsigned __int64 v16; // x0
__int64 v17; // x0
__int64 v18; // x0
unsigned __int64 v19; // x5
__int64 *v20; // x0
int v21; // [xsp+40h] [xbp+40h] BYREF
int v22; // [xsp+44h] [xbp+44h] BYREF
v2 = *((__int64 **)this + 77);
if ( v2 )
{
v3 = (char *)this + 616;
do
{
while ( *((_BYTE *)v2 + 20) )
{
v2 = (__int64 *)*v2;
if ( !v2 )
return _stack_chk_guard;
}
splitCollisionKey((const int *)v2 + 4, &v21, &v22);
GJEffectManager::handleObjectCollision(this, 0, v21, v22);
v5 = *((_QWORD *)this + 76);
v6 = *v2;
v7 = v5 - 1;
v8 = v2[1];
v9 = (v5 - 1) & v5;
v10 = (__int64 *)*v2;
if ( v9 )
v11 = v8 % v5;
else
v11 = v7 & v8;
v12 = *((_QWORD *)this + 75);
for ( i = *(char **)(v12 + 8 * v11); v2 != *(__int64 **)i; i = *(char **)i )
;
if ( i == v3 || ((v14 = *((_QWORD *)i + 1), v9) ? (v15 = v14 % v5) : (v15 = v7 & v14), v11 != v15) )
{
if ( !v6 )
goto LABEL_18;
v16 = *(_QWORD *)(v6 + 8);
if ( !v9 )
{
v17 = v7 & v16;
if ( v11 == v17 )
goto LABEL_23;
LABEL_18:
*(_QWORD *)(v12 + 8 * v11) = 0;
v6 = *v2;
goto LABEL_19;
}
v19 = v16 / v5;
if ( v11 == v16 % v5 )
goto LABEL_22;
*(_QWORD *)(v12 + 8 * v11) = 0;
v6 = *v2;
}
LABEL_19:
v18 = v6;
if ( v6 )
{
v16 = *(_QWORD *)(v6 + 8);
if ( v9 )
{
v19 = v16 / v5;
LABEL_22:
v17 = v16 - v19 * v5;
LABEL_23:
if ( v11 == v17 )
goto LABEL_29;
}
else
{
v17 = v7 & v16;
if ( v11 == v17 )
{
LABEL_29:
v18 = v6;
goto LABEL_25;
}
}
*(_QWORD *)(*((_QWORD *)this + 75) + 8 * v17) = i;
v18 = *v2;
}
LABEL_25:
*(_QWORD *)i = v18;
v20 = v2;
*v2 = 0;
v2 = v10;
--*((_QWORD *)this + 78);
operator delete(v20);
}
while ( v2 );
}
return _stack_chk_guard;
}