//
// sub_1002E8384 from 0x1002e8384 to 0x1002e8404 (128 bytes)
//
// 1 xrefs:
// > GManager::saveGMTo @ 0x1002e7cec
//
// 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 11:02:51 +0000
//
__int64 __fastcall sub_1002E8384(const void **a1)
{
std::__thread_specific_ptr *v2; // x0
const void *v3; // x1
const void **v4; // x8
const void **v6; // [xsp+8h] [xbp-38h] BYREF
void *__p[2]; // [xsp+10h] [xbp-30h] BYREF
const void *v8; // [xsp+20h] [xbp-20h]
v6 = a1;
v2 = std::__thread_local_data();
v3 = *a1;
*a1 = nullptr;
pthread_setspecific(v2->__key_, v3);
v4 = v6;
*(_OWORD *)__p = *(_OWORD *)(v6 + 3);
v8 = v6[5];
v6[4] = nullptr;
v4[5] = nullptr;
v4[3] = nullptr;
sub_1002E7DE0((__int64)(v4 + 1), (__int64)__p);
if ( SHIBYTE(v8) < 0 )
operator delete(__p[0]);
sub_1002E8430(&v6);
return 0;
}