//
// sub_1800D59D0 from 0x1800d59d0 to 0x1800d5a27 (87 bytes)
//
// 4 xrefs:
// > sub_180018CF0 @ 0x180018d86
// > sub_180025F50 @ 0x180025fe6
// > sub_1800363B0 @ 0x180036446
// > sub_18003D900 @ 0x18003d996
//
// 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:11 +0000
//
__int64 __fastcall sub_1800D59D0(__int64 a1, float a2)
{
int v2; // eax
float v3; // xmm2_4
v2 = *(_DWORD *)(a1 + 3060);
*(float *)(a1 + 3028) = a2;
if ( v2 < 1 )
v2 = 1;
*(_DWORD *)(a1 + 3060) = v2;
v3 = (float)((float)v2 * 0.40000001) * a2;
if ( v3 >= 0.0099999998 )
*(_DWORD *)(a1 + 2132) = (int)(float)((float)*(int *)(*(_QWORD *)(a1 + 8) + 16LL) / v3);
return 0;
}