//
// sub_BE1F2 from 0xbe1f2 to 0xbe220 (46 bytes)
//
// 2 xrefs:
// > sub_BE220 @ 0xbe236
// > sub_BE220 @ 0xbe25a
//
// 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_BE1F2(char a1)
{
int result; // r0
int v2; // r1
if ( (a1 & 0x80) == 0 )
return 1;
if ( (a1 & 0xE0) == 0xC0 )
return 2;
if ( (a1 & 0xF0) == 0xE0 )
return 3;
v2 = a1 & 0xF8;
result = 1;
if ( v2 == 240 )
return 4;
return result;
}