//
// GJEffectManager::storeTriggeredID from 0xa0fb90 to 0xa0fcb8 (296 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::playerTouchedTrigger @ 0x9c18a8
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8c24
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8cb8
// > ??> @ 0xaa080
//
// 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:27 +0000
//
__int64 __fastcall GJEffectManager::storeTriggeredID(GJEffectManager *this, int a2, int a3)
{
__int64 **v3; // x19
__int64 *v5; // x0
int v6; // w3
int v7; // w3
__int64 *v9; // x3
__int64 v10; // x0
__int64 v11; // x1
__int64 **v14; // [xsp+40h] [xbp+40h]
v3 = (__int64 **)((char *)this + 1080);
v5 = *((__int64 **)this + 135);
if ( !v5 )
{
v14 = v3;
goto LABEL_12;
}
while ( 1 )
{
v6 = *((_DWORD *)v5 + 7);
if ( a2 < v6 )
break;
if ( a2 <= v6 )
{
v7 = *((_DWORD *)v5 + 8);
if ( a3 < v7 )
break;
if ( a3 <= v7 )
return _stack_chk_guard;
}
v9 = (__int64 *)v5[1];
if ( !v9 )
{
v14 = (__int64 **)v5;
v3 = (__int64 **)(v5 + 1);
goto LABEL_12;
}
LABEL_8:
v5 = v9;
}
v9 = (__int64 *)*v5;
if ( *v5 )
goto LABEL_8;
v14 = (__int64 **)v5;
v3 = (__int64 **)v5;
LABEL_12:
v10 = operator new(0x28u);
*(_QWORD *)v10 = 0;
*(_DWORD *)(v10 + 28) = a2;
*(_DWORD *)(v10 + 32) = a3;
*(_QWORD *)(v10 + 8) = 0;
*(_QWORD *)(v10 + 16) = v14;
*v3 = (__int64 *)v10;
v11 = **((_QWORD **)this + 134);
if ( v11 )
{
*((_QWORD *)this + 134) = v11;
std::__tree_balance_after_insert *>(*((__int64 **)this + 135), *v3);
}
else
{
std::__tree_balance_after_insert *>(*((__int64 **)this + 135), (__int64 *)v10);
}
++*((_QWORD *)this + 136);
return _stack_chk_guard;
}