//
// GJEffectManager::storeTriggeredID from 0x1002e95b0 to 0x1002e9670 (192 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x100127070
// > GJBaseGameLayer::collisionCheckObjects @ 0x100127a52
// > GJBaseGameLayer::playerTouchedTrigger @ 0x10012889d
//
// 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 __fastcall GJEffectManager::storeTriggeredID(GJEffectManager *a1, int a2, int a3)
{
std::__tree_end_node *>::pointer left; // rax
std::__compressed_pair *>> *p_pair1; // r13
std::__compressed_pair *>> *v5; // r12
unsigned __int64 v6; // r14
__int64 *v7; // rax
std::__tree_end_node *> *v8; // rcx
left = a1->m_unkMap498.__tree_.__pair1_.__value_.__left_;
if ( left )
{
while ( 1 )
{
v5 = (std::__compressed_pair *>> *)left;
if ( *((_DWORD *)left + 7) > a2 )
goto LABEL_3;
if ( *((_DWORD *)left + 7) < a2 )
{
LABEL_8:
left = *((std::__tree_end_node *>::pointer *)left + 1);
if ( !left )
{
p_pair1 = v5 + 1;
goto LABEL_10;
}
}
else
{
if ( *((_DWORD *)left + 8) <= a3 )
{
if ( *((_DWORD *)left + 8) >= a3 )
return;
goto LABEL_8;
}
LABEL_3:
left = *(std::__tree_end_node *>::pointer *)left;
p_pair1 = v5;
if ( !v5->__value_.__left_ )
goto LABEL_10;
}
}
}
p_pair1 = &a1->m_unkMap498.__tree_.__pair1_;
v5 = &a1->m_unkMap498.__tree_.__pair1_;
LABEL_10:
v6 = (unsigned __int64)(unsigned int)a3 << 32;
v7 = (__int64 *)operator new(0x28u);
*(__int64 *)((char *)v7 + 28) = v6 | (unsigned int)a2;
*(_OWORD *)v7 = 0;
v7[2] = (__int64)v5;
p_pair1->__value_.__left_ = (std::__tree_end_node *>::pointer)v7;
v8 = (std::__tree_end_node *> *)a1->m_unkMap498.__tree_.__begin_node_->__left_;
if ( v8 )
a1->m_unkMap498.__tree_.__begin_node_ = v8;
sub_100054DD0((__int64 *)a1->m_unkMap498.__tree_.__pair1_.__value_.__left_, v7);
++a1->m_unkMap498.__tree_.__pair3_.__value_;
}