//
// sub_1005B1D0C from 0x1005b1d0c to 0x1005b1d5c (80 bytes)
//
// 0 xrefs:
//
// 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:11 +0000
//
__int64 __fastcall sub_1005B1D0C(__int64 a1, int a2, unsigned int a3)
{
float v3; // s0
unsigned int v5; // w9
bool v6; // cf
unsigned int v7; // w9
v3 = *(float *)(a1 + 628);
if ( v3 < 0.0 )
return 0;
if ( a2 )
{
v5 = *(_DWORD *)(a1 + 624);
if ( !v5 )
return 11;
}
else
{
v5 = (unsigned int)(float)(v3 * (float)*(int *)(*(_QWORD *)(a1 + 168) + 1744LL));
}
v6 = v5 >= a3;
v7 = v5 - a3;
if ( !v6 )
v7 = 0;
*(_DWORD *)(a1 + 624) = v7;
return 0;
}