//
// sub_1001F6DF0 from 0x1001f6df0 to 0x1001f6f10 (288 bytes)
//
// 2 xrefs:
// > sub_1001F467C @ 0x1001f4820
// > SFXBrowser::FLAlert_Clicked @ 0x1001f7810
//
// 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:40 +0000
//
__int64 __fastcall sub_1001F6DF0(__int64 a1)
{
_QWORD *v2; // x21
_QWORD *v3; // x20
__int64 v4; // x0
_QWORD *v5; // x9
_QWORD *v6; // x8
bool v7; // zf
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x20
__int64 v12; // x0
__int64 v13; // x0
__int64 CustomSFXRoot; // x1
__int64 v15; // x20
__int64 v16; // x0
v2 = *(_QWORD **)(a1 + 1000);
v3 = (_QWORD *)(a1 + 1008);
if ( v2 != (_QWORD *)(a1 + 1008) )
{
do
{
v4 = MusicDownloadManager::sharedState();
sub_1001D8378(v4, *((_DWORD *)v2 + 7));
v5 = (_QWORD *)v2[1];
if ( v5 )
{
do
{
v6 = v5;
v5 = (_QWORD *)*v5;
}
while ( v5 );
}
else
{
do
{
v6 = (_QWORD *)v2[2];
v7 = *v6 == (_QWORD)v2;
v2 = v6;
}
while ( !v7 );
}
v2 = v6;
}
while ( v6 != v3 );
}
sub_1000187C4(a1 + 1000, *(_QWORD **)(a1 + 1008));
*(_QWORD *)(a1 + 1000) = v3;
*(_OWORD *)(a1 + 1008) = 0u;
if ( *(int *)(a1 + 1024) > 0 )
{
v8 = MusicDownloadManager::sharedState();
if ( !sub_1001D6764(v8, *(_DWORD *)(a1 + 1024)) )
*(_DWORD *)(a1 + 1024) = 0;
}
v9 = *(_QWORD *)(a1 + 712);
if ( v9 )
{
v10 = sub_1001E5124(v9);
if ( v10 )
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 712) + 140LL) == 4 )
{
v11 = v10;
v12 = MusicDownloadManager::sharedState();
if ( sub_1001D6764(v12, *(_DWORD *)(v11 + 76)) != v11 )
{
v13 = MusicDownloadManager::sharedState();
CustomSFXRoot = sub_1001D6784(v13, *(_DWORD *)(v11 + 60));
v15 = *(_QWORD *)(a1 + 712);
if ( !CustomSFXRoot )
{
v16 = MusicDownloadManager::sharedState();
CustomSFXRoot = MusicDownloadManager::getCustomSFXRoot(v16);
}
sub_1001E50CC(v15, CustomSFXRoot);
*(_DWORD *)(*(_QWORD *)(a1 + 712) + 96LL) = 0;
}
}
}
}
return FLAlertLayer::requestRebuild(a1);
}