//
// sub_10004C07C from 0x10004c07c to 0x10004c0f8 (124 bytes)
//
// 5 xrefs:
// > EnterEffectInstance::animateValue @ 0x10004bdbc
// > CustomSongWidget::loadSongInfoFinished @ 0x1000fdf68
// > CustomSongWidget::loadSongInfoFailed @ 0x1000fe008
// > GameManager::unloadIcon @ 0x100317ecc
// > SelectEventLayer::onCustomToggleTriggerValue @ 0x1004090cc
//
// 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 sub_10004C07C(_QWORD *a1, int *a2)
{
__int64 v2; // x10
int v3; // w9
_QWORD *v4; // x19
v2 = a1[1];
if ( !v2 )
return 0;
v3 = *a2;
v4 = a1 + 1;
do
{
if ( *(_DWORD *)(v2 + 28) >= v3 )
v4 = (_QWORD *)v2;
v2 = *(_QWORD *)(v2 + 8LL * (*(_DWORD *)(v2 + 28) < v3));
}
while ( v2 );
if ( v4 == a1 + 1 || v3 < *((_DWORD *)v4 + 7) )
return 0;
sub_10001BDC0(a1, v4);
operator delete(v4);
return 1;
}