//
// std::_Deque_base cocos2d::extension::CCThreadPool::CCThreadPool @ 0xaabf68
// > cocos2d::extension::CCThreadPool::CCThreadPool @ 0xaabfa8
// > ??> @ 0xa3cf8
//
// 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
//
__int64 __fastcall std::_Deque_base>::_M_initialize_map(__int64 *a1, unsigned __int64 a2)
{
unsigned __int64 v3; // x0
char v4; // w23
__int64 v5; // x20
__int64 v6; // x0
__int64 v7; // x21
__int64 v8; // x25
unsigned __int64 v9; // x21
unsigned __int64 v10; // x24
unsigned __int64 v11; // x20
_QWORD *v12; // x19
__int64 v13; // x1
__int64 v14; // x2
__int64 result; // x0
v3 = (a2 >> 4) + 3;
v4 = a2;
v5 = (a2 >> 4) + 1;
if ( v3 < 8 )
v3 = 8;
a1[1] = v3;
v6 = operator new(8 * v3);
v7 = a1[1];
*a1 = v6;
v8 = v6;
v9 = (unsigned __int64)(v7 - v5) >> 1;
v10 = v6 + 8 * v9;
v11 = v10 + 8 * v5;
if ( v10 < v11 )
{
v12 = (_QWORD *)(v6 + 8 * v9);
do
*v12++ = operator new(0x200u);
while ( v11 > (unsigned __int64)v12 );
}
a1[5] = v10;
v13 = *(_QWORD *)(v8 + 8 * v9);
a1[3] = v13;
a1[9] = v11 - 8;
a1[4] = v13 + 512;
v14 = *(_QWORD *)(v11 - 8);
a1[7] = v14;
a1[2] = v13;
result = v14 + 32LL * (v4 & 0xF);
a1[8] = v14 + 512;
a1[6] = result;
return result;
}