//
// sub_60AD4 from 0x60ad4 to 0x60b04 (48 bytes)
//
// 2 xrefs:
// > sub_99B7C @ 0x99d80
// > sub_9A3FC @ 0x9a436
//
// 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
//
unsigned int __fastcall sub_60AD4(unsigned int result, int a2)
{
int v2; // r1
int v3; // r2
int v4; // r0
if ( a2 == 5 )
{
v2 = (result >> 1) & 0x10;
v3 = (result >> 1) & 8;
v4 = result & 7;
}
else
{
if ( a2 != 4 )
return result;
v2 = (result >> 2) & 8;
v3 = (result >> 2) & 4;
v4 = result & 3;
}
return v4 + v3 + v2;
}