//
// std::__ndk1::thread::detach from 0x97e91c to 0x97e978 (92 bytes)
//
// 3 xrefs:
// > GManager::saveGMTo @ 0x3d43da
// > LevelEditorLayer::doAutoSave @ 0x472b22
// > LevelEditorLayer::doAutoBackup @ 0x472eb0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:06:05 +0000
//
int __fastcall std::thread::detach(pthread_t *this)
{
pthread_t v2; // r0
unsigned int v3; // r5
void *exception; // r4
int *v6; // r0
v2 = *this;
if ( !v2 )
{
v3 = 22;
LABEL_5:
exception = _cxa_allocate_exception(0x10u);
v6 = std::system_category();
std::system_error::system_error((int)exception, v3, (unsigned int)v6, "thread::detach failed");
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::system_error,
(void (*)(void *))std::system_error::~system_error);
}
v3 = pthread_detach(v2);
if ( v3 )
goto LABEL_5;
*this = 0;
return 0;
}