//
// sub_8E24FC from 0x8e24fc to 0x8e2550 (84 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_8E24FC(int a1, int a2)
{
char v2; // r5
_DWORD *v3; // r7
int v4; // r9
int v5; // r6
v2 = 8 * (a1 & 3);
v3 = (_DWORD *)(a1 & 0xFFFFFFFC);
v4 = (0xFFFF << v2) & (a2 << v2);
do
v5 = *v3;
while ( MEMORY[0xFFFF0FC0](*v3, ~(0xFFFF << v2) & *v3 | v4, v3) );
return (__int16)((v5 & (unsigned int)(0xFFFF << v2)) >> v2);
}