//
// sub_7057C from 0x7057c to 0x705f8 (124 bytes)
//
// 1 xrefs:
// > ??> @ 0x118940
//
// 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
//
// positive sp value has been detected, the output may be wrong!
void __fastcall sub_7057C(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)
{
float *v6; // x19
float *v7; // x20
int v8; // w21
__int64 v9; // x22
__int64 v10; // x23
__int64 v11; // x24
__int64 v12; // x25
__int64 v13; // x30
float v14; // s9
float v15; // s10
float v16; // s11
long double v17; // q12
__int64 v18; // x0
float v19; // s1
float v20; // s0
bool v21; // cc
float v22; // s0
float v23; // s3
float v24; // s0
float v25; // s1
float v26; // s0
v18 = ((__int64 (__fastcall *)(__int64, __int64, __int64, __int64, __int64, __int64, __int64))sub_707F4)(
a1,
a2,
a3,
a4,
a5,
a6,
v13);
while ( (int)v12 < v8 )
{
v19 = *v6;
v20 = *(float *)(v9 + 4 * v12) * *(float *)(v9 + 4 * v12);
v21 = v20 <= *v6;
v22 = v20 - *v7;
if ( v21 )
v23 = v15;
else
v23 = v16;
v24 = *v7 + (float)(v22 * v23);
*v7 = v24;
v25 = v19 + (float)((float)(v24 - v19) * v23);
v26 = *(float *)&v17;
*v6 = v25;
if ( v25 > v14 )
v26 = ((float (__fastcall *)(__int64, long double))sub_70868)(v18, v17) * *(float *)&v17;
*(float *)(v10 + 4 * v12) = *(float *)(v11 + 4 * v12) * v26;
++v12;
}
}