//
// cocos2d::extension::CCThreadPool::shutdown from 0xd1cf88 to 0xd1d004 (124 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCThreadPool::~CCThreadPool @ 0xd1d778
// > cocos2d::extension::CCHttpClient::~CCHttpClient @ 0xd1d800
// > ??> @ 0x45a48
//
// 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
//
__int64 __fastcall cocos2d::extension::CCThreadPool::shutdown(cocos2d::extension::CCThreadPool *this)
{
std::mutex *v1; // x20
__int64 result; // x0
__int64 *v4; // x20
__int64 *i; // x19
std::thread *v6; // x0
v1 = (cocos2d::extension::CCThreadPool *)((char *)this + 72);
std::mutex::lock((cocos2d::extension::CCThreadPool *)((char *)this + 72));
*((_BYTE *)this + 160) = 1;
std::mutex::unlock(v1);
result = std::condition_variable::notify_all((cocos2d::extension::CCThreadPool *)((char *)this + 112));
v4 = *((__int64 **)this + 1);
for ( i = *(__int64 **)this; v4 != i; result = std::thread::join(v6) )
{
while ( 1 )
{
result = *i;
if ( *i )
break;
if ( v4 == ++i )
return result;
}
v6 = (std::thread *)i++;
}
return result;
}