//
// generateAllBinaryStrings from 0x9da500 to 0x9da654 (340 bytes)
//
// 6 xrefs:
// > generateAllBinaryStrings @ 0x9da550
// > generateAllBinaryStrings @ 0x9da570
// > GJSmartTemplate::logTemplateStatus @ 0x9da6d0
// > GJSmartTemplate::getTemplateState @ 0x9daafc
// > GJSmartTemplate::generateRemapDict @ 0x9db460
// > ??> @ 0x791b8
//
// 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 generateAllBinaryStrings(int a1, int *a2, int a3, cocos2d::CCDictionary *a4, cocos2d::CCNode *a5)
{
void *v11; // x0
unsigned int *v12; // x2
int v13; // w1
__int64 v14; // [xsp+70h] [xbp+70h] BYREF
if ( a3 == a1 )
{
printTheArray(a2, a3, (__int64)&v14);
cocos2d::CCDictionary::setObject((int)a4, a5);
v11 = (void *)(v14 - 24);
if ( (__int64 *)(v14 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)(v14 - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *(_DWORD *)(v14 - 8);
*(_DWORD *)(v14 - 8) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v11);
}
}
else
{
a2[a3] = 0;
generateAllBinaryStrings(a1, a2, a3 + 1, a4, a5);
a2[a3] = 1;
generateAllBinaryStrings(a1, a2, a3 + 1, a4, a5);
}
return _stack_chk_guard;
}