//
// sub_D1DF74 from 0xd1df74 to 0xd1e034 (192 bytes)
//
// 0 xrefs:
//
// 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
//
const wchar_t **__usercall sub_D1DF74@(_QWORD *a1@, const wchar_t **a2@, const wchar_t **a3@)
{
_QWORD *v3; // x0
int v5; // w2
unsigned int *v8; // x1
unsigned int v9; // w2
char v10; // [xsp+28h] [xbp+28h] BYREF
v3 = (_QWORD *)*a1;
v5 = *((_DWORD *)v3 - 2);
if ( v5 < 0 )
{
v3 = sub_D1DB18((__int64)(v3 - 3), (__int64)&v10, 0);
}
else if ( v3 - 3 != &qword_124B6D0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v3 - 1);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 + 1, v8) );
}
else
{
*((_DWORD *)v3 - 2) = v5 + 1;
}
}
*a3 = (const wchar_t *)v3;
sub_D1D2E0(a3, a2);
return a3;
}