//
// GJSmartTemplate::removePrefab from 0x9d1190 to 0x9d1224 (148 bytes)
//
// 2 xrefs:
// > BrowseSmartKeyLayer::deletedSelectedItems @ 0x9e1e80
// > ??> @ 0x7a868
//
// 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 GJSmartTemplate::removePrefab(__int64 result, const std::string *a2, int a3)
{
cocos2d::CCArray *v4; // x20
unsigned int i; // w19
bool v6; // cf
if ( a3 > 0 )
{
result = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(result + 56), a2);
v4 = (cocos2d::CCArray *)result;
if ( result )
{
result = cocos2d::CCArray::count((cocos2d::CCArray *)result);
if ( (_DWORD)result )
{
for ( i = 0; ; ++i )
{
v6 = i >= (unsigned int)cocos2d::CCArray::count(v4);
result = (__int64)v4;
if ( v6 )
break;
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v4, i) + 72) == a3 )
return cocos2d::CCArray::removeObjectAtIndex(v4, i, 1);
}
}
}
}
return result;
}