//
// sub_6AED4 from 0x6aed4 to 0x6aeee (26 bytes)
//
// 5 xrefs:
// > sub_6ADD0 @ 0x6ae2a
// > sub_AC330 @ 0xac36e
// > sub_AC330 @ 0xac3ba
// > sub_AC330 @ 0xac402
// > sub_AC330 @ 0xac420
//
// 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_6AED4(int a1)
{
unsigned int v1; // r0
unsigned int v2; // r0
v1 = (a1 - 1) | ((unsigned int)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned int)(a1 - 1) >> 1)) >> 2);
v2 = v1 | (v1 >> 4) | ((v1 | (v1 >> 4)) >> 8);
return (v2 | HIWORD(v2)) + 1;
}