//
// sub_8E1F6C from 0x8e1f6c to 0x8e1fcc (96 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_8E1F6C(int a1, int a2)
{
char v2; // r5
_DWORD *v3; // r7
int v4; // r4
unsigned int v6; // r6
v2 = 8 * (a1 & 3);
v3 = (_DWORD *)(a1 & 0xFFFFFFFC);
v4 = 0xFFFF << v2;
do
v6 = v4 & ((a2 & ((*v3 & (unsigned int)v4) >> v2)) << v2) | ~(0xFFFF << v2) & *v3;
while ( MEMORY[0xFFFF0FC0]() );
return (__int16)((v6 & v4) >> v2);
}