//
// sub_1005C616C from 0x1005c616c to 0x1005c61e8 (124 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009da4c8
//
// 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:25 +0000
//
__int64 __fastcall sub_1005C616C(__int64 *a1, int a2, unsigned int a3)
{
__int64 v3; // x8
unsigned int v4; // w9
__int64 result; // x0
float v6; // s0
bool v7; // cf
unsigned int v8; // w9
v3 = *a1;
if ( a2 )
{
v4 = *(_DWORD *)(v3 + 2076);
if ( !v4 )
return 11;
}
else
{
v6 = *(float *)(v3 + 2068);
if ( v6 <= -80.0 )
v4 = *(_DWORD *)(v3 + 2076);
else
v4 = (unsigned int)(float)((float)((float)((float)(v6 + 100.0) * *(float *)(v3 + 2024)) * 0.000016667)
* (float)*(int *)(v3 + 2072));
}
result = 0;
v7 = v4 >= a3;
v8 = v4 - a3;
if ( !v7 )
v8 = 0;
*(_DWORD *)(v3 + 2076) = v8;
return result;
}