//
// sub_8E1A04 from 0x8e1a04 to 0x8e1a5c (88 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_8E1A04(int a1, int a2)
{
_DWORD *v2; // r7
char v4; // r4
int v5; // r5
unsigned int v6; // r6
v2 = (_DWORD *)(a1 & 0xFFFFFFFC);
v4 = 8 * (a1 & 3);
v5 = 0xFFFF << v4;
do
v6 = (*v2 & (unsigned int)v5) >> v4;
while ( MEMORY[0xFFFF0FC0](*v2, v5 & ((v6 ^ a2) << v4) | ~v5 & *v2, v2) );
return (__int16)v6;
}