//
// sub_D1CDF0 from 0xd1cdf0 to 0xd1cef8 (264 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCThreadPool::CCThreadPool @ 0xd1d34c
// > cocos2d::extension::CCThreadPool::CCThreadPool @ 0xd1d3d0
//
// 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:07:10 +0000
//
void __fastcall sub_D1CDF0(pthread_t *a1, std::__thread_struct **a2)
{
std::__thread_struct *v4; // x20
std::__thread_struct *v5; // x21
std::__thread_struct **v6; // x19
int v7; // w0
std::__thread_struct *v8; // x20
v4 = (std::__thread_struct *)operator new(8u);
std::__thread_struct::__thread_struct(v4);
v5 = *a2;
v6 = (std::__thread_struct **)operator new(0x10u);
*v6 = v4;
v6[1] = v5;
v7 = pthread_create(a1, nullptr, (void *(*)(void *))sub_D1D888, v6);
if ( v7 )
{
std::__throw_system_error(v7, "thread constructor failed");
v8 = *v6;
*v6 = nullptr;
if ( v8 )
{
std::__thread_struct::~__thread_struct(v8);
operator delete(v8);
}
operator delete(v6);
}
}