//
// sub_C653C from 0xc653c to 0xc6598 (92 bytes)
//
// 5 xrefs:
// > sub_C6598 @ 0xc6700
// > sub_C67CC @ 0xc6848
// > sub_C67CC @ 0xc6884
// > sub_C6E9C @ 0xc6ea8
// > sub_C6ED4 @ 0xc6edc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
float __fastcall sub_C653C(float *a1, int a2, char a3, float *a4)
{
float *v4; // x8
float v5; // s0
float v6; // s0
float v7; // s1
float v8; // s2
v4 = &a1[a2];
if ( (a3 & 1) == 0 )
{
if ( !a2 )
{
v5 = 0.0;
goto LABEL_8;
}
v6 = v4[229];
v7 = v4[230];
v8 = a1[161];
goto LABEL_6;
}
v5 = 0.0;
if ( a2 != 16 )
{
v6 = v4[231];
v7 = v4[230];
v8 = a1[160];
LABEL_6:
v5 = (float)(v6 - v7) * v8;
}
LABEL_8:
*a4 = v5;
return a1[163] + (float)(v4[230] * a1[137]);
}