//
// sub_80F818 from 0x80f818 to 0x80f83c (36 bytes)
//
// 2 xrefs:
// > pugi::xpath_variable_set::find @ 0x819244
// > pugi::xpath_variable_set::add @ 0x819274
//
// 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:36 +0000
//
unsigned int __fastcall sub_80F818(int a1)
{
int v1; // r0
unsigned int i; // r3
int v3; // r2
int v4; // t1
v1 = a1 - 1;
for ( i = 0; ; i = (1025 * (i + v3)) ^ ((1025 * (i + v3)) >> 6) )
{
v4 = *(unsigned __int8 *)++v1;
v3 = v4;
if ( !v4 )
break;
}
return 32769 * ((9 * i) ^ ((9 * i) >> 11));
}