//
// 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 (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:13 +0000
//
__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;
}