//
// sub_CA954 from 0xca954 to 0xca9e4 (144 bytes)
//
// 1 xrefs:
// > sub_CCF60 @ 0xcd066
//
// 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_CA954(int *a1, int a2, int a3, int a4, __int64 *a5, int a6)
{
int v9; // r6
int v10; // r10
int v11; // r5
int v12; // r0
int v13; // r1
float *v14; // r0
int v15; // r2
float v16; // s2
float *v17; // r3
int v18; // r3
if ( a1[2] >= 1 )
{
v9 = a3 / a4;
v10 = (a6 + a3) / a4;
v11 = 0;
while ( v9 < v10 )
{
v12 = sub_CA5FC(a1, a5);
if ( v12 == -1 )
return -1;
v13 = *a1;
v14 = (float *)(a1[4] + 4 * v12 * *a1);
v15 = 0;
while ( v15 < v13 )
{
++v15;
v16 = *v14++;
v17 = (float *)(*(_DWORD *)(a2 + 4 * v11) + 4 * v9);
*v17 = *v17 + v16;
v18 = v11 + 1;
if ( v11 + 1 == a4 )
++v9;
v11 = v18 - a4;
if ( v18 != a4 )
v11 = v18;
}
}
}
return 0;
}