//
// sub_811418 from 0x811418 to 0x81143c (36 bytes)
//
// 3 xrefs:
// > sub_811818 @ 0x811844
// > sub_81406C @ 0x81429a
// > sub_81AD98 @ 0x81ada6
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:37 +0000
//
int __fastcall sub_811418(unsigned int *a1, int a2)
{
unsigned int v2; // r5
unsigned int *v3; // r4
int result; // r0
unsigned int v5; // r1
unsigned int v6; // t1
v2 = (unsigned int)&a1[a2];
v3 = a1;
result = 0;
while ( (unsigned int)v3 < v2 )
{
v6 = *v3++;
v5 = v6;
if ( v6 >= 0x10000 )
result += 4;
else
result = sub_80F588(result, v5);
}
return result;
}