//
// cocos2d::extension::CCThreadPool::shutdown from 0x5abb98 to 0x5abc06 (110 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCThreadPool::~CCThreadPool @ 0x5abc10
// > cocos2d::extension::CCHttpClient::~CCHttpClient @ 0x5abc54
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall cocos2d::extension::CCThreadPool::shutdown(cocos2d::extension::CCThreadPool *this)
{
pthread_mutex_t *v2; // r0
int result; // r0
pthread_t *v4; // r5
pthread_t *v5; // r7
cocos2d::extension::CCThreadPool *v6; // t0
pthread_t *v7; // r6
pthread_t v8; // r0
pthread_mutex_t *v9; // [sp+4h] [bp-10h] BYREF
char v10; // [sp+8h] [bp-Ch]
v2 = (pthread_mutex_t *)((char *)this + 52);
v9 = v2;
v10 = 0;
if ( !v2 )
sub_7735D4(1);
std::mutex::lock(v2);
*((_BYTE *)this + 60) = 1;
v10 = 1;
std::unique_lock::~unique_lock((int)&v9);
result = sub_76DB98((char *)this + 56);
v6 = this;
v4 = *(pthread_t **)this;
v5 = *((pthread_t **)v6 + 1);
while ( 1 )
{
v7 = v4;
if ( v4 == v5 )
break;
v8 = *v4++;
result = pthread_equal(v8, 0);
if ( !result )
result = sub_776904(v7);
}
return result;
}