//
// sub_10056DB60 from 0x10056db60 to 0x10056dbf0 (144 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
//
int __fastcall sub_10056DB60(__int64 a1, int a2)
{
_QWORD *v2; // r15
_QWORD *v3; // rax
__int64 v4; // r14
pthread_mutex_t *v5; // rbx
__int64 *v6; // r14
_QWORD *v7; // rax
__int64 v8; // rcx
v2 = operator new(0x10u);
v2[1] = 0;
*(_DWORD *)v2 = 3;
v3 = operator new(0x10u);
*(_OWORD *)v3 = 0;
*(_DWORD *)v3 = a2;
v3[1] = a1;
v2[1] = v3;
v4 = *(_QWORD *)(a1 + 136);
v5 = (pthread_mutex_t *)(v4 + 64);
pthread_mutex_lock((pthread_mutex_t *)(v4 + 64));
v6 = *(__int64 **)(v4 + 56);
v7 = operator new(0x18u);
v7[2] = v2;
v7[1] = v6;
v8 = *v6;
*v7 = *v6;
*(_QWORD *)(v8 + 8) = v7;
*v6 = (__int64)v7;
++v6[2];
return pthread_mutex_unlock(v5);
}