//
// sub_1008ED5A0 from 0x1008ed5a0 to 0x1008ed63a (154 bytes)
//
// 1 xrefs:
// > EditorSoundConfigInfoLayer::FLAlert_Clicked @ 0x1008f9069
//
// 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_1008ED5A0(__int64 a1, int a2)
{
__int64 v3; // rdi
unsigned int v4; // eax
unsigned int v5; // r15d
__int64 v6; // rax
v3 = *(_QWORD *)(a1 + 152);
LOBYTE(v4) = v3 == 0;
if ( v3 != 0 && a2 > 0 )
{
v4 = sub_1007FEF90(v3);
if ( v4 )
{
v5 = 0;
while ( 1 )
{
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 152), v5);
if ( v6 )
{
if ( *(_DWORD *)(v6 + 320) == a2 )
break;
}
++v5;
v4 = sub_1007FEF90(*(_QWORD *)(a1 + 152));
if ( v5 >= v4 )
return v4;
}
LOBYTE(v4) = sub_1007FF150(*(_QWORD *)(a1 + 152), v5, 1);
}
}
return v4;
}