//
// sub_A4278 from 0xa4278 to 0xa42ea (114 bytes)
//
// 1 xrefs:
// > sub_A4A52 @ 0xa4a58
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:41:34 +0000
//
int __fastcall sub_A4278(int a1, int a2, unsigned int a3)
{
unsigned int v3; // r1
int v4; // r1
float v5; // s0
unsigned int v6; // s2
bool v7; // cf
unsigned int v8; // r2
if ( a2 )
{
v3 = *(_DWORD *)(a1 + 1836);
if ( !v3 )
return 11;
}
else
{
v5 = *(float *)(a1 + 1828);
if ( v5 <= -80.0 )
{
v3 = *(_DWORD *)(a1 + 1836);
}
else
{
v6 = (unsigned int)(float)((float)((float)((float)(v5 * 0.000016667) + 0.0016667) * *(float *)(a1 + 1784))
* (float)*(int *)(a1 + 1832));
*(_DWORD *)(a1 + 1836) = v6;
v3 = v6;
}
}
v7 = v3 >= a3;
v8 = v3 - a3;
v4 = 0;
if ( !v7 )
v8 = 0;
*(_DWORD *)(a1 + 1836) = v8;
return v4;
}