//
// sub_1001AD578 from 0x1001ad578 to 0x1001ad5ec (116 bytes)
//
// 5 xrefs:
// > SetupTriggerPopup::createMultiTriggerItems @ 0x1001ad168
// > sub_1001AD758 @ 0x1001ad784
// > sub_1001AD7C8 @ 0x1001ad7f4
// > sub_10045A37C @ 0x10045b830
// > sub_10049E474 @ 0x10049f254
//
// 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:06 +0000
//
__int64 __fastcall sub_1001AD578(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x20
__int64 v4; // x0
char v5; // w8
result = *(_QWORD *)(a1 + 720);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v3 = 0;
do
{
v4 = sub_1002E75A0(*(_QWORD *)(a1 + 720), v3);
if ( (*(_BYTE *)(a1 + 697) & 1) != 0 )
v5 = 1;
else
v5 = *(_BYTE *)(a1 + 696);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, v5 & 1);
v3 = (unsigned int)(v3 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 720));
}
while ( (unsigned int)v3 < (unsigned int)result );
}
}
return result;
}