//
// sub_10056C58C from 0x10056c58c to 0x10056c890 (772 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009aa950
//
// 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 11:08:16 +0000
//
__int64 __fastcall sub_10056C58C(__int64 a1, __int64 a2)
{
__int128 v4; // q1
__int64 v5; // x0
int v6; // w8
int v8; // [xsp+4h] [xbp-8Ch] BYREF
int v9; // [xsp+8h] [xbp-88h] BYREF
int v10; // [xsp+Ch] [xbp-84h] BYREF
int32x4_t v11; // [xsp+10h] [xbp-80h] BYREF
_DWORD v12[9]; // [xsp+28h] [xbp-68h] BYREF
__int128 v13; // [xsp+4Ch] [xbp-44h]
__int128 v14; // [xsp+5Ch] [xbp-34h] BYREF
int v15; // [xsp+6Ch] [xbp-24h] BYREF
__int64 v16; // [xsp+70h] [xbp-20h] BYREF
__int64 v17; // [xsp+78h] [xbp-18h] BYREF
v15 = 0;
v14 = 0u;
v13 = 0u;
memset(&v12[1], 0, 32);
v12[0] = 72;
LOBYTE(v12[2]) = (**(__int64 (__fastcall ***)(__int64))a1)(a1);
BYTE2(v12[2]) = 0;
FMOD_Memory_GetStats((char *)&v14 + 12, &v15, 0);
sub_1005F89BC(*(_QWORD *)(a1 + 40), &v11);
*((_QWORD *)&v4 + 1) = vrev64q_s32(v11).i64[1];
*(_QWORD *)&v4 = v11.i64[0];
*(_OWORD *)&v12[3] = v4;
v10 = 0;
sub_100585744(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 40) + 1720LL) + 64LL), &v10);
v9 = 0;
sub_100585724(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 40) + 1720LL) + 64LL), &v9);
v8 = 0;
sub_100585744(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 40) + 1712LL) + 64LL), &v8);
LOWORD(v12[7]) = v10;
HIWORD(v12[7]) = v9;
LOWORD(v12[8]) = v8;
v5 = *(_QWORD *)(a1 + 40);
HIWORD(v12[8]) = *(_DWORD *)(v5 + 480);
DWORD2(v13) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(v5, 3u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
WORD4(v13) = WORD2(v16);
WORD5(v13) = v16;
}
}
LODWORD(v13) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 2u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
LOWORD(v13) = WORD2(v16);
WORD1(v13) = v16;
}
}
DWORD1(v13) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 7u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
WORD2(v13) = WORD2(v16);
WORD3(v13) = v16;
}
}
LODWORD(v14) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 4u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
LOWORD(v14) = WORD2(v16);
WORD1(v14) = v16;
}
}
HIDWORD(v13) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 5u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
WORD6(v13) = WORD2(v16);
HIWORD(v13) = v16;
}
}
DWORD1(v14) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 6u, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
WORD2(v14) = WORD2(v16);
WORD3(v14) = v16;
}
}
DWORD2(v14) = 0;
v17 = 0;
if ( !(unsigned int)sub_100564A64(*(_QWORD *)(a1 + 40), 0, &v17) )
{
v16 = 0;
if ( !(unsigned int)sub_1005AF7F8(v17, (char *)&v16 + 4, &v16) )
{
WORD4(v14) = WORD2(v16);
WORD5(v14) = v16;
}
}
v6 = *(_DWORD *)(a2 + 8);
if ( v6 > 0 )
return 28;
*(_DWORD *)(a2 + 8) = v6 + 1;
return (***(__int64 (__fastcall ****)(_QWORD, _DWORD *, _QWORD))a2)(*(_QWORD *)a2, v12, 0);
}