//
// sub_1004CB110 from 0x1004cb110 to 0x1004cb1a0 (144 bytes)
//
// 1 xrefs:
// > EditorSoundConfigInfoLayer::FLAlert_Clicked @ 0x1004d3e88
//
// 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:06:25 +0000
//
__int64 __fastcall sub_1004CB110(__int64 result, int a2)
{
__int64 v2; // x19
__int64 v4; // x21
__int64 v5; // x0
if ( a2 >= 1 )
{
v2 = result;
result = *(_QWORD *)(result + 152);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v4 = 0;
while ( 1 )
{
v5 = sub_1002E75A0(*(_QWORD *)(v2 + 152), v4);
if ( v5 )
{
if ( *(_DWORD *)(v5 + 320) == a2 )
break;
}
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(*(_QWORD *)(v2 + 152));
if ( (unsigned int)v4 >= (unsigned int)result )
return result;
}
return sub_1002E7664(*(_QWORD *)(v2 + 152), v4, 1);
}
}
}
return result;
}