//
// sub_CA6DA from 0xca6da to 0xca77c (162 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:41:55 +0000
//
int __fastcall sub_CA6DA(int *a1, float *a2, __int64 *a3, int a4)
{
int v5; // r10
int v8; // r5
char *v9; // r6
int i; // r4
int v11; // r0
int j; // r1
int v13; // r2
float *v14; // r3
int v15; // r4
int v17; // [sp+0h] [bp-20h] BYREF
if ( a1[2] >= 1 )
{
v5 = *a1;
v8 = a4 / *a1;
v9 = (char *)&v17 - ((4 * v8 + 7) & 0xFFFFFFF8);
for ( i = 0; i < v8; ++i )
{
v11 = sub_CA5FC(a1, a3);
if ( v11 == -1 )
return -1;
v5 = *a1;
*(_DWORD *)&v9[4 * i] = a1[4] + 4 * *a1 * v11;
}
for ( j = 0; j < v5; ++j )
{
v13 = 0;
v14 = a2;
while ( v13 < v8 )
{
v15 = *(_DWORD *)&v9[4 * v13++];
*v14 = *v14 + *(float *)(v15 + 4 * j);
++v14;
}
a2 += v8;
}
}
return 0;
}