//
// LevelSearchLayer::onSearch from 0x1000534a8 to 0x1000535b0 (264 bytes)
//
// 1 xrefs:
// > LevelSearchLayer::init @ 0x100051d54
//
// 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
//
void __fastcall LevelSearchLayer::onSearch(LevelSearchLayer *a1, cocos2d::CCObject *a2)
{
_BOOL4 v3; // w0
cocos2d::CCObject *v4; // x1
_BOOL4 v5; // w20
GJSearchObject *SearchObject; // x20
cocos2d::CCDirector *v7; // x19
cocos2d::CCScene *v8; // x0
cocos2d::CCTransitionFade *v9; // x0
void *v10[2]; // [xsp+0h] [xbp-60h] BYREF
__int64 v11; // [xsp+10h] [xbp-50h]
void *__p[2]; // [xsp+20h] [xbp-40h] BYREF
char v13; // [xsp+37h] [xbp-29h]
__int128 v14; // [xsp+38h] [xbp-28h] BYREF
__int64 v15; // [xsp+48h] [xbp-18h]
((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_searchInput->onClickTrackNode)(a1->m_searchInput, 0);
CCTextInputNode::getString(&v14, a1->m_searchInput);
sub_100009900(__p, "");
v3 = sub_1000045BC(&v14, __p);
v5 = v3;
if ( v13 < 0 )
{
operator delete(__p[0]);
if ( v5 )
goto LABEL_3;
}
else if ( v3 )
{
LABEL_3:
LevelSearchLayer::onMostLikes(a1, v4);
goto LABEL_11;
}
if ( SHIBYTE(v15) < 0 )
{
sub_1000097D0(v10, (void *)v14, *((unsigned __int64 *)&v14 + 1));
}
else
{
*(_OWORD *)v10 = v14;
v11 = v15;
}
SearchObject = (GJSearchObject *)LevelSearchLayer::getSearchObject(a1, 0, v10);
if ( SHIBYTE(v11) < 0 )
operator delete(v10[0]);
v7 = cocos2d::CCDirector::sharedDirector();
v8 = LevelBrowserLayer::scene(SearchObject);
v9 = cocos2d::CCTransitionFade::create_1(0.5, v8);
cocos2d::CCDirector::pushScene(v7, v9);
LABEL_11:
if ( SHIBYTE(v15) < 0 )
operator delete((void *)v14);
}