//
// SFXBrowser::onSearch from 0xa5f8f4 to 0xa5fa1c (296 bytes)
//
// 3 xrefs:
// > ??> @ 0x5ab40
// > sub_A5DEA4 @ 0xa5e9ec
// > ??> @ 0x122aec8
//
// 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 SFXBrowser::onSearch(SFXBrowser *a1, cocos2d::CCObject *a2)
{
SetTextPopup *v3; // x21
void *v4; // x0
int v5; // w0
SetTextPopup_vtbl *v6; // x1
unsigned int *v7; // x2
int v8; // w1
__int64 v9; // [xsp+40h] [xbp+40h] BYREF
if ( a1->m_searchResult )
{
sub_D18D28(&v9);
v3 = SearchSFXPopup::create();
v4 = (void *)(v9 - 24);
if ( (__int64 *)(v9 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *(_DWORD *)(v9 - 8);
*(_DWORD *)(v9 - 8) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v4);
}
v3->m_delegate = &a1->SetTextPopupDelegate;
v5 = a1->getZOrder(a1);
v6 = v3->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v3->m_ZOrder = v5 + 1;
v6->show(v3);
}
}