//
// sub_1008ED1A0 from 0x1008ed1a0 to 0x1008ed22a (138 bytes)
//
// 3 xrefs:
// > sub_1008F6E60 @ 0x1008f6eb8
// > EditorSoundConfigInfoLayer::FLAlert_Clicked @ 0x1008f9235
// > EditorSoundConfigInfoLayer::deleteEditorSoundFinished @ 0x1008f9a3c
//
// This function is hookable on this platform (idp: pc, 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 12:37:54 +0000
//
char __fastcall sub_1008ED1A0(__int64 a1, int a2)
{
unsigned int v2; // eax
__int64 v4; // rdi
unsigned int v5; // r15d
__int64 v6; // rax
v4 = *(_QWORD *)(a1 + 144);
if ( v4 )
{
v2 = sub_1007FEF90(v4);
if ( v2 )
{
v5 = 0;
while ( 1 )
{
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 144), v5);
if ( v6 )
{
if ( *(_DWORD *)(v6 + 316) == a2 )
break;
}
++v5;
v2 = sub_1007FEF90(*(_QWORD *)(a1 + 144));
if ( v5 >= v2 )
return v2;
}
LOBYTE(v2) = sub_1007FF150(*(_QWORD *)(a1 + 144), v5, 1);
}
}
return v2;
}