//
// sub_10000D888 from 0x10000d888 to 0x10000d8f8 (112 bytes)
//
// 3 xrefs:
// > sub_100010160 @ 0x1000101bc
// > sub_100010160 @ 0x100010278
// > sub_100014740 @ 0x100014968
//
// 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 10:57:15 +0000
//
__int64 __fastcall sub_10000D888(__int64 result, float a2)
{
float v2; // s0
float v3; // s0
float v4; // s1
float v5; // s2
float v6; // s3
float v7; // s4
if ( (*(_BYTE *)result & 1) == 0 )
{
v2 = *(float *)(result + 16) + a2;
*(float *)(result + 16) = v2;
v3 = v2 + *(float *)(result + 68);
v4 = *(float *)(result + 4);
if ( v3 >= v4 )
{
v6 = *(float *)(result + 8);
v5 = 1.0;
if ( (float)(v4 + v6) < v3 )
{
v7 = *(float *)(result + 12);
v5 = 0.0;
if ( v7 > 0.0 )
v5 = 1.0 - (float)((float)((float)(v3 - v4) - v6) / v7);
}
}
else
{
v5 = v3 / v4;
}
*(float *)(result + 24) = v5;
}
return result;
}