//
// sub_1004F5EB4 from 0x1004f5eb4 to 0x1004f5f28 (116 bytes)
//
// 5 xrefs:
// > sub_1004F5594 @ 0x1004f55bc
// > sub_1004F5648 @ 0x1004f5664
// > sub_1004F5774 @ 0x1004f5794
// > sub_1004F5B2C @ 0x1004f5b40
// > sub_1004F6C3C @ 0x1004f6c70
//
// 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:47 +0000
//
__int64 __fastcall sub_1004F5EB4(__int64 a1)
{
__int64 v2; // x0
signed int v3; // w21
__int64 v4; // x20
v2 = *(_QWORD *)(a1 + 800);
if ( !v2 || (int)sub_1002E757C(v2) < 1 )
return 0;
v3 = 0;
LODWORD(v4) = 0;
do
v4 = (unsigned int)v4 + *(unsigned __int8 *)(sub_1002E75A0(*(_QWORD *)(a1 + 800), v3++) + 304);
while ( v3 < (int)sub_1002E757C(*(_QWORD *)(a1 + 800)) );
return v4;
}