//
// SetupSmartBlockLayer::onReferenceOnly from 0x1405ed360 to 0x1405ed3ea (138 bytes)
//
// 4 xrefs:
// > SetupSmartBlockLayer::init @ 0x1405ecd69
// > ??> @ 0x1408e2c00
// > ??> @ 0x1408e2c10
// > ??> @ 0x14092f054
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:35:04 +0000
//
char __fastcall SetupSmartBlockLayer::onReferenceOnly(__int64 a1)
{
unsigned int v2; // eax
__int64 v3; // rcx
cocos2d::CCArray *v4; // rcx
unsigned int v5; // edi
struct cocos2d::CCObject *v6; // rax
LOBYTE(v2) = *(_BYTE *)(a1 + 672) == 0;
*(_BYTE *)(a1 + 672) = v2;
v3 = *(_QWORD *)(a1 + 688);
if ( v3 )
{
*(_BYTE *)(v3 + 1360) = v2;
}
else
{
v4 = *(cocos2d::CCArray **)(a1 + 696);
if ( v4 )
{
v5 = 0;
v2 = cocos2d::CCArray::count(v4);
if ( v2 )
{
do
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 696), v5++);
*((_BYTE *)v6 + 1360) = *(_BYTE *)(a1 + 672);
v2 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 696));
}
while ( v5 < v2 );
}
}
}
return v2;
}