//
// sub_F8044 from 0xf8044 to 0xf8230 (492 bytes)
//
// 1 xrefs:
// > sub_F8320 @ 0xf84ac
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:15:08 +0000
//
__int64 __fastcall sub_F8044(__int64 a1, int *a2, int a3, __int64 a4)
{
float v8; // s8
float v9; // s9
__int64 v10; // x0
__int64 v11; // x21
int v12; // w8
__int64 v13; // x9
__int64 v14; // x8
int v15; // w10
__int64 v16; // x12
__int64 v17; // x11
float v18; // s0
float v19; // s1
__int64 v20; // x16
signed int v22; // w0
__int64 v23; // x9
__int64 v24; // x8
int v25; // w10
__int64 v26; // x12
__int64 v27; // x11
int v28; // w14
float v29; // s0
float v30; // s1
__int64 v31; // x16
if ( (unsigned int)(a2[4] - 1) > 1 )
return 0;
v8 = sub_F7D94(a2[5]);
v9 = sub_F7D94(a2[6]);
v10 = sub_9CE54(a1, *a2 * a3, 4);
v11 = v10;
if ( v10 )
{
v12 = a2[4];
if ( v12 == 1 )
{
v22 = sub_F7FBC(a2);
v23 = a2[1];
v24 = 0;
v25 = 0;
while ( v24 < v23 )
{
if ( !a4 || *(_DWORD *)(*((_QWORD *)a2 + 1) + 4 * v24) )
{
v26 = *a2;
v27 = 0;
v28 = 1;
v29 = 0.0;
while ( v27 < v26 )
{
v30 = (float)(v29 + v8)
+ (float)(fabsf((float)*(int *)(*((_QWORD *)a2 + 5) + 4LL * ((int)v24 / v28 % v22))) * v9);
if ( a2[8] )
v29 = v30;
if ( a4 )
v31 = (int)v27 + (int)v26 * *(_DWORD *)(a4 + 4LL * v25);
else
v31 = v26 * v25 + v27;
*(float *)(v11 + 4 * v31) = v30;
v28 *= v22;
++v27;
}
++v25;
}
++v24;
}
}
else if ( v12 == 2 )
{
v13 = a2[1];
v14 = 0;
v15 = 0;
while ( v14 < v13 )
{
if ( !a4 || *(_DWORD *)(*((_QWORD *)a2 + 1) + 4 * v14) )
{
v16 = *a2;
v17 = 0;
v18 = 0.0;
while ( v17 < v16 )
{
v19 = (float)(v18 + v8)
+ (float)(fabsf((float)*(int *)(*((_QWORD *)a2 + 5) + 4LL * (int)v16 * (int)v14 + 4 * v17)) * v9);
if ( a2[8] )
v18 = v19;
if ( a4 )
v20 = (int)v17 + (int)v16 * *(_DWORD *)(a4 + 4LL * v15);
else
v20 = (int)v16 * v15 + v17;
*(float *)(v10 + 4 * v20) = v19;
++v17;
}
++v15;
}
++v14;
}
}
}
return v11;
}