//
// sub_10059B9B0 from 0x10059b9b0 to 0x10059ba64 (180 bytes)
//
// 1 xrefs:
// > sub_10059AF50 @ 0x10059b144
//
// 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 12:32:31 +0000
//
__int64 __fastcall sub_10059B9B0(__int64 a1, double a2, double a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // rax
__int64 v5; // r15
pthread_mutex_t *v6; // r14
__int64 *v7; // r15
_QWORD *v8; // rax
__int64 v9; // rcx
v3 = operator new(0x10u);
v3[1] = 0;
*(_DWORD *)v3 = 2;
v4 = operator new(0x10u);
*(_OWORD *)v4 = 0;
*(_DWORD *)v4 = (int)(a3 / a2 * 100.0);
v4[1] = a1;
v3[1] = v4;
v5 = *(_QWORD *)(a1 + 136);
v6 = (pthread_mutex_t *)(v5 + 64);
pthread_mutex_lock((pthread_mutex_t *)(v5 + 64));
v7 = *(__int64 **)(v5 + 56);
v8 = operator new(0x18u);
v8[2] = v3;
v8[1] = v7;
v9 = *v7;
*v8 = *v7;
*(_QWORD *)(v9 + 8) = v8;
*v7 = (__int64)v8;
++v7[2];
pthread_mutex_unlock(v6);
return 0;
}