//
// GJSmartTemplate::getPrefabWithID from 0x1403b9970 to 0x1403b9a2a (186 bytes)
//
// 5 xrefs:
// > EditorUI::createPrefab @ 0x1401b766b
// > BrowseSmartKeyLayer::onButton @ 0x1405f1a58
// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1405f1ef8
// > BrowseSmartKeyLayer::updateChanceValues @ 0x1405f2047
// > ??> @ 0x140923d68
//
// 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:31:26 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCObject *__fastcall GJSmartTemplate::getPrefabWithID(__int64 a1, __int64 a2, int a3)
{
cocos2d::CCArray *v5; // rax
cocos2d::CCArray *v6; // rdi
unsigned int v7; // ebx
struct cocos2d::CCObject *v8; // rsi
if ( a3 > 0
&& (v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 56), a2), (v6 = v5) != nullptr)
&& cocos2d::CCArray::count(v5)
&& (v7 = 0, cocos2d::CCArray::count(v6)) )
{
while ( 1 )
{
v8 = cocos2d::CCArray::objectAtIndex(v6, v7);
if ( *((_DWORD *)v8 + 30) == a3 )
break;
if ( ++v7 >= cocos2d::CCArray::count(v6) )
goto LABEL_7;
}
sub_14003D310(a2);
return v8;
}
else
{
LABEL_7:
sub_14003D310(a2);
return nullptr;
}
}