//
// sub_C4314 from 0xc4314 to 0xc438c (120 bytes)
//
// 1 xrefs:
// > sub_C4B28 @ 0xc4b2c
//
// 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 12:14:45 +0000
//
__int64 __fastcall sub_C4314(__int64 a1, int a2, unsigned int a3)
{
unsigned int v3; // w9
unsigned int v4; // w8
float v5; // s0
bool v6; // cf
unsigned int v7; // w9
if ( a2 )
{
v3 = *(_DWORD *)(a1 + 2084);
if ( !v3 )
return 11;
}
else
{
v5 = *(float *)(a1 + 2076);
if ( v5 <= -80.0 )
{
v3 = *(_DWORD *)(a1 + 2084);
}
else
{
v3 = (unsigned int)(float)((float)((float)(v5 * 0.000016667) + 0.0016667)
* (float)(*(float *)(a1 + 2032) * (float)*(int *)(a1 + 2080)));
*(_DWORD *)(a1 + 2084) = v3;
}
}
v6 = v3 >= a3;
v7 = v3 - a3;
v4 = 0;
if ( !v6 )
v7 = 0;
*(_DWORD *)(a1 + 2084) = v7;
return v4;
}