//
// GJBaseGameLayer::unlinkAllEvents from 0x9b0870 to 0x9b0930 (192 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x9e71dc
// > ??> @ 0xdb0b8
//
// 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:58:15 +0000
//
__int64 __fastcall GJBaseGameLayer::unlinkAllEvents(GJBaseGameLayer *this)
{
char *v1; // x20
_QWORD **v3; // x19
_QWORD *v4; // x20
_QWORD *v5; // x2
char *v6; // x0
char *v7; // x3
v1 = (char *)this + 1304;
v3 = *((_QWORD ***)this + 164);
if ( v3 )
{
std::__tree,std::vector>,std::__map_value_compare,std::__value_type,std::vector>,std::less>,true>,std::allocator,std::vector>>>::destroy(
(__int64)this + 1304,
*v3);
std::__tree,std::vector>,std::__map_value_compare,std::__value_type,std::vector>,std::less>,true>,std::allocator,std::vector>>>::destroy(
(__int64)v1,
v3[1]);
v4 = v3[5];
if ( v4 )
{
v5 = v3[6];
if ( v4 != v5 )
{
do
{
v3[6] = v5 - 5;
v6 = (char *)*(v5 - 3);
if ( v6 )
{
v7 = (char *)*(v5 - 2);
if ( v6 != v7 )
*(v5 - 2) = &v7[4 * ~((unsigned __int64)(v7 - 4 - v6) >> 2)];
operator delete(v6);
}
v5 = v3[6];
}
while ( v4 != v5 );
v5 = v3[5];
}
operator delete(v5);
}
operator delete(v3);
}
*((_QWORD *)this + 165) = 0;
*((_QWORD *)this + 164) = 0;
*((_QWORD *)this + 163) = (char *)this + 1312;
return (__int64)this + 1312;
}