//
// std::__ndk1::__thread_specific_ptr::__thread_specific_ptr from 0xf86888 to 0xf86908 (128 bytes)
//
// 2 xrefs:
// > std::__ndk1::__thread_local_data @ 0xf8684c
// > ??> @ 0x5a3d0
//
// 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_specific_ptr::__thread_specific_ptr(pthread_key_t *a1)
{
__int64 result; // x0
unsigned int v2; // w20
void *exception; // x19
__int64 *v4; // x0
result = pthread_key_create(a1, (void (*)(void *))std::__thread_specific_ptr::__at_thread_exit);
if ( (_DWORD)result )
{
v2 = result;
exception = _cxa_allocate_exception(0x20u);
v4 = std::system_category();
std::system_error::system_error((__int64)exception, v2, (__int64)v4, "__thread_specific_ptr construction failed");
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::system_error,
(void (*)(void *))std::system_error::~system_error);
}
return result;
}