//
// sub_1800DA0F0 from 0x1800da0f0 to 0x1800da157 (103 bytes)
//
// 5 xrefs:
// > sub_1800D9EB0 @ 0x1800d9fc6
// > sub_1800D9EB0 @ 0x1800d9fba
// > ??> @ 0x18016ce68
// > ??> @ 0x1801ff1ec
// > ??> @ 0x1801ff1f8
//
// 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_1800DA0F0(__int64 a1)
{
struct _RTL_CRITICAL_SECTION *v1; // rbp
_QWORD **v2; // rsi
_QWORD *v3; // rbx
unsigned int v4; // edi
v1 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 64);
v2 = (_QWORD **)(a1 + 16);
FMOD_OS_CriticalSection_Enter(v1);
v3 = *v2;
if ( *v2 == v2 )
{
LABEL_4:
v4 = 0;
}
else
{
while ( 1 )
{
v4 = sub_1801122A0(v3);
if ( v4 )
break;
v3 = (_QWORD *)*v3;
if ( v3 == v2 )
goto LABEL_4;
}
}
FMOD_OS_CriticalSection_Leave(v1);
return v4;
}