//
// sub_18009B790 from 0x18009b790 to 0x18009b7d6 (70 bytes)
//
// 8 xrefs:
// > sub_180018DF0 @ 0x18001b859
// > sub_180018DF0 @ 0x18001b906
// > sub_180018DF0 @ 0x18001ba4f
// > sub_180020140 @ 0x180020d16
// > sub_180026050 @ 0x1800271fc
// > sub_1800364B0 @ 0x1800378ee
// > sub_18003DB30 @ 0x18003f053
// > sub_1800FC980 @ 0x1800fcd5d
//
// 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_18009B790(__int64 a1, char a2, char a3)
{
if ( a3 && a2 != ((*(_DWORD *)(a1 + 100) & 0x2000) != 0) )
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 168) + 67512LL) + 48LL) = 1;
if ( a2 )
_InterlockedOr((volatile signed __int32 *)(a1 + 100), 0x2000u);
else
_InterlockedAnd((volatile signed __int32 *)(a1 + 100), 0xFFFFDFFF);
return 0;
}