//
// sub_100223278 from 0x100223278 to 0x100223318 (160 bytes)
//
// 2 xrefs:
// > sub_100221F74 @ 0x10022279c
// > sub_100223318 @ 0x100223378
//
// 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:01:09 +0000
//
__int64 __fastcall sub_100223278(__int64 a1)
{
_BOOL8 v2; // x20
__int64 v3; // x0
__int64 v4; // x21
__int64 v5; // x0
if ( sub_10004BBD8(*(_DWORD *)(a1 + 1048)) )
goto LABEL_2;
v3 = *(_QWORD *)(a1 + 688);
if ( !v3 || !(unsigned int)sub_1002E757C(v3) )
{
v2 = 0;
return (*(__int64 (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 1056) + 344LL))(*(_QWORD *)(a1 + 1056), v2);
}
if ( !(unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) )
{
LABEL_2:
v2 = 1;
}
else
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 688), v4);
v2 = sub_10004BBD8(*(_DWORD *)(v5 + 1496));
if ( !v2 )
break;
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) );
}
return (*(__int64 (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 1056) + 344LL))(*(_QWORD *)(a1 + 1056), v2);
}