//
// sub_10042ECF8 from 0x10042ecf8 to 0x10042edcc (212 bytes)
//
// 1 xrefs:
// > sub_1004E6644 @ 0x1004e67f4
//
// 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
//
__int64 __fastcall sub_10042ECF8(unsigned int *a1, __int64 a2, int a3, int a4, int *a5, int a6)
{
int v7; // w23
int v8; // w24
int v12; // w25
__int64 result; // x0
__int64 v14; // x8
float *v15; // x9
float v16; // t1
if ( (int)a1[2] < 1 )
return 0;
v7 = a3 / a4;
v8 = (a6 + a3) / a4;
if ( a3 / a4 >= v8 )
return 0;
v12 = 0;
while ( 1 )
{
result = sub_10042E648((__int64)a1, a5);
if ( (_DWORD)result == -1 )
break;
v14 = *a1;
if ( (int)v14 >= 1 )
{
v15 = (float *)(*((_QWORD *)a1 + 3) + 4LL * (int)v14 * (int)result);
do
{
v16 = *v15++;
*(float *)(*(_QWORD *)(a2 + 8LL * v12) + 4LL * v7) = v16 + *(float *)(*(_QWORD *)(a2 + 8LL * v12) + 4LL * v7);
if ( v12 + 1 == a4 )
{
++v7;
v12 = 0;
}
else
{
++v12;
}
--v14;
}
while ( v14 );
}
if ( v7 >= v8 )
return 0;
}
return result;
}