//
// sub_100499204 from 0x100499204 to 0x100499474 (624 bytes)
//
// 0 xrefs:
//
// 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_100499204(__int64 result, __int64 a2, int a3, __n128 a4, __n128 a5, __n128 a6)
{
__int64 v6; // x10
__int64 v7; // x9
__int64 v8; // x11
int v9; // w12
int v10; // w13
int *v11; // x13
int *v12; // x12
int v13; // s0
int v14; // s0
int v15; // w2
v6 = *(int *)(result + 81968);
v7 = 2 * v6;
if ( (int)v6 >= 3 )
{
v8 = 2;
do
{
v9 = 0;
v10 = 2;
do
{
v9 = 2 * (v9 | ((v10 & (unsigned int)v8) != 0));
v10 *= 2;
}
while ( v10 < (int)v7 );
if ( v8 < v9 )
{
v11 = (int *)(a2 + 4 * v8);
v12 = (int *)(a2 + 4LL * v9);
v13 = *v11;
*v11 = *v12;
*v12 = v13;
v14 = v11[1];
v11[1] = v12[1];
v12[1] = v14;
}
v8 += 2;
}
while ( v8 < v7 - 2 );
}
if ( *(int *)(result + 81972) >= 1 )
{
a4.n128_f32[0] = (float)a3;
a5.n128_u32[0] = 0.5;
a6.n128_u32[0] = -0.25;
v15 = vcvts_n_s32_f32(0.5 / (float)1, 0xFu);
if ( v15 < 0 )
v15 = -v15;
return ((__int64 (__fastcall *)(__int64, __n128, __n128, __n128))((char *)&loc_10049931C
+ 4
* byte_10064A59C[(unsigned __int16)(v15 & 0x7FFF) >> 13]))(
2,
a4,
a5,
a6);
}
return result;
}