//
// sub_1005D9CC8 from 0x1005d9cc8 to 0x1005d9d24 (92 bytes)
//
// 4 xrefs:
// > sub_100588574 @ 0x100588600
// > sub_100592F4C @ 0x100592fd8
// > sub_1005A1984 @ 0x1005a1a10
// > sub_1005A7050 @ 0x1005a70d8
//
// This function is hookable on this platform (idp: arm, 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 11:09:36 +0000
//
__int64 __fastcall sub_1005D9CC8(__int64 a1, float a2)
{
int v2; // w8
float v3; // s0
*(float *)(a1 + 3028) = a2;
v2 = *(_DWORD *)(a1 + 3060);
if ( v2 <= 1 )
v2 = 1;
*(_DWORD *)(a1 + 3060) = v2;
v3 = (float)((float)((float)v2 + (float)v2) / 5.0) * a2;
if ( v3 >= 0.01 )
*(_DWORD *)(a1 + 2132) = (int)(float)((float)*(int *)(*(_QWORD *)(a1 + 8) + 16LL) / v3);
return 0;
}