//
// sub_10047EE48 from 0x10047ee48 to 0x10047ef10 (200 bytes)
//
// 1 xrefs:
// > sub_10047EDDC @ 0x10047ee0c
//
// 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_10047EE48(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // x0
int v6; // w11
__int64 v7; // x8
__int64 v8; // d0
__int64 v9; // x10
unsigned int v10; // w11
*(_DWORD *)(a1 + 40) = 14;
*(_QWORD *)(a1 + 328) = 0;
*(_QWORD *)(a1 + 360) = 0;
*(_DWORD *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 288) = 0u;
*(_OWORD *)(a1 + 304) = 0u;
*(_QWORD *)(a1 + 8) = a1 + 376;
if ( (unsigned int)(*(_DWORD *)(a3 + 20) - 6) < 0xFFFFFFFB )
return 19;
result = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 368) + 24LL))(
*(_QWORD *)(a1 + 368),
a1 + 396);
if ( !(_DWORD)result )
{
*(_DWORD *)(a1 + 272) = 0;
v6 = *(_DWORD *)(a3 + 20);
v7 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(v7 + 8) = v6;
v8 = *(_QWORD *)(a3 + 12);
*(_QWORD *)(v7 + 12) = v8;
if ( (_DWORD)v8 )
{
v9 = *(unsigned int *)(a3 + 4);
v10 = v6 - 1;
if ( v10 <= 4 )
LODWORD(v9) = (unsigned int)((unsigned __int64)(8 * v9) / qword_10064A1C0[v10]) / (unsigned int)v8;
*(_DWORD *)(v7 + 24) = v9;
}
*(_DWORD *)(a1 + 24) = 0;
return 0;
}
return result;
}