//
// CustomSongLayer::onSearch from 0x1001c32bc to 0x1001c3388 (204 bytes)
//
// 1 xrefs:
// > CustomSongLayer::init @ 0x1001c2f9c
//
// This function is hookable on this platform (idp: arm, 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:00:16 +0000
//
void __fastcall CustomSongLayer::onSearch(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
_QWORD *v4; // x0
void **v5; // x0
__int64 v6; // x0
__int64 v7; // x20
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v12; // [xsp+1Fh] [xbp-11h]
v2 = GameManager::sharedState(a1);
GameManager::getGameVariable(v2, "0051");
if ( (v3 & 1) != 0 )
{
v4 = (_QWORD *)FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v4, 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 1160LL))(*(_QWORD *)(a1 + 688), 0);
CCTextInputNode::getString(__p);
if ( v12 >= 0 )
v5 = __p;
else
v5 = (void **)__p[0];
v6 = atoi((const char *)v5);
v7 = *(_QWORD *)(a1 + 696);
v8 = SongInfoObject::create_1(v6);
CustomSongWidget::updateSongObject(v7, v8);
CustomSongWidget::getSongInfoIfUnloaded(*(_QWORD *)(a1 + 696));
if ( v12 < 0 )
operator delete(__p[0]);
}
else
{
v9 = GameManager::sharedState(v3);
v10 = GameManager::setGameVariable(v9, "0051", 1);
CustomSongLayer::showNewgroundsMessage(v10);
}
}