//
// sub_6D3CC from 0x6d3cc to 0x6d5ac (480 bytes)
//
// 1 xrefs:
// > ??> @ 0x6d3ca
//
// 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
//
float *__fastcall sub_6D3CC(
int a1,
int a2,
float *a3,
int a4,
int a5,
int a6,
int a7,
int a8,
int a9,
float a10,
float a11,
float a12)
{
int v12; // r9
int v13; // r1
int i; // r2
float *v15; // r6
_DWORD *v16; // r8
float v17; // s22
int v18; // r0
float v19; // s22
float v20; // r0
int v21; // r1
float v22; // s22
int v23; // r0
float v24; // s22
float v25; // r0
float *v26; // r10
int v27; // r1
float v28; // s22
float v29; // r0
float v30; // s22
float v31; // r0
_DWORD *v32; // r6
int v33; // r1
float v34; // s22
float v35; // r0
float v36; // s22
float v37; // r0
float *result; // r0
int v39; // r4
int j; // r10
float v41; // s22
int v42; // r0
float v43; // s22
float v44; // s0
int v46; // [sp+4h] [bp-64h]
int v49; // [sp+10h] [bp-58h]
int v50; // [sp+14h] [bp-54h]
int v51; // [sp+18h] [bp-50h]
int v52; // [sp+1Ch] [bp-4Ch]
int v53; // [sp+20h] [bp-48h]
int v54; // [sp+24h] [bp-44h]
v12 = a4;
v54 = a9 + 16 * a5;
v52 = a8 + 16 * a5;
v53 = a7 + 16 * a5;
v51 = a6 + 16 * a5;
v13 = (int)a3 >> 2;
v46 = 16 * a4;
for ( i = 0; ; i = v49 + v46 )
{
v15 = (float *)(a1 + i);
v16 = (_DWORD *)(a2 + i);
if ( !v13 )
break;
v50 = v13;
v49 = i;
v17 = COERCE_FLOAT(((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v51, *v16)) * a10;
v18 = ((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v52, *v16);
v19 = v17 - (float)(COERCE_FLOAT(((int (__fastcall *)(int, int))sub_6D5B0)(v53, v18)) * a11);
v20 = COERCE_FLOAT(((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v54, *v16));
v21 = v16[v12];
*v15 = v19 + (float)(v20 * a12);
v22 = COERCE_FLOAT(((int (__fastcall *)(int, int))sub_6D5B0)(v51, v21)) * a10;
v23 = ((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v52, v16[v12]);
v24 = v22 - (float)(COERCE_FLOAT(((int (__fastcall *)(int, int))sub_6D5B0)(v53, v23)) * a11);
v25 = sub_6D5B0(v54, v16[v12]);
v26 = &v15[v12];
v27 = v16[v12 + v12];
*v26 = v24 + (float)(v25 * a12);
v28 = sub_6D5B0(v51, v27) * a10;
v29 = sub_6D5B0(v52, v16[v12 + v12]);
v30 = v28 - (float)(sub_6D5B0(v53, LODWORD(v29)) * a11);
v31 = sub_6D5B0(v54, v16[v12 + v12]);
v32 = &v16[v12 + v12];
v33 = v32[v12];
v26[v12] = v30 + (float)(v31 * a12);
v34 = sub_6D5B0(v51, v33) * a10;
v35 = sub_6D5B0(v52, v32[v12]);
v36 = v34 - (float)(sub_6D5B0(v53, LODWORD(v35)) * a11);
v37 = sub_6D5B0(v54, v32[v12]);
v13 = v50 - 1;
v26[v12 + v12] = v36 + (float)(v37 * a12);
}
result = a3;
v39 = 0;
for ( j = (unsigned __int8)a3 & 3; j; --j )
{
v41 = COERCE_FLOAT(((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v51, *(_DWORD *)((char *)v16 + v39))) * a10;
v42 = ((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v52, *(_DWORD *)((char *)v16 + v39));
v43 = v41 - (float)(COERCE_FLOAT(((int (__fastcall *)(int, int))sub_6D5B0)(v53, v42)) * a11);
v44 = COERCE_FLOAT(((int (__fastcall *)(int, _DWORD))sub_6D5B0)(v54, *(_DWORD *)((char *)v16 + v39)));
result = (float *)((char *)v15 + v39);
v39 += v12 * 4;
*result = v43 + (float)(v44 * a12);
}
return result;
}