//
// sub_BA4CAC from 0xba4cac to 0xba4cfc (80 bytes)
//
// 9 xrefs:
// > sub_B7D4C8 @ 0xb7d5bc
// > sub_B97550 @ 0xb97804
// > sub_BA32E4 @ 0xba3360
// > sub_BA32E4 @ 0xba3818
// > sub_BA3884 @ 0xba392c
// > sub_BA3884 @ 0xba3990
// > sub_BA3884 @ 0xba3ae8
// > sub_BA3884 @ 0xba3b74
// > sub_BA3884 @ 0xba4168
//
// 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
//
__int64 __fastcall sub_BA4CAC(int a1, int a2)
{
int v4; // w2
__int64 v5; // x2
v4 = fcntl(a1, 3, 0);
if ( a2 )
v5 = v4 | 0x800u;
else
v5 = v4 & 0xFFFFF7FF;
return fcntl(a1, 4, v5);
}