//
// sub_10038ED3C from 0x10038ed3c to 0x10038eddc (160 bytes)
//
// 2 xrefs:
// > sub_10038DCA0 @ 0x10038e4b0
// > sub_10038EDDC @ 0x10038ee3c
//
// 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:03:37 +0000
//
__int64 __fastcall sub_10038ED3C(__int64 a1)
{
_BOOL8 v2; // x20
__int64 v3; // x0
unsigned int v4; // w21
__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;
}
while ( v4 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) );
}
return (*(__int64 (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 1056) + 344LL))(*(_QWORD *)(a1 + 1056), v2);
}