//
// sub_1800F8AF0 from 0x1800f8af0 to 0x1800f8b22 (50 bytes)
//
// 2 xrefs:
// > sub_1800EA910 @ 0x1800eaa33
// > sub_1800EB320 @ 0x1800eb680
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:24 +0000
//
__int64 __fastcall sub_1800F8AF0(unsigned int a1, int a2)
{
unsigned int v2; // r8d
v2 = a1;
if ( a2 == 4 )
return a1 & 3 | (a1 >> 2) & 0xC;
if ( a2 == 5 )
return a1 & 7 | (a1 >> 1) & 0x18;
return v2;
}