//
// std::__ndk1::thread::detach from 0xf866d0 to 0xf8675c (140 bytes)
//
// 4 xrefs:
// > GManager::saveGMTo @ 0x6a9048
// > LevelEditorLayer::doAutoSave @ 0x7a80a0
// > LevelEditorLayer::doAutoBackup @ 0x7a87fc
// > ??> @ 0xb37a0
//
// 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 13:13:53 +0000
//
__int64 __fastcall std::thread::detach(pthread_t *this)
{
pthread_t v2; // x0
__int64 result; // x0
unsigned int v4; // w20
void *exception; // x19
__int64 *v6; // x0
v2 = *this;
if ( !v2 )
{
LODWORD(result) = 22;
LABEL_5:
v4 = result;
exception = _cxa_allocate_exception(0x20u);
v6 = std::system_category();
std::system_error::system_error((__int64)exception, v4, (__int64)v6, "thread::detach failed");
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::system_error,
(void (*)(void *))std::system_error::~system_error);
}
result = pthread_detach(v2);
if ( (_DWORD)result )
goto LABEL_5;
*this = 0;
return result;
}