//
// cocos2d::extension::CCThreadPool::availableThreadCount from 0x7b1752 to 0x7b1780 (46 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCHttpClient::availableThreadCount @ 0x7b179e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:07 +0000
//
unsigned int __fastcall cocos2d::extension::CCThreadPool::availableThreadCount(cocos2d::extension::CCThreadPool *this)
{
std::mutex *v1; // r6
unsigned int v3; // r4
unsigned int v4; // r3
unsigned int v5; // r4
v1 = (cocos2d::extension::CCThreadPool *)((char *)this + 36);
std::mutex::lock((cocos2d::extension::CCThreadPool *)((char *)this + 36));
v3 = *((_DWORD *)this + 12) + *((_DWORD *)this + 8);
v4 = (*((_DWORD *)this + 1) - *(_DWORD *)this) >> 2;
if ( v4 <= v3 )
v5 = 0;
else
v5 = v4 - v3;
std::mutex::unlock(v1);
return v5;
}