//
// std::_Deque_base cocos2d::extension::CCThreadPool::CCThreadPool @ 0x5ac1fa
// > cocos2d::extension::CCThreadPool::CCThreadPool @ 0x5ac21a
//
// 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 std::_Deque_base>::_M_initialize_map(_DWORD *a1, unsigned int a2)
{
char v3; // r8
int v4; // r6
unsigned int v5; // r0
int v6; // r0
unsigned int v7; // r7
_DWORD *v8; // r5
int v9; // r9
unsigned int v10; // r6
_DWORD *i; // r10
int v12; // r3
int v13; // r0
int result; // r0
v3 = a2;
v4 = (a2 >> 5) + 1;
v5 = (a2 >> 5) + 3;
if ( v5 < 8 )
v5 = 8;
a1[1] = v5;
v6 = operator new(4 * v5);
v7 = (unsigned int)(a1[1] - v4) >> 1;
v8 = (_DWORD *)(v6 + 4 * v7);
v9 = v6;
v10 = (unsigned int)&v8[v4];
*a1 = v6;
for ( i = v8; (unsigned int)i < v10; ++i )
*i = operator new(0x200u);
a1[5] = v8;
v12 = *(_DWORD *)(v9 + 4 * v7);
a1[4] = v12 + 512;
a1[3] = v12;
a1[9] = v10 - 4;
v13 = *(_DWORD *)(v10 - 4);
a1[2] = v12;
a1[8] = v13 + 512;
a1[7] = v13;
result = v13 + 16 * (v3 & 0x1F);
a1[6] = result;
return result;
}