//
// sub_100570AC8 from 0x100570ac8 to 0x100570b44 (124 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:08:18 +0000
//
float __fastcall sub_100570AC8(int a1, float *a2, float a3)
{
float v3; // s1
int v4; // w9
float *v5; // x10
float v6; // s2
__int64 v7; // x12
float v8; // s4
float v9; // s5
int v10; // w13
__int64 v11; // x8
float result; // s0
v3 = 0.0;
if ( a1 >= 2 )
{
v4 = 0;
v5 = a2 + 1;
v6 = *a2;
v7 = (unsigned int)(a1 - 1);
do
{
v8 = *v5;
v9 = vabds_f32(*v5, v6);
if ( *v5 < v6 )
v10 = 1;
else
v10 = -1;
if ( v9 <= (float)(a3 * 0.5) )
v10 = 0;
*(v5 - 1) = v6 + (float)(a3 * (float)v4);
v4 += v10;
++v5;
v6 = v8;
--v7;
}
while ( v7 );
v3 = (float)v4;
}
v11 = a1 - 1;
result = a2[v11] + (float)(a3 * v3);
a2[v11] = result;
return result;
}